I've looked over the PyBullet user guide and can't seem to find a solution to this question. Is there an accessor for the linear acceleration of a body?
Specifically I'd like the linear acceleration of the base link.
I see the `getBasePositionAndOrientatiion` & `getBaseVelocity(model)` methods, but I see no method for accessing the acceleration of the base (or any other link).
How to get body acceleration?
-
- Posts: 4
- Joined: Thu Apr 23, 2020 2:36 am
- Location: Surat, India
Re: How to get body acceleration?
Hi,
you can use while loop to accelerate the bot in a way you want.
For example,
Hope this helps!!! 
you can use while loop to accelerate the bot in a way you want.
For example,
Code: Select all
while True:
cubePos, cubeOrn = p.getBasePositionAndOrientation(bot)
cubeEuler = p.getEulerFromQuaternion(cubeOrn)
dv = k*cubeEuler[0]
p.stepSimulation()

-
- Posts: 3
- Joined: Thu Apr 09, 2020 10:36 pm
Re: How to get body acceleration?
Thanks for the reply, but not quite what I'm looking for. I'm controlling the robot (using joint controllers) and I want to be able to get the acceleration of the base due to the dynamics. I can take a backwards difference of the velocities from one timestep to another, but I was hoping that there was a method to access the accelerations directly.