ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I figure out how to solve this problem for a UR robot. Just modify the .xacro file. In .xacro file we can modify the origin pose of virtual joints
<!-- joints: main serial chain -->
<joint name="${prefix}base_link-base_link_inertia" type="fixed">
<parent link="${prefix}base_link" />
<child link="${prefix}base_link_inertia" />
<!-- 'base_link' is REP-103 aligned (so X+ forward), while the internal
frames of the robot/controller have X+ pointing backwards.
Use the joint between 'base_link' and 'base_link_inertia' (a dummy
link/frame) to introduce the necessary rotation over Z (of pi rad).
-->
<origin xyz="0 0 0" rpy="0 0 ${pi}" />
</joint>
just change <origin xyz="0 0 0" rpy="0 0 ${pi}" />
to <origin xyz="0 0 0" rpy="0 ${pi/2} ${pi}" />
can solve my problem.
But I still wonder if we can done this through in a programming way.