Gazebo | Ignition | Community
Ask Your Question
0

How to get the Acceleration of a Joint

asked 2016-02-11 09:33:02 -0500

Dennis Leroy Wigand gravatar image

Hi folks,

I have a robotic arm in Gazebo from which I am already reading the angles (i.e. GetAngle(0).Radian()) as well as the velocity (i.e. GetVelocity(0)) from each joint. Now I also need to get the acceleration from the joints.

So far I haven't come across a way to achieve this. Do you have any ideas?

Cheers, Dennis

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-02-17 09:41:22 -0500

debz gravatar image

The acceleration is the derivative of the velocity and the velocity is the derivative of the position/angle. You can just create a small class, that keeps in memory the previous (or many previous) angle/velocity and get the acceleration from that. Typically, if you get the velocity of your joint at each iteration i, then the acceleration would be something like:

accelaration[i] = (velocity[i-1] - velocity[i]) / (time[i-1] - time[i])

This is not perfectly exact since we should use:

accelaration[i] = (velocity[i-1] - velocity[i+1]) / (time[i-1] - time[i+1])

But since we can't predict the future, it should give you good aproximation. An other way would be to use the force sum on your joint and compute the formula F = m.a but this requires much more knowledge and is too cumbersome. `

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-02-11 09:33:02 -0500

Seen: 2,457 times

Last updated: Feb 17 '16