ROS2 troubles linking ZEDx to existing robot URDF

We’re building a differential drive AMR on ROS2 + NVidia Isaac ROS with a ZEDx camera. Any time we launch a ZED node, our transform tree is modified where the camera_link becomes a child of odom as opposed to it’s fixed position to base_link as described in our URDF. We followed the Zed integration on a robot instructions exactly. Below is an example of the tf tree when just running ros2_control node + robot state publisher node (accurate), and after, a tf tree when running a zed node as well (camera_link moved under odom).

ros2_control + robot_state_publisher + zed_node (camera_link moved under odom):

It seems like the instructions on integrating with an existing robot are missing some steps or we are just missing some obvious piece. We have modified some config params when running the zed node. They are as follows:

  • pos_tracking_enabled: false
  • publish_tf: false

But it seems whatever params are flipped, camera_link is hijacked and moved under odom. Thanks in advance for the help!

Seems new user can only post one upload. Attaching the TF tree here that is how it should be according to our URDF before running a zed node:

Hi @harborhoffer
Welcome to the Stereolabs community.

The second TF tree is correct is you are not using the ZED Odometry as the main source of odometry information.
The xacro parameter use_zed_localization allows you to easily reach this configuration.

In this case it is also important that you launch the ZED ROS2 Wrapper node with the parameter publish_tf set to false, otherwise you will get TF conflicts.

Thanks for the reply @Myzhar. Turns out I was not setting the publish_tf param the right way.

1 Like

Could you please share a simple URDF file that demonstrates how to integrate the camera with the robot? I am struggling with attaching the camera to the URDF, and I want to create a MoveIt setup with my robot and the camera. Is the one below correct, i added it to my urdf file?

  <!-- Add one ZED Camera -->
  <xacro:arg name="camera_name"   default="zed" />
  <xacro:arg name="camera_model"  default="zed" />

  <xacro:include filename="$(find zed_wrapper)/urdf/zed_macro.urdf.xacro" />
  <xacro:zed_camera name="$(arg camera_name)" model="$(arg camera_model)">
    <joint name="$(arg camera_name)_joint" type="fixed">
      <origin xyz="0.12 0.0 0.25" rpy="0 0 0"/>
      <parent link="panda_link0"/>
      <child link="$(arg camera_name)_camera_link"/>

I Solved the Problem.

1 Like