Get body acceleration info #4094
Replies: 2 comments
-
To my best knowledge, this is not possible. You need to keep track of the velocities and calculate the accelerations yourself, e.g., The instantaneous acceleration could be calculated via f = m * a, where f is the acting force, m the mass and a the acceleration. This formula is used in Gazebo (search for Link::WorldLinearAccel in linki). So, you would need to find out all acting forces on the desired link. But this information is only available for RigidBodies, i.e., https://github.com/bulletphysics/bullet3/blob/master/src/BulletDynamics/Dynamics/btRigidBody.h provides getTotalForce(). Featherstone Bodies do not have this option for some reason, at least I can not find it. Thus, at the moment you need to find out all acting forces yourself if you want the instantaneous acceleration. |
Beta Was this translation helpful? Give feedback.
-
Thanks so much for your reply. I cannot find the getTotalForce() method in pybullet document. Is that only for c++? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
For the development of legged robots, it will be greatly helpful if the controller could get acceleration info the floating base from simulator. Is it possible for users to get a function like getBodyAcc(bodyID) to retrieve body acc info from simulation?
Beta Was this translation helpful? Give feedback.
All reactions