Skip to content

Commit

Permalink
Use packages to find mesh at run time
Browse files Browse the repository at this point in the history
  • Loading branch information
rafal-gorecki committed Mar 20, 2024
1 parent 0ef4b38 commit 93ab581
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions depthai_descriptions/urdf/include/base_macro.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<robot name="base"
xmlns:xacro="http://ros.org/wiki/xacro">

<xacro:macro name="base" params="camera_name camera_model parent base_frame
cam_pos_x cam_pos_y cam_pos_z
<xacro:macro name="base" params="camera_name camera_model parent base_frame
cam_pos_x cam_pos_y cam_pos_z
cam_roll cam_pitch cam_yaw has_imu r:=0.8 g:=0.8 b:=0.8 a:=0.8 ">
<!-- base_link of the sensor-->
<link name="${base_frame}"/>
Expand All @@ -21,7 +21,7 @@
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<mesh filename="file://$(find depthai_descriptions)/urdf/models/${model}.stl" />
<mesh filename="package://depthai_descriptions/urdf/models/${model}.stl" />
</geometry>
<material name="mat">
<color rgba="${r} ${g} ${b} ${a}"/>
Expand Down Expand Up @@ -75,4 +75,4 @@
</xacro:if>

</xacro:macro>
</robot>
</robot>

0 comments on commit 93ab581

Please sign in to comment.