ZED Integration with Robot

I am trying to integrate the ZED camera with a Clearpath Husky that’s using ROS1. I am trying to use RTABMAP to used LIDAR + Camera for SLAM. I started by trying to add the ZED URDF to the Husky URDF, but I am running into issues.

Hi @sesem738
Welcome to the Stereolabs community.

Please provide more information concerning the problems that you are facing.

I changed the URDF of the Husky, by following the tutorial for the ZED robot integration for ROS 2, but modifying it for ROS1. I am not receiving any errors outright, but I cannot see any links or joints when I run rviz. This only started to happen when I added the ZED to the URDF so I am definitely doing something wrong.
I have attached pictures showing how I added the ZED to the URDF

ROS and ROS 2 have different behaviors.
You cannot use the guide for ROS 2 in ROS.

How do I go about it with ROS1?

The file zed_descr.urdf.xacro is only an example of how to include the ZED macro in a robot.
You can simply copy and paste this part

  <xacro:include filename="$(find zed_wrapper)/urdf/zed_macro.urdf.xacro" />
  <xacro:zed_camera name="$(arg camera_name)" model="$(arg camera_model)" parent="$(arg base_frame)">
      xyz="$(arg cam_pos_x) $(arg cam_pos_y) $(arg cam_pos_z)" 
      rpy="$(arg cam_roll) $(arg cam_pitch) $(arg cam_yaw)"

in the URDF of your robot, after setting the correct value for each parameter:

  • base_frame
  • camera_name
  • camera_model
  • cam_pos_x, cam_pos_y, cam_pos_z
  • cam_roll, cam_pitch, cam_yaw

I was able to add the ZED to the robot’s URDF following your instructions. However, now when I launch the roslaunch zed_wrapper zed2i, the transforms get all messed up. I edited the launch file to set publish_tf to false, but the transforms still get messed up. Please, how do I go about this?

Please publish your TF tree to understand more concerning the “messed” status.

This is the TF tree before I run the ZED Wrapper launch file

This is the TF tree after I run the launch file. I do get an error says Failed to get static transforms. Is the ROBOT STATE PUBLISHER node correctly working

You changed something in the ZED URDF file that broke the tree.
Please check it against the online version

Hi, you were right. I made the mistake of making the name in the zed2i launch file zed2i instead of zed. Anyways, I am going to write down what I did so that people can use it as a reference should they run into the same issues.

I am using the Clearpath Husky Robot which has “base_link” as its base link. However, I have my camera mounted with respect to the “user_rail_link” so that’s what I declared as my base_link.

  1. I copy pasted sample from the zed_descr.urdf.xacro in another file and included it in my URDF of the Husky. The camera name="zed", the model="zed2i", parent="user_rail_link" and the camera position with respect to the user_rail_link

  2. I edit the zed2i launch file in the zed_wrapper. I change `publish_urdf=false’ and the camera position w.r.t user_rail_link

  3. I edit common.yaml in params. I change base_frame: user_rail_link and publish_tf=false

Anytime, I turn set “publish_tf=true”, it attaches odom directly to user_rail_link instead of odom -> base_link -> user_rail_link how do I add that transform?

You must change it here and in the URDF