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"/>
25 <mesh filename="package://wild_thumper/meshes/wild_thumper_4wd.stl" />
30 <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>
34 <link name="base_imu_link">
37 <box size="0.041 0.028 0.002"/>
40 <color rgba="1 0 0 1"/>
45 <link name="mounting_plate">
48 <box size="0.23 0.12 0.001"/>
53 <xacro:asus_camera name="camera" parent="mounting_plate">
54 <origin xyz="0.107 0.0 0.04" rpy="0 0 0"/>
57 <link name="sonar_forward">
60 <box size="0.016 0.044 0.02"/>
62 <origin xyz="${0.016/2} 0 0" rpy="0 0 0"/>
63 <material name="green">
64 <color rgba="0 1 0 0.8"/>
69 <link name="sonar_backward">
72 <box size="0.016 0.044 0.02"/>
74 <origin xyz="${0.016/2} 0 0" rpy="0 0 0"/>
75 <material name="green">
76 <color rgba="0 1 0 0.8"/>
84 <box size="0.015 0.015 0.046"/>
86 <origin xyz="${-0.015/2} 0 0" rpy="0 0 0"/>
87 <material name="black">
88 <color rgba="0 0 0 1"/>
93 <link name="ir_right">
96 <box size="0.015 0.015 0.046"/>
98 <origin xyz="${-0.015/2} 0 0" rpy="0 0 0"/>
99 <material name="black">
100 <color rgba="0 0 0 1"/>
105 <joint name="base_link_joint" type="fixed">
106 <parent link="base_footprint"/>
107 <child link="base_link"/>
108 <origin xyz="0.0 0.0 0.082" rpy="0 0 0"/>
111 <joint name="mounting_plate_joint" type="fixed">
112 <parent link="base_link"/>
113 <child link="mounting_plate"/>
114 <origin xyz="0.0 0.0 0.044" rpy="0 0 0"/>
117 <joint name="imu_joint" type="fixed">
118 <parent link="mounting_plate"/>
119 <child link="base_imu_link"/>
120 <origin xyz="0.06 -0.03 0.058" rpy="0 0 0"/>
123 <joint name="sonar_forward_joint" type="fixed">
124 <parent link="mounting_plate"/>
125 <child link="sonar_forward"/>
126 <origin xyz="0.115 0.0 -0.012" rpy="0 0 0"/>
129 <joint name="sonar_backward_joint" type="fixed">
130 <parent link="mounting_plate"/>
131 <child link="sonar_backward"/>
132 <origin xyz="-0.115 0.0 -0.012" rpy="0 ${PI} 0"/>
135 <joint name="ir_left_joint" type="fixed">
136 <parent link="mounting_plate"/>
137 <child link="ir_left"/>
138 <origin xyz="0.0 ${0.072+0.015} -0.045" rpy="0 0 ${PI/2}"/>
141 <joint name="ir_right_joint" type="fixed">
142 <parent link="mounting_plate"/>
143 <child link="ir_right"/>
144 <origin xyz="0.0 ${-0.072-0.015} -0.045" rpy="0 0 ${-PI/2}"/>
147 <xacro:macro name="wheel" params="pos side xyz rpy">
148 <link name="${pos}_${side}_wheel">
150 <origin xyz="0 0 0" rpy="0 0 0"/>
152 <mesh filename="package://wild_thumper/meshes/wheel_${side}.stl" />
156 <origin xyz="0 0 0" rpy="${-PI/2} 0 0"/>
158 <cylinder radius="0.06" length="0.06"/>
162 <origin xyz="0 0 0" rpy="0 0 0"/>
164 <inertia ixx="0.01" ixy="0" ixz="0" iyy="0.01" iyz="0" izz="0.01"/>
167 <joint name="${pos}_${side}_wheel_joint" type="continuous">
168 <parent link="base_link"/>
169 <child link="${pos}_${side}_wheel"/>
171 <origin xyz="${xyz}" rpy="${rpy}"/>
174 <transmission name="${pos}_${side}_wheel_trans" type="SimpleTransmission">
175 <type>transmission_interface/SimpleTransmission</type>
176 <joint name="${pos}_${side}_wheel_joint">
177 <hardwareInterface>VelocityJointInterface</hardwareInterface>
179 <actuator name="{pos}_${side}_wheel_motor">
180 <hardwareInterface>VelocityJointInterface</hardwareInterface>
181 <mechanicalReduction>1</mechanicalReduction>
186 <xacro:wheel pos="rear" side="left" xyz="-0.06398 0.114 -0.022446" rpy="0 0 0" />
187 <xacro:wheel pos="rear" side="right" xyz="-0.07397 -0.114 -0.022446" rpy="0 0 0" />
188 <xacro:wheel pos="front" side="left" xyz="0.07602 0.114 -0.022446" rpy="0 0 0" />
189 <xacro:wheel pos="front" side="right" xyz="0.07397 -0.114 -0.022446" rpy="0 0 0" />
192 <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
193 <robotNamespace>/</robotNamespace>
194 <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
197 <plugin name="imu_controller" filename="libgazebo_ros_imu.so">
198 <alwaysOn>true</alwaysOn>
199 <updateRate>20.0</updateRate>
200 <bodyName>base_imu_link</bodyName>
201 <topicName>imu</topicName>
202 <gaussianNoise>0.05</gaussianNoise>
203 <frameName>base_imu_link</frameName>
204 <xyzOffsets>0 0 0</xyzOffsets>
205 <rpyOffset>0 0 0</rpyOffset>
209 <xacro:macro name="range_sensor" params="name ros_topic update_rate minRange maxRange fov radiation">
210 <gazebo reference="${name}">
211 <sensor type="ray" name="${name}_sensor">
212 <pose>0 0 0 0 0 0</pose>
213 <update_rate>${update_rate}</update_rate>
214 <visualize>false</visualize>
219 <resolution>1</resolution>
220 <min_angle>-${fov/2}</min_angle>
221 <max_angle>${fov/2}</max_angle>
225 <resolution>1</resolution>
226 <min_angle>-${fov/2}</min_angle>
227 <max_angle>${fov/2}</max_angle>
231 <min>${minRange}</min>
232 <max>${maxRange}</max>
233 <resolution>0.01</resolution>
236 <plugin filename="libgazebo_ros_range.so" name="gazebo_ros_range">
237 <gaussianNoise>0.005</gaussianNoise>
238 <alwaysOn>true</alwaysOn>
239 <updateRate>${update_rate}</updateRate>
240 <topicName>${ros_topic}</topicName>
241 <frameName>${name}</frameName>
243 <radiation>${radiation}</radiation>
249 <xacro:range_sensor name="sonar_forward" ros_topic="range_forward" update_rate="10" minRange="0.04" maxRange="6" fov="${30*PI/180}" radiation="ultrasound" />
250 <xacro:range_sensor name="sonar_backward" ros_topic="range_backward" update_rate="10" minRange="0.04" maxRange="6" fov="${30*PI/180}" radiation="ultrasound" />
251 <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" />
252 <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" />