Moveit2 planning frame for UR robot

asked 2021-06-16 07:16:53 -0500

definitive gravatar image

As I noticed, the real robot coordinates system of UR is rotated by 180 degrees.

description: add ROS-I base and tool0 frames. Fix #49 and #95. Note that 'base' is essentially 'base_link' but rotated by 180 degrees over the Z-axis. This is necessary as the visual and collision geometries appear to also have their origins rotated 180 degrees wrt the real robot. 'tool0' is similar to 'ee_link', but with its orientation such that it coincides with an all-zeros TCP setting on the UR controller. Users are expected to attach their own TCP frames to this frame, instead of updating it

The problem appears during getting current pose of robot with pose = move_group_->getCurrentPose(). It returns pose in reference to base_link. If I would pass same pose again to robot move_group_->setPoseTarget(pose.pose), it will rotate robot by 180 degrees because it passes pose in reference to real robot base, which is base_link_inertia, instead of base_link.

How to get current pose in reference to base_link_inertia? move_group_->setPoseReferenceFrame("base_link_inertia") doesn't change anything. I'm using ur and moveit2 packages.

image description

edit retag flag offensive close merge delete