Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a simple example of driving a chain towards a target? #1

Open
mlp1802 opened this issue Aug 30, 2022 · 4 comments
Open

Is there a simple example of driving a chain towards a target? #1

mlp1802 opened this issue Aug 30, 2022 · 4 comments

Comments

@mlp1802
Copy link

mlp1802 commented Aug 30, 2022

There are lots of examples, but I simply need one that does this:

  1. set up a chain
  2. Call a function that drives that chain towards a target
  3. Read the result

I looked through the code and it's kind of overwhelming to figure out what to do.

@djrakita
Copy link
Owner

The library is still under heavy development, and examples/ documentation are still being fully fleshed out, but the closest examples I have for this use case are the following:

https://github.com/djrakita/optima/blob/main/examples/_motion_ik.rs
https://github.com/djrakita/optima/blob/main/examples/_static_ik.rs

It sounds like you may be looking for motion ik and not static ik, feel free to refer to the documentation here for more info.

Hope this helps! And, if the library isn't able to do what you're hoping for yet, stay tuned for future updates.

@mlp1802
Copy link
Author

mlp1802 commented Aug 31, 2022

The library is still under heavy development, and examples/ documentation are still being fully fleshed out, but the closest examples I have for this use case are the following:

https://github.com/djrakita/optima/blob/main/examples/_motion_ik.rs https://github.com/djrakita/optima/blob/main/examples/_static_ik.rs

It sounds like you may be looking for motion ik and not static ik, feel free to refer to the documentation here for more info.

Hope this helps! And, if the library isn't able to do what you're hoping for yet, stay tuned for future updates.

Thanks. I already analyzed this code, and read all the documentation, and my problem is: I don't want to load my robot from a file, I want to create it manually by hand, since I already have a structure. Is it not possible to create a chain by code?

@djrakita
Copy link
Owner

I see. This is not natively handled in the library; however, if you were to create a urdf for your custom chain, the library will be able to load it in. This should work even if you do not link to any mesh geometry.

@mlp1802
Copy link
Author

mlp1802 commented Aug 31, 2022

Yes ok thanks..maybe it's possible to load a configuration, then change the joint setup after? also is it possible to change the joint rotations before solving? my character is constantly moving (it's a game).
Still think you should make the functionality available through api calls instead of only files, it would make it immediately usable for so many users, there are no working IK solutions in rust. Perhaps move the IK solution itself to something simpler? dealing with scenes, meshes, robot sets might be overkill for many solutions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants