Skip to content

Commit d2082e0

Browse files
committed
Test ball joints
1 parent 62dad51 commit d2082e0

2 files changed

Lines changed: 53 additions & 77 deletions

File tree

CustomRobots/turtlebot3/launch/turtlebot3.launch.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,25 @@ def launch_setup(context):
3131
# =========================
3232
# ROBOT DESCRIPTION (URDF)
3333
# =========================
34-
# xacro_file = os.path.join(
35-
# package_dir,
36-
# "model",
37-
# "turtlebot3",
38-
# "turtlebot3.urdf.xacro",
39-
# )
40-
41-
# robot_description_content = xacro.process_file(
42-
# xacro_file,
43-
# mappings={
44-
# "camera": "true" if sensor == "camera" else "false",
45-
# "noise_level": gz_noise.perform(context),
46-
# },
47-
# ).toxml()
34+
xacro_file = os.path.join(
35+
package_dir,
36+
"model",
37+
"turtlebot3",
38+
"turtlebot3.urdf.xacro",
39+
)
40+
41+
robot_description_content = xacro.process_file(
42+
xacro_file,
43+
mappings={
44+
"camera": "true" if sensor == "camera" else "false",
45+
"noise_level": gz_noise.perform(context),
46+
},
47+
).toxml()
4848

4949
## Temporary SDF load
50-
sdf_file = os.path.join(package_dir, 'models', 'turtlebot3', 'turtlebot3.sdf')
51-
with open(sdf_file, 'r') as infp:
52-
robot_description_content = infp.read()
50+
# sdf_file = os.path.join(package_dir, 'models', 'turtlebot3', 'turtlebot3.sdf')
51+
# with open(sdf_file, 'r') as infp:
52+
# robot_description_content = infp.read()
5353

5454
robot_description = {"robot_description": robot_description_content}
5555

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

Lines changed: 36 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -140,60 +140,6 @@
140140
</visual>
141141
</link>
142142

143-
<link name="caster_back_right_link">
144-
<origin rpy="-1.57 0 0" xyz="-0.177 -0.064 -0.004"/>
145-
<inertial>
146-
<mass value="0.001"/>
147-
<inertia ixx="0.00001" ixy="0" ixz="0" iyy="0.00001" iyz="0" izz="0.00001"/>
148-
</inertial>
149-
<collision>
150-
<geometry>
151-
<sphere radius="0.005"/>
152-
</geometry>
153-
<gazebo>
154-
<surface>
155-
<contact>
156-
<ode>
157-
<soft_cfm>0</soft_cfm>
158-
<soft_erp>0.2</soft_erp>
159-
<kp>1e+5</kp>
160-
<kd>1</kd>
161-
<max_vel>0.01</max_vel>
162-
<min_depth>0.001</min_depth>
163-
</ode>
164-
</contact>
165-
</surface>
166-
</gazebo>
167-
</collision>
168-
</link>
169-
170-
<link name="caster_back_left_link">
171-
<origin rpy="-1.57 0 0" xyz="-0.177 0.064 -0.004"/>
172-
<inertial>
173-
<mass value="0.001"/>
174-
<inertia ixx="0.00001" ixy="0" ixz="0" iyy="0.00001" iyz="0" izz="0.00001"/>
175-
</inertial>
176-
<collision>
177-
<geometry>
178-
<sphere radius="0.005"/>
179-
</geometry>
180-
<gazebo>
181-
<surface>
182-
<contact>
183-
<ode>
184-
<soft_cfm>0</soft_cfm>
185-
<soft_erp>0.2</soft_erp>
186-
<kp>1e+5</kp>
187-
<kd>1</kd>
188-
<max_vel>0.01</max_vel>
189-
<min_depth>0.001</min_depth>
190-
</ode>
191-
</contact>
192-
</surface>
193-
</gazebo>
194-
</collision>
195-
</link>
196-
197143
<link name="camera_link"/>
198144

199145
<joint name="base_to_base_link" type="fixed">
@@ -227,18 +173,48 @@
227173
</joint>
228174

229175
<!-- Ball joints -->
230-
<joint name="caster_back_right_joint" type="continuous">
176+
<joint name="caster_back_left_joint" type="fixed">
231177
<parent link="base_link"/>
232-
<child link="caster_back_right_link"/>
233-
<limit effort="20" velocity="100"/>
178+
<child link="caster_back_left_link"/>
179+
<origin xyz="-0.177 0.064 -0.004" rpy="-1.57 0 0"/>
234180
</joint>
235181

236-
<joint name="caster_back_left_joint" type="continuous">
182+
<link name="caster_back_left_link">
183+
<collision>
184+
<origin xyz="0 0.001 0" rpy="0 0 0"/>
185+
<geometry>
186+
<box size="0.030 0.009 0.020"/>
187+
</geometry>
188+
</collision>
189+
190+
<inertial>
191+
<origin xyz="0 0 0" />
192+
<mass value="0.005" />
193+
<inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001" />
194+
</inertial>
195+
</link>
196+
197+
<joint name="caster_back_right_joint" type="fixed">
237198
<parent link="base_link"/>
238-
<child link="caster_back_left_link"/>
239-
<limit effort="20" velocity="100"/>
199+
<child link="caster_back_right_link"/>
200+
<origin xyz="-0.177 -0.064 -0.004" rpy="-1.57 0 0"/>
240201
</joint>
241202

203+
<link name="caster_back_right_link">
204+
<collision>
205+
<origin xyz="0 0.001 0" rpy="0 0 0"/>
206+
<geometry>
207+
<box size="0.030 0.009 0.020"/>
208+
</geometry>
209+
</collision>
210+
211+
<inertial>
212+
<origin xyz="0 0 0" />
213+
<mass value="0.005" />
214+
<inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001" />
215+
</inertial>
216+
</link>
217+
242218
<xacro:imu parent="imu_link" topic="turtlebot3/imu" xyz="-0.032 0 0.068" rpy="0 0 0"/>
243219
<xacro:lidar xyz="-0.064 0 0.121" rpy="0 0 0" name="lidar" parent="base_link" topic="turtlebot3/laser/scan"/>
244220
<xacro:velocity topic="turtlebot3/cmd_vel"/>

0 commit comments

Comments
 (0)