2 <robot name="wild_thumper" xmlns:xacro="http://ros.org/wiki/xacro">
3 <xacro:property name="PI" value="3.1415926535897931" />
4 <xacro:include filename="$(find hector_sensors_description)/urdf/asus_camera.urdf.xacro" />
6 <link name="base_footprint">
9 <box size="0.28 0.31 0.000001"/>
11 <material name="grey">
12 <color rgba="0.5 0.5 0.5 0.5"/>
17 <link name="base_link">
20 <box size="0.23 0.18 0.09"/>
24 <origin xyz="-0.00275 0 0" rpy="0 0 0"/>
26 <mesh filename="package://wild_thumper/meshes/wild_thumper_4wd.stl" />
30 <origin xyz="-0.00275 0 -0.02" rpy="0 0 0"/>
32 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
36 <link name="base_imu_link">
39 <box size="0.041 0.028 0.002"/>
42 <color rgba="1 0 0 1"/>
47 <link name="mounting_plate">
50 <box size="0.23 0.12 0.001"/>
55 <xacro:asus_camera name="camera" parent="mounting_plate">
56 <origin xyz="0.107 0.0 0.04" rpy="0 0 0"/>
59 <link name="sonar_forward_left">
62 <box size="0.016 0.044 0.02"/>
64 <origin xyz="${0.016/2} 0 0" rpy="0 0 0"/>
65 <material name="green">
66 <color rgba="0 1 0 0.8"/>
71 <link name="sonar_forward_right">
74 <box size="0.016 0.044 0.02"/>
76 <origin xyz="${0.016/2} 0 0" rpy="0 0 0"/>
77 <material name="green">
78 <color rgba="0 1 0 0.8"/>
83 <link name="sonar_backward">
86 <box size="0.016 0.044 0.02"/>
88 <origin xyz="${0.016/2} 0 0" rpy="0 0 0"/>
89 <material name="green">
90 <color rgba="0 1 0 0.8"/>
98 <box size="0.015 0.015 0.046"/>
100 <origin xyz="${-0.015/2} 0 0" rpy="0 0 0"/>
101 <material name="black">
102 <color rgba="0 0 0 1"/>
107 <link name="ir_right">
110 <box size="0.015 0.015 0.046"/>
112 <origin xyz="${-0.015/2} 0 0" rpy="0 0 0"/>
113 <material name="black">
114 <color rgba="0 0 0 1"/>
119 <joint name="base_link_joint" type="fixed">
120 <parent link="base_footprint"/>
121 <child link="base_link"/>
122 <origin xyz="0.0 0.0 0.082" rpy="0 0 0"/>
125 <joint name="mounting_plate_joint" type="fixed">
126 <parent link="base_link"/>
127 <child link="mounting_plate"/>
128 <origin xyz="0.0 0.0 0.044" rpy="0 0 0"/>
131 <joint name="imu_joint" type="fixed">
132 <parent link="mounting_plate"/>
133 <child link="base_imu_link"/>
134 <origin xyz="0.06 -0.03 0.058" rpy="0 0 0"/>
137 <joint name="sonar_forward_left_joint" type="fixed">
138 <parent link="mounting_plate"/>
139 <child link="sonar_forward_left"/>
140 <origin xyz="0.115 0.05 -0.012" rpy="0 ${-5*PI/180} 0"/>
143 <joint name="sonar_forward_right_joint" type="fixed">
144 <parent link="mounting_plate"/>
145 <child link="sonar_forward_right"/>
146 <origin xyz="0.115 -0.05 -0.012" rpy="0 ${-5*PI/180} 0"/>
149 <joint name="sonar_backward_joint" type="fixed">
150 <parent link="mounting_plate"/>
151 <child link="sonar_backward"/>
152 <origin xyz="-0.115 0.0 -0.012" rpy="0 ${-175*PI/180} 0"/>
155 <joint name="ir_left_joint" type="fixed">
156 <parent link="mounting_plate"/>
157 <child link="ir_left"/>
158 <origin xyz="0.0 ${0.072+0.015} -0.045" rpy="0 0 ${PI/2}"/>
161 <joint name="ir_right_joint" type="fixed">
162 <parent link="mounting_plate"/>
163 <child link="ir_right"/>
164 <origin xyz="0.0 ${-0.072-0.015} -0.045" rpy="0 0 ${-PI/2}"/>
167 <xacro:macro name="wheel" params="pos side xyz rpy">
168 <link name="${pos}_${side}_wheel">
170 <origin xyz="0 0 0" rpy="0 0 0"/>
172 <mesh filename="package://wild_thumper/meshes/wheel_${side}.stl" />
176 <origin xyz="0 0 0" rpy="${-PI/2} 0 0"/>
178 <cylinder radius="0.06" length="0.06"/>
182 <origin xyz="0 0 0" rpy="0 0 0"/>
184 <inertia ixx="0.005" ixy="0" ixz="0" iyy="0.005" iyz="0" izz="0.005"/>
188 <gazebo reference="${pos}_${side}_wheel">
191 <kp value="1000000.0" />
193 <fdir1 value="1 0 0"/>
196 <joint name="${pos}_${side}_wheel_joint" type="continuous">
197 <parent link="base_link"/>
198 <child link="${pos}_${side}_wheel"/>
200 <origin xyz="${xyz}" rpy="${rpy}"/>
203 <transmission name="${pos}_${side}_wheel_trans" type="SimpleTransmission">
204 <type>transmission_interface/SimpleTransmission</type>
205 <joint name="${pos}_${side}_wheel_joint">
206 <hardwareInterface>VelocityJointInterface</hardwareInterface>
208 <actuator name="{pos}_${side}_wheel_motor">
209 <mechanicalReduction>1</mechanicalReduction>
214 <xacro:wheel pos="rear" side="left" xyz="-0.07525 0.12 -0.025" rpy="${-5*PI/180} 0 0" />
215 <xacro:wheel pos="rear" side="right" xyz="-0.07525 -0.12 -0.025" rpy="${5*PI/180} 0 0" />
216 <xacro:wheel pos="front" side="left" xyz=" 0.07525 0.12 -0.025" rpy="${-5*PI/180} 0 0" />
217 <xacro:wheel pos="front" side="right" xyz=" 0.07525 -0.12 -0.025" rpy="${5*PI/180} 0 0" />
220 <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
221 <robotNamespace>/</robotNamespace>
222 <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
225 <plugin name="imu_controller" filename="libgazebo_ros_imu.so">
226 <alwaysOn>true</alwaysOn>
227 <updateRate>20.0</updateRate>
228 <bodyName>base_imu_link</bodyName>
229 <topicName>imu</topicName>
230 <gaussianNoise>0.05</gaussianNoise>
231 <frameName>base_imu_link</frameName>
232 <xyzOffsets>0 0 0</xyzOffsets>
233 <rpyOffset>0 0 0</rpyOffset>
234 <serviceName>/default_imu</serviceName>
238 <xacro:macro name="range_sensor" params="name ros_topic update_rate minRange maxRange fov radiation">
239 <gazebo reference="${name}">
240 <sensor type="ray" name="${name}_sensor">
241 <pose>0 0 0 0 0 0</pose>
242 <update_rate>${update_rate}</update_rate>
243 <visualize>false</visualize>
248 <resolution>1</resolution>
249 <min_angle>-${fov/2}</min_angle>
250 <max_angle>${fov/2}</max_angle>
254 <resolution>1</resolution>
255 <min_angle>-${fov/2}</min_angle>
256 <max_angle>${fov/2}</max_angle>
260 <min>${minRange}</min>
261 <max>${maxRange}</max>
262 <resolution>0.01</resolution>
265 <plugin filename="libgazebo_ros_range.so" name="gazebo_ros_range">
266 <gaussianNoise>0.005</gaussianNoise>
267 <alwaysOn>true</alwaysOn>
268 <updateRate>${update_rate}</updateRate>
269 <topicName>${ros_topic}</topicName>
270 <frameName>${name}</frameName>
272 <radiation>${radiation}</radiation>
278 <xacro:range_sensor name="sonar_forward" ros_topic="range_forward" update_rate="10" minRange="0.04" maxRange="0.5" fov="${20*PI/180}" radiation="ultrasound" />
279 <xacro:range_sensor name="sonar_backward" ros_topic="range_backward" update_rate="10" minRange="0.04" maxRange="0.5" fov="${20*PI/180}" radiation="ultrasound" />
280 <xacro:range_sensor name="ir_left" ros_topic="range_left" update_rate="10" minRange="0.04" maxRange="0.3" fov="${5*PI/180}" radiation="infrared" />
281 <xacro:range_sensor name="ir_right" ros_topic="range_right" update_rate="10" minRange="0.04" maxRange="0.3" fov="${5*PI/180}" radiation="infrared" />