Skip to content
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

Incomplete tip link list from KinematicGroup::getAllPossibleTipLinkFrames #1057

Open
marip8 opened this issue Nov 4, 2024 · 3 comments
Open

Comments

@marip8
Copy link
Contributor

marip8 commented Nov 4, 2024

The available tip links for the KinematicGroup currently only include the tip links of the IK solver and direct children of those tip links:

for (const auto& tip_link : inv_kin_->getTipLinkNames())
{
inv_tip_links_map_[tip_link] = tip_link;
for (const auto& child : scene_graph.getLinkChildrenNames(tip_link))
inv_tip_links_map_[child] = tip_link;
}

It seems like this list should also include any link that is attached via a fixed joint tree/chain to the tip link(s) defined by the IK solver. It seems like this ought to be relatively easy to implement using the graph search capability of the scene graph.

I've run into this issue several times before where the TCP frame you want to use for planning was added several fixed joints beyond the IK solver tip frame to correspond more directly to geometry in the robot. When a frame like this is used for planning, the error is a very unhelpful generic map::at exception. It would also be nice to maybe wrap and rethrow that exception with more detailed information

@Levi-Armstrong
Copy link
Contributor

It seems like this list should also include any link that is attached via a fixed joint tree/chain to the tip link(s) defined by the IK solver. It seems like this ought to be relatively easy to implement using the graph search capability of the scene graph.

The call to scene_graph.getLinkChildrenNames should get all children not just the immediate child. Do you have an example where this does not work as expect?

@marip8
Copy link
Contributor Author

marip8 commented Nov 4, 2024

I think this does in fact function as expected. In the use-case where I thought I encountered this issue, I wasn't overly familar with the URDF; it turns out we had specified a TCP link that was a "cousin" of the tip link (it could be reached -- through fixed joints -- by going up one link in the hierarchy and then down to the specified TCP link). Is it worth trying to support a use-case like this, maybe in the case that the tip link can't be found in the existing map? It seems like it could be done using SceneGraph::getShortestPath and checking that all joints are fixed

@marip8
Copy link
Contributor Author

marip8 commented Nov 7, 2024

Per our discussion yesterday, maybe a better approach would be to walk backwards from the specified tip link until we hit an actuated joint, and run getLinkChildrenNames from the child link of that actuated joint instead. This would capture all "cousin" frames that could potentially be specified as TCP frames

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants