-
Notifications
You must be signed in to change notification settings - Fork 938
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
Can now get the jacobian of a child link of a move group. #877
Can now get the jacobian of a child link of a move group. #877
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR is way too redundant. It should suffice to skip joints that are not part of the group.
What does group->getVariableGroupIndex(pjm->getName())
return in this case? An exception?
Please better describe the actual error you get when trying to pass a link that's not part of the group.
while (not group->hasLinkModel(link->getName())) | ||
{ | ||
link = link->getParentLinkModel(); | ||
if (not link) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was already checked in line 1126 that link is updated by this group.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but it doesn't check that this link/its parent joint are a part of the group, which is an assumption made several lines down at group->getVariableGroupIndex(pjm->getName());
(see below comment for full explanation).
I see your point now. I'll make this change soon.
It prints an error,
I see your point now, I tend to prefer double checking things when unsure. I made the suggested changes, and they work, but I won't be able to push them to this PR until later tonight. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for simplifying this.
The change looks good. This still misses the case where a static sibling link of a link in the group is requested. |
@v4hn I'd be happy to add that case, but let me make sure I understand what case you are talking about. Say for 3 links, A, B, and C, where A is a parent to both B and C with fixed joints between A-B and A-C, and B is the start of some joint group. If the Jacobian of a point in C is requested, we should recognize that C is a static sibling of B and compute the Jacobian from there? Given my understanding is correct, I'm not sure what to do, as If you are talking about the case where a link is a fixed child of the joint group, the current change should catch that, without needing |
Yes.
Thank you for pointing this out! I rewrote this code two months ago, but apparently I forgot to submit a pull-request for it. I just created #912. Once this is merged it would be great to add the sibling capability to the code here! Thank you for the contribution already! |
Can now get the jacobian of a child link of a move group.
cherry-picked to melodic |
Can now get the jacobian of a child link of a move group.
@BryceStevenWilley @v4hn Is there anything else to do here, since #912 is merged now? |
Yes, now that #912 is in, we should use |
Great, thanks! |
So I was working on finishing up using
@v4hn, am I misunderstanding something, or is the only case |
Description
Originally, if you were to try to get the Jacobian of a link that was at the end of a move group, but not a part of that move group (say a point on a gripper link at the end of a UR robot), then MoveIt would complain that this link was not a part of the move group, even though you should be able to find the jacobian for this point.
This change fixes that, and allows you to get the jacobian of any link that is a child of the move group being queried.
Don't quite have the time to make a test for this, considering there aren't any jacobian tests yet.
Checklist
Extended the tutorials / documentation, if necessary referenceInclude a screenshot if changing a GUI