Skip to content

robot not in it's frame if i change transform between base link and world #3693

@ywu2014

Description

@ywu2014

Background

I'm using moveit2 to planning with openarm. I changed the transform between world and openarm_body_link0 as bellow:

<link name="world"/>
  <joint name="openarm_body_world_joint" type="fixed">
    <parent link="world"/>
    <child link="openarm_body_link0"/>
    <origin rpy="0 0 0" xyz="-0.2 0.0 0.0"/>
  </joint>
  <link name="openarm_body_link0">
    <visual name="openarm_body_link0_visual">
      <origin rpy="0.0 0.0 0.0" xyz="0.0 0.0 0.0"/>
      <geometry>
        <mesh filename="../meshes/body/v10/visual/body_link0.dae" scale="0.001 0.001 0.001"/>
      </geometry>
    </visual>
    ...

so the openarm robot should not in the world origin(x axis -0.2)
but when i start moveit by

ros2 launch openarm_bimanual_moveit_config demo.launch.py use_fake_hardware:=true

in rviz, the robot still located in the world origin, but tf is correct, as show below:

Image

i print the tf between world and openarm_body_link0, result show as below:

ros2 run tf2_ros tf2_echo world openarm_body_link0
[INFO] [1772085071.791638437] [tf2_echo]: Waiting for transform world ->  openarm_body_link0: Invalid frame ID "world" passed to canTransform argument target_frame - frame does not exist
At time 0.0
- Translation: [-0.200, 0.000, 0.000]
- Rotation: in Quaternion (xyzw) [0.000, 0.000, 0.000, 1.000]
- Rotation: in RPY (radian) [0.000, -0.000, 0.000]
- Rotation: in RPY (degree) [0.000, -0.000, 0.000]
- Matrix:
  1.000  0.000  0.000 -0.200
  0.000  1.000  0.000  0.000
  0.000  0.000  1.000  0.000
  0.000  0.000  0.000  1.000

i also tried to start a new rviz, and show robot and tf by RobotModel plugin, but here is correct:

Image you can see in the right side rviz, the openarm robot is overlap with tf(not in world origin)

because of some reason,i need to change robot location not in world(so in urdf i changed openarm_body_world_joint origin), in this case, how can i use moveit?

Environment

  • ROS2
  • Humble
  • Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions