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

Revision history [back]

click to hide/show revision 1
initial version

Old post, but it is easier to work with PoseStamped objects. Both MoveIt and TF support them natively, and you can transform easily to the frame in which you want to apply the offset:

tf::TransformListener tf_listener; // Declared in advance

...

geometry_msgs::PoseStamped pose = group.getCurrentPose();
geometry_msgs::PoseStamped pose_in_ee_frame;
tf_listener.transformPose("your_end_effector_frame", pose, pose_in_ee_frame);
pose_in_ee_frame.pose.position.y -= .05;
group.setPoseTarget(pose_in_ee_frame);

...