ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Is there an easy way to get the end effector name just from tf?

asked 2014-07-03 06:27:56 -0500

paturdc gravatar image

I have a node that queries move_group to get the end effector name, but uses move_group for nothing else. Ideally I would like to run this node without having to bring up move_group at all, and I don't want to hard code the name of the end effector. Is there a trivial way to solve this? I looked at the C++ code for getEndEffector in move_group_interface.cpp, but it needs some other libraries.

Is there a simple way to get this information by using only TransformListener, for instance?

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
2

answered 2014-07-03 15:15:33 -0500

gvdhoorn gravatar image

updated 2014-07-03 15:17:14 -0500

I can think of one way, but it may not be too nice: every MoveIt configuration package contains a name_of_robot.srdf (see wiki/SRDF). This file contains additional information not found in the robot_description among which is the name of the configured end effector. As an example, see the config of the pr2:

<!--END EFFECTOR: Purpose: Represent information about an end effector.-->
<end_effector name="right_eef" parent_link="r_wrist_roll_link" group="right_gripper" />
<end_effector name="left_eef" parent_link="l_wrist_roll_link" group="left_gripper" />

As this file is valid SRDF, you could probably parse it with the SRDF library (or just any XML parser really), and retrieve the names of the defined EEFs.

PS: obviously, this does not use TF, but it does give you the information you are after without having to use any (large) additional dependencies.

edit flag offensive delete link more

Comments

I'll keep this in mind, but for now I am going to try the solution with the parameter server. Thanks for the help.

paturdc gravatar image paturdc  ( 2014-07-04 02:57:37 -0500 )edit
2

answered 2014-07-04 00:23:46 -0500

fergs gravatar image

The notion of an "end-effector" does not exist in TF, it is part of the semantics of the robot, and therefore is part of the SRDF. Thus, you should either parse the SRDF, or pass the name of the relevant end effector into the node. The easiest and probably most ROS-like way to do this is to use a parameter -- you aren't actually hard coding the value, but you can set it on startup of the node (even from the launch file that starts the node).

edit flag offensive delete link more

Comments

This solution sounds like the simplest. Thanks for the help.

paturdc gravatar image paturdc  ( 2014-07-04 02:55:56 -0500 )edit
1

answered 2014-07-03 18:50:54 -0500

dornhege gravatar image

From TF alone this is impossible unless you make some non-generic assumptions. Any TF chain starting at the robot might end up at the end effector. You don't know which one this is unless you know the name or at least naming scheme. Also sometimes it really is a definition what the end effector is, e.g. for the PR2: Should it be the wrist_roll_link or the palm or finger or ...

edit flag offensive delete link more

Comments

I know, I should have specified that I will only be working with robot arms :) I don't believe we will ever encounter any branching, so for instance running through all the links to find one without a child link would likely work, but does require some additional coding.

paturdc gravatar image paturdc  ( 2014-07-04 02:54:14 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-03 06:27:56 -0500

Seen: 288 times

Last updated: Jul 04 '14