luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
239 stars 173 forks source link

[BUG] Error when including xacro file in my robot description #550

Open flabrosse opened 5 days ago

flabrosse commented 5 days ago

Ubuntu 22.04, ROS humble, gazebo11

I recently switched from a RealSense Camera to the Oak-D S2 camera. I am now trying to update my robot_description package. In lieu of the few lines to include the RS camera, I now have:

  <xacro:arg name="camera_name"   default="oak" />
  <xacro:arg name="camera_model"  default="OAK-D-S2" />
  <xacro:arg name="base_frame"    default="oak-d_frame" />
  <xacro:arg name="parent_frame"  default="camera_base" />
  <xacro:arg name="cam_pos_x"     default="0.0" />
  <xacro:arg name="cam_pos_y"     default="0.0" />
  <xacro:arg name="cam_pos_z"     default="0.0" />
  <xacro:arg name="cam_roll"      default="0.0" />
  <xacro:arg name="cam_pitch"     default="0.0" />
  <xacro:arg name="cam_yaw"       default="0.0" />
  <xacro:include
    filename="$(find depthai_descriptions)/urdf/depthai_descr.urdf.xacro" />

I soon as I add the xacro:include statement, I get:

[spawn_entity.py-4] [INFO] [1719494086.888412979] [urdf_spawner]: Waiting for entity xml on /robot_description

Something very similar for the RS camera just worked (the major difference being that the RS xacro file just defines the macro which then needs to be run in the external (my) xacro file, while the DepthAI xacro file defines (in self included) and runs the macro).

Any ideas?

Serafadam commented 8 hours ago

Hi, could you post full log from the launch file? And would it be possible to see the resulting URDF file? From the looks of it I think it might be due to URDF spawner using /oak/robot_description parameter rather than robot_description which is done to avoid name clashing with multiple camera setups, you probably need to remap that parameter name in your launch file/script.