what is the reference frame of the jacobian computed by moveit
when use RobotState.getJacobian()
to compute jacobian matrix, which frame dose the result express in ?
Is it the same as what we get from RobotModel.getModelFrame()
? What if I get "world"
from RobotModel.getModelFrame()
, but I want to calculate jacobian with respect to the link_0
of my robot (which is different from world link), what should I do ?
Asked by ygliao on 2018-09-27 11:13:04 UTC
Answers
I don't know if you have solved your issue yet, but I think I may have found a solution. I was working on the same problem myself and found that the getJacobian()
function returns the Jacobian in the base frame for the JointModelGroup
that you specified in the request, not world
as I originally expected. If you want to rotate the Jacobian to a different reference frame here is an example of how you might do it. I have not verified this code but it looks like it should work. Note that the getGlobalLinkTransform
will not work if the base frame of reference of your group is not the same as the global frame, which was the issue that I ran into with my robot. If the base frame is different than the global frame, then you could use getGlobalLinkTransform
to get the transforms for both the base link and the EE link, then use the two in order to compute the relative transform between base and tip. Then use this relative transform in order to rotate the Jacobian into the EE frame.
Asked by agoins on 2019-01-08 12:39:31 UTC
Comments