Skip to content

Commit 29907b9

Browse files
committed
Fix errors in turtlebot3
1 parent ba2c3cb commit 29907b9

2 files changed

Lines changed: 26 additions & 36 deletions

File tree

CustomRobots/turtlebot3/models/turtlebot3/turtlebot3_common.urdf.xacro

Lines changed: 25 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
<xacro:include filename="$(find custom_robots)/models/turtlebot3/turtlebot3_gz.urdf.xacro"/>
44

55
<xacro:macro name="turtlebot3">
6+
<!-- Init colour -->
7+
<material name="black">
8+
<color rgba="0.0 0.0 0.0 1.0"/>
9+
</material>
10+
11+
<material name="dark">
12+
<color rgba="0.3 0.3 0.3 1.0"/>
13+
</material>
14+
15+
<material name="light_black">
16+
<color rgba="0.4 0.4 0.4 1.0"/>
17+
</material>
18+
19+
<material name="white">
20+
<color rgba="1.0 1.0 1.0 1.0"/>
21+
</material>
22+
623

724
<link name="base_footprint"></link>
825

@@ -20,30 +37,18 @@
2037
<visual >
2138
<origin rpy="0 0 0" xyz="-0.064 0 0"/>
2239
<geometry>
23-
<mesh filename="$(find custom_robots)/model/turtlebot3/meshes/waffle_base.dae" scale="0.001 0.001 0.001"/>
40+
<mesh filename="file://$(find custom_robots)/models/turtlebot3/meshes/waffle_base.dae" scale="0.001 0.001 0.001"/>
2441
</geometry>
25-
<gazebo>
26-
<material>
27-
<ambient>1 1 1 1</ambient>
28-
<diffuse>1 1 1 1</diffuse>
29-
<specular>0.2 0.2 0.2 1</specular>
30-
<emissive>0 0 0 1</emissive>
31-
<script>
32-
<name>Gazebo/Grey</name>
33-
</script>
34-
</material>
35-
</gazebo>
42+
<material name="light_black"/>
3643
</visual>
3744
</link>
3845

3946
<link name="wheel_left_link">
4047
<inertial>
41-
<origin rpy="-1.57 0 0" xyz="0.0 0.144 0.023"/>
4248
<mass value="0.1"/>
4349
<inertia ixx="1.1175580e-05" ixy="0" ixz="0" iyy="1.1175580e-05" iyz="0" izz="2.0712558e-05"/>
4450
</inertial>
4551
<collision>
46-
<origin rpy="-1.57 0 0" xyz="0.0 0.144 0.023"/>
4752
<geometry>
4853
<cylinder radius="0.033" length="0.018"/>
4954
</geometry>
@@ -73,29 +78,20 @@
7378
</gazebo>
7479
</collision>
7580
<visual >
76-
<origin rpy="0 0 0" xyz="0.0 0.144 0.023"/>
81+
<origin rpy="1.57 0 0" xyz="0 0 0"/>
7782
<geometry>
78-
<mesh filename="$(find custom_robots)/model/turtlebot3/meshes/tire.dae" scale="0.001 0.001 0.001"/>
83+
<mesh filename="file://$(find custom_robots)/models/turtlebot3/meshes/tire.dae" scale="0.001 0.001 0.001"/>
7984
</geometry>
80-
<gazebo>
81-
<material>
82-
<ambient>1 1 1 1</ambient>
83-
<diffuse>1 1 1 1</diffuse>
84-
<specular>0.2 0.2 0.2 1</specular>
85-
<emissive>0 0 0 1</emissive>
86-
</material>
87-
</gazebo>
85+
<material name="black"/>
8886
</visual>
8987
</link>
9088

9189
<link name="wheel_right_link">
9290
<inertial>
93-
<origin rpy="-1.57 0 0" xyz="0.0 -0.144 0.023"/>
9491
<mass value="0.1"/>
9592
<inertia ixx="1.1175580e-05" ixy="0" ixz="0" iyy="1.1175580e-05" iyz="0" izz="2.0712558e-05"/>
9693
</inertial>
9794
<collision>
98-
<origin rpy="-1.57 0 0" xyz="0.0 -0.144 0.023"/>
9995
<geometry>
10096
<cylinder radius="0.033" length="0.018"/>
10197
</geometry>
@@ -125,18 +121,11 @@
125121
</gazebo>
126122
</collision>
127123
<visual >
128-
<origin rpy="0 0 0" xyz="0.0 -0.144 0.023"/>
124+
<origin rpy="1.57 0 0" xyz="0 0 0"/>
129125
<geometry>
130-
<mesh filename="$(find custom_robots)/model/turtlebot3/meshes/tire.dae" scale="0.001 0.001 0.001"/>
126+
<mesh filename="file://$(find custom_robots)/models/turtlebot3/meshes/tire.dae" scale="0.001 0.001 0.001"/>
131127
</geometry>
132-
<gazebo>
133-
<material>
134-
<ambient>1 1 1 1</ambient>
135-
<diffuse>1 1 1 1</diffuse>
136-
<specular>0.2 0.2 0.2 1</specular>
137-
<emissive>0 0 0 1</emissive>
138-
</material>
139-
</gazebo>
128+
<material name="black"/>
140129
</visual>
141130
</link>
142131

CustomRobots/turtlebot3/models/turtlebot3/turtlebot3_gz.urdf.xacro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@
100100
<geometry>
101101
<mesh filename="file://$(find custom_robots)/models/turtlebot3/meshes/lds.dae" scale="0.001 0.001 0.001"/>
102102
</geometry>
103+
<material name="dark"/>
103104
</visual>
104105
</link>
105106

0 commit comments

Comments
 (0)