Skip to content

Commit

Permalink
Add materials xacro to macro instead of urdf xacro
Browse files Browse the repository at this point in the history
If using the macro in other URDFs then the materials are included.
  • Loading branch information
SyZbidi authored and dave992 committed Sep 22, 2023
1 parent 2624179 commit 2b40856
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
3 changes: 3 additions & 0 deletions zivid_description/urdf/macros/zivid_one_plus_camera.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

<robot xmlns:xacro="http://ros.org/wiki/xacro">

<!-- Import Rviz colors -->
<xacro:include filename="$(find zivid_description)/urdf/zivid_materials.xacro" />

<!-- Zivid One+ Optical Frame Angles -->
<xacro:property name="angle_type_s" value="15.0" />
<xacro:property name="angle_type_m" value="8.5" />
Expand Down
5 changes: 4 additions & 1 deletion zivid_description/urdf/macros/zivid_two_camera.xacro
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<?xml version="1.0"?>

<robot xmlns:xacro="http://ros.org/wiki/xacro">


<!-- Import Rviz colors -->
<xacro:include filename="$(find zivid_description)/urdf/zivid_materials.xacro" />

<xacro:macro name="zivid_two_camera" params="prefix type">
<!-- Zivid Base Link -->
<link name="${prefix}base_link">
Expand Down
3 changes: 0 additions & 3 deletions zivid_description/urdf/zivid_one_plus_camera.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<!-- Options: ZIVID_ONE_PLUS_S, ZIVID_ONE_PLUS_M, ZIVID_ONE_PLUS_L -->
<xacro:arg name="type" default="ZIVID_ONE_PLUS_M" />

<!-- Import Rviz colors -->
<xacro:include filename="$(find zivid_description)/urdf/zivid_materials.xacro" />

<!-- Import and load Zivid camera -->
<xacro:include filename="$(find zivid_description)/urdf/macros/zivid_one_plus_camera.xacro"/>
<xacro:zivid_one_plus_camera prefix="" type="$(arg type)"/>
Expand Down
3 changes: 0 additions & 3 deletions zivid_description/urdf/zivid_two_camera.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<!-- Options: ZIVID_TWO_M70, ZIVID_TWO_M100, ZIVID_TWO_PLUS_L110, ZIVID_TWO_PLUS_M60, ZIVID_TWO_PLUS_M130 -->
<xacro:arg name="type" default="ZIVID_TWO_M70" />

<!-- Import Rviz colors -->
<xacro:include filename="$(find zivid_description)/urdf/zivid_materials.xacro" />

<!-- Import and load Zivid camera -->
<xacro:include filename="$(find zivid_description)/urdf/macros/zivid_two_camera.xacro"/>
<xacro:zivid_two_camera prefix="" type="$(arg type)"/>
Expand Down

0 comments on commit 2b40856

Please sign in to comment.