Ask Your Question
0

How to get end effector acceleration in ROS using MoveIt! APIs?

asked 2018-09-27 23:15:24 -0500

dpakshimpo gravatar image

updated 2018-09-28 00:25:11 -0500

Hello,

I would like to calculate the end-effector acceleration to know the force acting on the object attached to end-effector. I understand that, the end-effector velocities are related to Jacobian as:

Xdot = J(q).qdot

Now, differentiating the above will give me end effector accelerations,

Xdotdot = J(q).qdotdot + (d/dtJ(q)).qdot

Can you let me know if there are existing functions in MoveIt! which lets us calculate the end-effector acceleration? Or, is there any better way to do it. I am using ROS Indigo.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-09-28 02:31:07 -0500

ffusco gravatar image

updated 2018-10-03 06:38:23 -0500

Hello,

As far as I know in MoveIt! there are no functions to get the acceleration of the end-effector. However, since the API is quite extensive, it reasonable to expect that I am wrong! If you - or anyone - find such function, I would be glad to know it :)

That said, to solve your problem you might consider using Orocos KDL. Here there is a list of available solvers that can compute forward/inverse kinematics at position and velocity level. Regarding acceleration, the solver is not available yet (the class is abstract). However that could be a starting point for a web search, and maybe someone actually implemented the solver somewhere.

As a 'quick and dirty' workaround, you can consider using this solver, which allows you to get the derivative of the jacobian. Note that in the documentation this is discouraged, as the solver is meant for internal use. In addition, note that using the formula a=J * qdd + Jd * qd is rather inefficient compared to a recursive implementation (e.g., the one used in the Newton-Euler algorithm for inverse dynamics).

Hope it helps!

EDIT

The recursive implementation I am referring to is the one that allows to recursively compute the acceleration of a kinematic chain's end-effector knowing joint positions, velocities and accelerations. It is usually exploited when dealing with Newton-Euler equations of dynamics. See, eg, this paper. The equations of insterest are (13) and (14), where V is a spatial velocity vector (ie, it contains both the linear and angular velocities). If you go through the document you will have all the theoretical information to implement the algorithm!

Regarding the statement 'formula a=Jadd+Jdqd is rather inefficient': KDL implementation of J and Jdot solvers is actually using a recursive formulation similar to the one I mentioned. If you get the acceleration using a=J * qdd+Jd * qd (I had mis-typed it before!) you will actually run two times the recursive equations to get the Jacobian and its derivative. Then, you will multiply the joint acceleration vector by J and the joint velocity vector by Jdot. In total you will perform 2x6xdof multiplications (dof = degrees of freedom of the robot, ie, number of joints) and almost the same number of additions to get end-effector's acceleration. Thereofre, if having J and Jdot is not strictly necessary (which seems to be your case, isn't it?), implementing directly a recursive acceleration computation would be faster as you 'traverse' the kinematic chain just once. This is obviously just a rough explanation, but I hope it clarify a little what I said :)

Concluding note: If you do not have particular efficiency needs, using J and Jdot is probably ok ;)

edit flag offensive delete link more

Comments

Thank you ffusco! I did not quite understand what you meant by "formula a=Jadd+Jdqd is rather inefficient compared to a recursive implementation(...)."

Can N-E algorithm used to calculate end effector acceleration? Can you give some references to understand it better?

dpakshimpo gravatar imagedpakshimpo ( 2018-10-03 03:39:35 -0500 )edit

Ok, first of all, the recursive equations I am referring to are the ones that allow to recursively compute the acceleration of a kinematic chain's end-effector knowing joint positions, velocities and accelerations. See, eg, this paper.

ffusco gravatar imageffusco ( 2018-10-03 06:14:46 -0500 )edit

The equations are (13) and (14), where V is a spatial velocity vector (ie, it contains both the linear and angular velocities). If you go through the document you will have all the theoretical information to implement the algorithm.

ffusco gravatar imageffusco ( 2018-10-03 06:18:03 -0500 )edit

I was planning to answer you in the comments, but it was becoming too long... so I edited my answer! Unfortunately I cannot delete my two previous comments... Just read the edit!

ffusco gravatar imageffusco ( 2018-10-03 06:37:54 -0500 )edit

Thank you so much for your time and effort! Appreciate it. I will look up the paper and calculations. The KDL solver reference you gave is unfortunately not available in ROS Indigo. So I will check how to port them to Indigo, since I do not much performance constraints at this moment :)

dpakshimpo gravatar imagedpakshimpo ( 2018-10-03 06:49:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2018-09-27 23:15:24 -0500

Seen: 179 times

Last updated: Oct 03 '18