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

get the position of end effector

asked 2016-05-02 23:27:53 -0600

andydar gravatar image

Hi, I am just started doing research of Baxter Research Robot with ROS Indigo. Anybody know how to get the position of end effector on say the right arm of the robot in MoveIt! or Gazebo? I am currently just simulating the robot in software environment.

Thanks, Andy

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-05-03 02:39:16 -0600

updated 2016-05-03 02:47:46 -0600

If all you want is the current pose, you can skip MoveIt altogether and get the info directly from TF. The transformation you're looking for is probably base -> right_gripper. Check out the TF tutorials to see how to get transforms between links.

You only need to use MoveIt for this if you want to get transformations for robot states that are not the current robot state, e.g. to answer the question "what would the transform between base and right_gripper be if I executed plan X generated by MoveIt".

Of course you can do it with MoveIt too if you want, something like this:

moveit::planning_interface::MoveGroup group;
// ...
robot_state::RobotStatePtr state = group.getCurrentState();
Eigen::Affine3d &transform = state->getFrameTransform("right_gripper");

See the MoveGroup and RobotState documentation.

edit flag offensive delete link more

Comments

+1 for showing simpler usecase. Just curious, why not mention MoveGroup::getCurrentPose for MoveIt! example?

130s gravatar image 130s  ( 2016-10-08 15:00:42 -0600 )edit
1

Good point @130s, that's easier than my Moveit example.

Martin Günther gravatar image Martin Günther  ( 2016-10-10 07:12:48 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-05-02 23:27:53 -0600

Seen: 2,790 times

Last updated: May 03 '16