luxonis / depthai-ros

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

Fix param substitution in description #412

Closed jack-slip closed 9 months ago

jack-slip commented 9 months ago

Overview

Author:

Issue

Issue link (if present): #411 Issue description: Related PRs

Changes

ROS distro: humble List of changes: fix param substitution bug, affects noetic as well

Testing

Hardware used: Depthai library version:

Visuals from testing

Add screenshots/gifs/videos from RVIZ or other visualizers demonstrating the effect of the changes when applicable.

MoscowskyAnton commented 9 months ago

Seems that changing only description file also broke all depathai launches. So that problems must be seen by maintainers.

Serafadam commented 9 months ago

Hi @MoscowskyAnton, could you add some specifics on the broken launch files? I have not observed that behavior

MoscowskyAnton commented 9 months ago

Hi @MoscowskyAnton, could you add some specifics on the broken launch files? I have not observed that behavior

On Noetic when I change like in this request, when I launch examples I got smth like that:

name 'parent_frame' is not defined 
when evaluating expression 'parent_frame'
when instantiating macro: base (/opt/ros/noetic/share/depthai_descriptions/urdf/include/base_macro.urdf.xacro)
instantiated from: depthai_camera (/opt/ros/noetic/share/depthai_descriptions/urdf/include/depthai_macro.urdf.xacro)
in file: /opt/ros/noetic/share/depthai_descriptions/urdf/depthai_descr.urdf.xacro
RLException: while processing /opt/ros/noetic/share/depthai_descriptions/launch/urdf.launch:
Invalid <param> tag: Cannot load command parameter [robot_description]: command [['/opt/ros/noetic/lib/xacro/xacro', '/opt/ros/noetic/share/depthai_descriptions/urdf/depthai_descr.urdf.xacro', 'camera_name:=oak', 'camera_model:=OAK-D', 'base_frame:=oak-d_frame', 'parent_frame:=oak-d-base-frame', 'cam_pos_x:=0.0', 'cam_pos_y:=0.0', 'cam_pos_z:=0.0', 'cam_roll:=0.0', 'cam_pitch:=0.0', 'cam_yaw:=0.0']] returned with code [2]. 

Param xml is <param name="robot_description" command="$(find xacro)/xacro '$(find depthai_descriptions)/urdf/depthai_descr.urdf.xacro'                         camera_name:=$(arg tf_prefix)                         camera_model:=$(arg camera_model)                         base_frame:=$(arg base_frame)                         parent_frame:=$(arg parent_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)"/>
The traceback for the exception was written to the log file
Serafadam commented 9 months ago

@MoscowskyAnton could you check if that branch works for you?

MoscowskyAnton commented 9 months ago

@Serafadam yes sir, that is absolutely works for me! Many thanks!