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

rayDemo2.py file has a small mistake | prevents it from running the file. #514

Open
waleedbkhalid opened this issue Oct 10, 2023 · 2 comments

Comments

@waleedbkhalid
Copy link

robot.setGeneralizedCoordinate(np.array([0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0]))
robot.setGeneralizedVelocity(np.zeros(7))
robot.setJointDamping(np.array([0, 0, 0, 0, 0, 0, 1, 1, 1, 1]))

Hi, I believe that the np.zeros(7) should be np.zeros(11). The code started working after I did this. I made a wild guess that all the kinematic/dynamics-related quantities should have the same vector size. Since other vectors were of size 11, I changed the length of the initialized zero array of generalized velocity to 11

@jhwangbo
Copy link
Contributor

Thank you for pointing this out. It will be fixed in the next push.
Actually the correct vector size should be 10 because GC dimension and GV dimension are different. GC uses quaternion which increases its size by 1

@waleedbkhalid
Copy link
Author

I see. I will make it 10 for my code then. Thank you.

@jhwangbo jhwangbo reopened this Oct 10, 2023
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