luxonis / depthai-ros

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

[BUG] (Noetic) {Wrong parameter read in URDF} #411

Open MoscowskyAnton opened 9 months ago

MoscowskyAnton commented 9 months ago

Hi! There is some mistake in file depthai_macro.urdf.xacro in depthai_descriptions. In line 19 it reads arguments instead of parameters:

<xacro:base camera_name = "$(arg camera_name)" parent = "$(arg parent_frame)" camera_model = "$(arg camera_model)" base_frame = "$(arg base_frame)" cam_pos_x = "$(arg cam_pos_x)" cam_pos_y = "$(arg cam_pos_y)" cam_pos_z = "$(arg cam_pos_z)" cam_roll = "$(arg cam_roll)" cam_pitch = "$(arg cam_pitch)" cam_yaw = "$(arg cam_yaw)" has_imu="${has_imu}"/>

it causes errors when using this file apart of depthai_descr.urdf.xacro file. Because this args are not defined, I think main idea was to use params like:

<xacro:base camera_name = "${camera_name}" parent = "${parent_frame}" camera_model = "${camera_model}" base_frame = "${base_frame}" cam_pos_x = "${cam_pos_x}" cam_pos_y = "${cam_pos_y}" cam_pos_z = "${cam_pos_z}" cam_roll = "${cam_roll}" cam_pitch = "${cam_pitch}" cam_yaw = "${cam_yaw}" has_imu="${has_imu}"/

With this changes it works well.

JenniferBuehler commented 9 months ago

I just found this too. It forces the including file to define the arguments, and the macro parameters are not used.