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

Retrieve end effector pose in MoveIt

asked 2013-10-08 22:16:51 -0600

Flavian gravatar image

updated 2013-11-14 10:41:00 -0600

tfoote gravatar image

I am creating a node that has to publish the pose (and if possible twist) of the end effector.

My robot publishes a tf which I think could be used in this fashion. But I would also like to benefit from MoveIt's high-level API which allows to give names to the end effectors.

Additional question: if you have anything for the end effector twist, that would be very helpful.

edit retag flag offensive close merge delete

Comments

With twist do you mean how it is oriented or how it is moving (i.e. velocities)?

dornhege gravatar image dornhege  ( 2013-10-09 01:52:27 -0600 )edit

Yes, as in geometry_msgs::Twist

Flavian gravatar image Flavian  ( 2013-10-09 02:01:13 -0600 )edit
1

@Flavian has also posted this question here, see more answers in this thread: https://groups.google.com/d/msg/moveit-users/zFMzGqkVBuc/cO7Pzc34qVMJ

Martin Günther gravatar image Martin Günther  ( 2013-10-09 05:04:30 -0600 )edit

2 Answers

Sort by » oldest newest most voted
4

answered 2013-10-10 02:22:54 -0600

Flavian gravatar image

updated 2013-10-10 02:49:08 -0600

As stated in here by Simon Jansen:

Assuming you're using the high-level movegroup interface, could you not do something like this:

moveit::planning_interface::MoveGroup *group; 
group = new moveit::planning_interface::MoveGroup("arm");
group->setEndEffectorLink("hand_left");
geometry_msgs::PoseStamped current_pose =
group->getCurrentPose();

but this is if you want to define a new group. If you want to use the group linked to your previous end-effector you should do:

moveit::planning_interface::MoveGroup group("your end-effector");
group.getCurrentPose();
edit flag offensive delete link more
3

answered 2013-10-09 01:51:51 -0600

dornhege gravatar image

Is your end effector a link with a frame id?

Then you already have everything. Just get the tf transform for this frame_id. This gives you a pose that contains position and orientation.

edit flag offensive delete link more

Comments

There is a precise notion of end effector in the MoveIt API (http://moveit.ros.org/wiki/PR2/Setup_Assistant/Quick_Start#STEP_6:_Label_End_Effectors) which I would need to use. Plus, in the MoveIt API, if you have a link you can get the FK. However I fail at seeing the big picture.

Flavian gravatar image Flavian  ( 2013-10-09 02:03:41 -0600 )edit
1

I agree with @dornhege. Just use TF, using MoveIt only for this is overkill.

Martin Günther gravatar image Martin Günther  ( 2013-10-09 05:06:25 -0600 )edit

While I agree with your point, TF doesn't semantically take advantage of the end effector naming from MoveIt. Say you have at least two end effectors that you defined (e.g fingers on a hand) and your node accept an "end_effector" property, it's easier to switch from a user point of view.

Flavian gravatar image Flavian  ( 2013-10-09 08:11:02 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-10-08 22:16:51 -0600

Seen: 10,380 times

Last updated: Oct 10 '13