raisimTech / raisimLib

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

Cannot get the angular velocity from Object class #508

Closed edward9503 closed 10 months ago

edward9503 commented 1 year ago

Hi @jhwangbo ,

I am using this code to get the angular velocity of the object: auto box = world.getObject("box");.

However I found that there is only linear velocity inside the Object.hpp, which I cannot get the angular velocity of the "box" object. Is there anything I can do to access the angular velocity?

Many thanks.

jhwangbo commented 10 months ago

Hi @edward9503 sorry for my late response. The method is called raisim::SingleBodyObject::getAngularVelocity. The getObject method will return object pointer and you have to cast it to SingleBodyObject