raisimTech / raisimLib

Visit www.raisim.com
http://www.raisim.com
Other
338 stars 91 forks source link

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

Open waleedbkhalid opened 10 months ago

waleedbkhalid commented 10 months ago

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 commented 10 months ago

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 commented 10 months ago

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