-
Notifications
You must be signed in to change notification settings - Fork 935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KDL kinematics plugin's forward kinematics #2572
Comments
Thanks for reporting an issue. Because we're a volunteer community, providing a pull request with suggested changes is always welcomed. |
This code indeed looks suspicious, please open a PR with your changes and ideally also a test like you described in "Steps to reproduce" Personally I would rather use a RobotState, set the positions (joint values), call update and then get the FK positions from getGlobalLinkPose |
You are right, the code currently doesn't handle multiple link names, primarily because the KDL plugin doesn't support non-chain kinematic trees: @eferre89, do you just want to solve the FK? In this case, your proposed approach should be easily feasible and we welcome a corresponding PR. If you are asking for IK as well, this will require much more work, because the Jacobian matrix computation should be extended appropriately... However, we would very much welcome a PR on this as well 😉 |
Thank you for your feedback, @simonschmeisser and @rhaschke. I'm going to submit a PR for FK, with related test case. |
This is the fix I'd propose: I added the following test case: I have no issues with the Panda robot, that does not have any fake link, while the Fanuc robot does: and this makes the test fail. Is there any specific reason why this additional link has been included in the Fanuc robot description? It makes the Fanuc kinematics a tree and not a chain. Indeed, we already know that the KDL plugin does not work with trees, so, in my opinion, we should not be testing the KDL kinematics plugin on the Fanuc robot. What do you think? |
You highlight the link Looking at |
@v4hn wrote:
No, that's actually on purpose:
In the |
I agree with @v4hn that the Fanuc is a simple kinematic chain. There is no reason to drop a test for Fanuc. |
Hello everyone, sorry, I misread the URDF, I apologize for that. I agree with you that the joint model group When I call int link_index = joint_model_group_->getLinkModel(link_names[i])->getLinkIndex(); the index I get is not the one in the group, but the one in the model. In fact, when I ask for index of |
Usually kinematics plugins are tailored towards a fixed subtree / subchain of the RobotModel. In this case, the mapping from link names to an internal id/index can be established once during initialization. |
Description
Up to my understanding, this is the current implementation of
getPositionFK
for the KDL kinematics plugin:It seems to me that, at each iteration,
poses[i]
always takes the same value, regardless ofi
(regardless of the specific links in thelink_names
parameter). I think that the purpose of this for loop is to give eachpose[i]
the pose of the link we are computing FK for.Maybe the programmer intention was to provide an implementation that resembles the following snippet:
where
link_indices
is computed fromlink_names
and the joint model group.Your environment
Steps to reproduce
For example you can assign
link_names = getLinkNames()
(all links) and callgetPositionFK(link_names, joint_angles, poses)
.Expected behaviour
poses
should contain forward kinematics for each link passed inlink_names
.Actual behaviour
poses
contains forward kinematics for the last link repeatedlink_names.size()
times.Backtrace or Console output
N/A
The text was updated successfully, but these errors were encountered: