Skip to content

Commit a87f65b

Browse files
authored
Add ros2_control switch and enable mesh loadingin Gazebo (#16)
1 parent d48a55f commit a87f65b

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

robotiq_description/urdf/robotiq_gripper_macro.urdf.xacro

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,31 @@
99
sim_isaac:=false
1010
use_fake_hardware:=false
1111
fake_sensor_commands:=false
12+
include_ros2_control:=true
1213
com_port:=/dev/ttyUSB0">
1314

1415
<!-- ros2 control include -->
1516
<xacro:include filename="$(find robotiq_description)/urdf/robotiq_gripper.ros2_control.xacro" />
16-
<!-- ros2 control instance -->
17-
<xacro:robotiq_gripper_ros2_control
18-
name="${name}" prefix="${prefix}"
19-
sim_ignition="${sim_ignition}"
20-
sim_isaac="${sim_isaac}"
21-
use_fake_hardware="${use_fake_hardware}"
22-
fake_sensor_commands="${fake_sensor_commands}"
23-
com_port="${com_port}"
24-
/>
17+
<!-- if we are simulating or directly communicating with the gripper we need a ros2 control instance -->
18+
<xacro:if value="${include_ros2_control}">
19+
<xacro:robotiq_gripper_ros2_control
20+
name="${name}" prefix="${prefix}"
21+
sim_ignition="${sim_ignition}"
22+
sim_isaac="${sim_isaac}"
23+
use_fake_hardware="${use_fake_hardware}"
24+
fake_sensor_commands="${fake_sensor_commands}"
25+
com_port="${com_port}"/>
26+
</xacro:if>
2527

2628
<link name="${prefix}robotiq_85_base_link">
2729
<visual>
2830
<geometry>
29-
<mesh filename="package://robotiq_description/meshes/visual/robotiq_base.dae" />
31+
<mesh filename="file://$(find robotiq_description)/meshes/visual/robotiq_base.dae" />
3032
</geometry>
3133
</visual>
3234
<collision>
3335
<geometry>
34-
<mesh filename="package://robotiq_description/meshes/collision/robotiq_base.stl" />
36+
<mesh filename="file://$(find robotiq_description)/meshes/collision/robotiq_base.stl" />
3537
</geometry>
3638
</collision>
3739
<inertial>
@@ -44,12 +46,12 @@
4446
<link name="${prefix}robotiq_85_left_knuckle_link">
4547
<visual>
4648
<geometry>
47-
<mesh filename="package://robotiq_description/meshes/visual/left_knuckle.dae" />
49+
<mesh filename="file://$(find robotiq_description)/meshes/visual/left_knuckle.dae" />
4850
</geometry>
4951
</visual>
5052
<collision>
5153
<geometry>
52-
<mesh filename="package://robotiq_description/meshes/collision/left_knuckle.stl" />
54+
<mesh filename="file://$(find robotiq_description)/meshes/collision/left_knuckle.stl" />
5355
</geometry>
5456
</collision>
5557
<inertial>
@@ -62,12 +64,12 @@
6264
<link name="${prefix}robotiq_85_right_knuckle_link">
6365
<visual>
6466
<geometry>
65-
<mesh filename="package://robotiq_description/meshes/visual/right_knuckle.dae" />
67+
<mesh filename="file://$(find robotiq_description)/meshes/visual/right_knuckle.dae" />
6668
</geometry>
6769
</visual>
6870
<collision>
6971
<geometry>
70-
<mesh filename="package://robotiq_description/meshes/collision/right_knuckle.stl" />
72+
<mesh filename="file://$(find robotiq_description)/meshes/collision/right_knuckle.stl" />
7173
</geometry>
7274
</collision>
7375
<inertial>
@@ -80,12 +82,12 @@
8082
<link name="${prefix}robotiq_85_left_finger_link">
8183
<visual>
8284
<geometry>
83-
<mesh filename="package://robotiq_description/meshes/visual/left_finger.dae" />
85+
<mesh filename="file://$(find robotiq_description)/meshes/visual/left_finger.dae" />
8486
</geometry>
8587
</visual>
8688
<collision>
8789
<geometry>
88-
<mesh filename="package://robotiq_description/meshes/collision/left_finger.stl" />
90+
<mesh filename="file://$(find robotiq_description)/meshes/collision/left_finger.stl" />
8991
</geometry>
9092
</collision>
9193
<inertial>
@@ -98,12 +100,12 @@
98100
<link name="${prefix}robotiq_85_right_finger_link">
99101
<visual>
100102
<geometry>
101-
<mesh filename="package://robotiq_description/meshes/visual/right_finger.dae" />
103+
<mesh filename="file://$(find robotiq_description)/meshes/visual/right_finger.dae" />
102104
</geometry>
103105
</visual>
104106
<collision>
105107
<geometry>
106-
<mesh filename="package://robotiq_description/meshes/collision/right_finger.stl" />
108+
<mesh filename="file://$(find robotiq_description)/meshes/collision/right_finger.stl" />
107109
</geometry>
108110
</collision>
109111
<inertial>
@@ -116,12 +118,12 @@
116118
<link name="${prefix}robotiq_85_left_inner_knuckle_link">
117119
<visual>
118120
<geometry>
119-
<mesh filename="package://robotiq_description/meshes/visual/left_inner_knuckle.dae" />
121+
<mesh filename="file://$(find robotiq_description)/meshes/visual/left_inner_knuckle.dae" />
120122
</geometry>
121123
</visual>
122124
<collision>
123125
<geometry>
124-
<mesh filename="package://robotiq_description/meshes/collision/left_inner_knuckle.stl" />
126+
<mesh filename="file://$(find robotiq_description)/meshes/collision/left_inner_knuckle.stl" />
125127
</geometry>
126128
</collision>
127129
<inertial>
@@ -134,12 +136,12 @@
134136
<link name="${prefix}robotiq_85_right_inner_knuckle_link">
135137
<visual>
136138
<geometry>
137-
<mesh filename="package://robotiq_description/meshes/visual/right_inner_knuckle.dae" />
139+
<mesh filename="file://$(find robotiq_description)/meshes/visual/right_inner_knuckle.dae" />
138140
</geometry>
139141
</visual>
140142
<collision>
141143
<geometry>
142-
<mesh filename="package://robotiq_description/meshes/collision/right_inner_knuckle.stl" />
144+
<mesh filename="file://$(find robotiq_description)/meshes/collision/right_inner_knuckle.stl" />
143145
</geometry>
144146
</collision>
145147
<inertial>
@@ -152,12 +154,12 @@
152154
<link name="${prefix}robotiq_85_left_finger_tip_link">
153155
<visual>
154156
<geometry>
155-
<mesh filename="package://robotiq_description/meshes/visual/left_finger_tip.dae" />
157+
<mesh filename="file://$(find robotiq_description)/meshes/visual/left_finger_tip.dae" />
156158
</geometry>
157159
</visual>
158160
<collision>
159161
<geometry>
160-
<mesh filename="package://robotiq_description/meshes/collision/left_finger_tip.stl" />
162+
<mesh filename="file://$(find robotiq_description)/meshes/collision/left_finger_tip.stl" />
161163
</geometry>
162164
<surface>
163165
<friction>
@@ -188,12 +190,12 @@
188190
<link name="${prefix}robotiq_85_right_finger_tip_link">
189191
<visual>
190192
<geometry>
191-
<mesh filename="package://robotiq_description/meshes/visual/right_finger_tip.dae" />
193+
<mesh filename="file://$(find robotiq_description)/meshes/visual/right_finger_tip.dae" />
192194
</geometry>
193195
</visual>
194196
<collision>
195197
<geometry>
196-
<mesh filename="package://robotiq_description/meshes/collision/right_finger_tip.stl" />
198+
<mesh filename="file://$(find robotiq_description)/meshes/collision/right_finger_tip.stl" />
197199
</geometry>
198200
<surface>
199201
<friction>

0 commit comments

Comments
 (0)