Advertisement
Guest User

model_ddrcustom.urdf

a guest
Jun 3rd, 2020
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.00 KB | None | 0 0
  1. <?xml version="1.0" ?>
  2. <!-- =================================================================================== -->
  3. <!-- | This document was autogenerated by xacro from diff_wheeled_robot.xacro | -->
  4. <!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
  5. <!-- =================================================================================== -->
  6. <robot name="differential_wheeled_robot" xmlns:xacro="http://www.ros.org/wiki/xacro">
  7. <!-- Wheels -->
  8. <!-- in kg-->
  9. <!-- Defining the colors used in this robot -->
  10. <material name="Black">
  11. <color rgba="0.0 0.0 0.0 1.0"/>
  12. </material>
  13. <material name="Red">
  14. <color rgba="0.8 0.0 0.0 1.0"/>
  15. </material>
  16. <material name="White">
  17. <color rgba="1.0 1.0 1.0 1.0"/>
  18. </material>
  19. <material name="Blue">
  20. <color rgba="0.0 0.0 0.8 1.0"/>
  21. </material>
  22. <!-- PROPERTY LIST -->
  23. <!--All units in m-kg-s-radians unit system -->
  24. <!-- Main body radius and height -->
  25. <!-- Main Body Cylinder base -->
  26. <!-- in kg-->
  27. <!-- caster wheel radius and height -->
  28. <!-- caster wheel mass -->
  29. <!-- in kg-->
  30. <!-- caster wheel radius and height -->
  31. <!-- caster wheel mass -->
  32. <!-- in kg-->
  33. <!-- Wheels -->
  34. --&gt;
  35. <!-- in kg-->
  36. <!-- Hokuyo Laser scanner -->
  37. <!-- Macro for calculating inertia of cylinder -->
  38. <!-- BASE-FOOTPRINT -->
  39. <!-- base_footprint is a fictitious link(frame) that is on the ground right below base_link origin -->
  40. <link name="base_footprint">
  41. <inertial>
  42. <mass value="0.0001"/>
  43. <origin xyz="0 0 0"/>
  44. <inertia ixx="0.0001" ixy="0.0" ixz="0.0" iyy="0.0001" iyz="0.0" izz="0.0001"/>
  45. </inertial>
  46. <visual>
  47. <origin rpy="0 0 0" xyz="0 0 0"/>
  48. <geometry>
  49. <box size="0.001 0.001 0.001"/>
  50. </geometry>
  51. </visual>
  52. </link>
  53. <gazebo reference="base_footprint">
  54. <turnGravityOff>false</turnGravityOff>
  55. </gazebo>
  56. <joint name="base_footprint_joint" type="fixed">
  57. <origin rpy="0 0 0" xyz="0 0 0.04"/>
  58. <parent link="base_footprint"/>
  59. <child link="base_link"/>
  60. </joint>
  61. <!-- BASE-LINK -->
  62. <!--Actual body/chassis of the robot-->
  63. <link name="base_link">
  64. <inertial>
  65. <mass value="5"/>
  66. <origin xyz="0 0 0"/>
  67. <!--The 3x3 rotational inertia matrix. -->
  68. <inertia ixx="0.0282916666667" ixy="0" ixz="0" iyy="0.0282916666667" iyz="0" izz="0.05625"/>
  69. </inertial>
  70. <visual>
  71. <origin rpy="0 0 0" xyz="0 0 0"/>
  72. <geometry>
  73. <cylinder length="0.02" radius="0.15"/>
  74. </geometry>
  75. <material name="White"/>
  76. </visual>
  77. <collision>
  78. <origin rpy="0 0 0 " xyz="0 0 0"/>
  79. <geometry>
  80. <cylinder length="0.02" radius="0.15"/>
  81. </geometry>
  82. </collision>
  83. </link>
  84. <gazebo reference="base_link">
  85. <material>Gazebo/White</material>
  86. <turnGravityOff>false</turnGravityOff>
  87. </gazebo>
  88. <!--fb : front, back ; lr: left, right -->
  89. <link name="front_right_wheel">
  90. <visual>
  91. <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
  92. <geometry>
  93. <cylinder length="0.02" radius="0.04"/>
  94. </geometry>
  95. <material name="Black"/>
  96. </visual>
  97. <collision>
  98. <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
  99. <geometry>
  100. <cylinder length="0.02" radius="0.04"/>
  101. </geometry>
  102. </collision>
  103. <inertial>
  104. <mass value="2.5"/>
  105. <origin xyz="0 0 0"/>
  106. <inertia ixx="0.00108333333333" ixy="0" ixz="0" iyy="0.00108333333333" iyz="0" izz="0.002"/>
  107. </inertial>
  108. </link>
  109. <gazebo reference="front_right_wheel">
  110. <mu1 value="1.0"/>
  111. <mu2 value="1.0"/>
  112. <kp value="10000000.0"/>
  113. <kd value="1.0"/>
  114. <fdir1 value="1 0 0"/>
  115. <material>Gazebo/Grey</material>
  116. <turnGravityOff>false</turnGravityOff>
  117. </gazebo>
  118. <joint name="front_right_wheel_joint" type="continuous">
  119. <parent link="base_link"/>
  120. <child link="front_right_wheel"/>
  121. <origin rpy="0 0 0" xyz="0.0 0.15 0.0"/>
  122. <axis rpy="0 0" xyz="0 1 0"/>
  123. <limit effort="100" velocity="100"/>
  124. <joint_properties damping="0.0" friction="0.0"/>
  125. </joint>
  126. <!-- Transmission is important to link the joints and the controller -->
  127. <transmission name="front_right_wheel_joint_trans">
  128. <type>transmission_interface/SimpleTransmission</type>
  129. <joint name="front_right_wheel_joint"/>
  130. <actuator name="front_right_wheel_joint_motor">
  131. <hardwareInterface>EffortJointInterface</hardwareInterface>
  132. <mechanicalReduction>1</mechanicalReduction>
  133. </actuator>
  134. </transmission>
  135. <!--fb : front, back ; lr: left, right -->
  136. <link name="front_left_wheel">
  137. <visual>
  138. <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
  139. <geometry>
  140. <cylinder length="0.02" radius="0.04"/>
  141. </geometry>
  142. <material name="Black"/>
  143. </visual>
  144. <collision>
  145. <origin rpy="1.57079632679 0 0 " xyz="0 0 0"/>
  146. <geometry>
  147. <cylinder length="0.02" radius="0.04"/>
  148. </geometry>
  149. </collision>
  150. <inertial>
  151. <mass value="2.5"/>
  152. <origin xyz="0 0 0"/>
  153. <inertia ixx="0.00108333333333" ixy="0" ixz="0" iyy="0.00108333333333" iyz="0" izz="0.002"/>
  154. </inertial>
  155. </link>
  156. <gazebo reference="front_left_wheel">
  157. <mu1 value="1.0"/>
  158. <mu2 value="1.0"/>
  159. <kp value="10000000.0"/>
  160. <kd value="1.0"/>
  161. <fdir1 value="1 0 0"/>
  162. <material>Gazebo/Grey</material>
  163. <turnGravityOff>false</turnGravityOff>
  164. </gazebo>
  165. <joint name="front_left_wheel_joint" type="continuous">
  166. <parent link="base_link"/>
  167. <child link="front_left_wheel"/>
  168. <origin rpy="0 0 0" xyz="0.0 -0.15 0.0"/>
  169. <axis rpy="0 0" xyz="0 1 0"/>
  170. <limit effort="100" velocity="100"/>
  171. <joint_properties damping="0.0" friction="0.0"/>
  172. </joint>
  173. <!-- Transmission is important to link the joints and the controller -->
  174. <transmission name="front_left_wheel_joint_trans">
  175. <type>transmission_interface/SimpleTransmission</type>
  176. <joint name="front_left_wheel_joint"/>
  177. <actuator name="front_left_wheel_joint_motor">
  178. <hardwareInterface>EffortJointInterface</hardwareInterface>
  179. <mechanicalReduction>1</mechanicalReduction>
  180. </actuator>
  181. </transmission>
  182. <!--Caster front -->
  183. <link name="caster_front_link">
  184. <visual>
  185. <origin rpy="1.57079632679 0 0" xyz="0 0.02 0"/>
  186. <geometry>
  187. <sphere radius="0.025"/>
  188. </geometry>
  189. <material name="Black"/>
  190. </visual>
  191. <collision>
  192. <geometry>
  193. <sphere radius="0.025"/>
  194. </geometry>
  195. <origin rpy="1.57079632679 0 0" xyz="0 0.02 0"/>
  196. </collision>
  197. <inertial>
  198. <mass value="0.5"/>
  199. <origin xyz="0 0 0"/>
  200. <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
  201. </inertial>
  202. </link>
  203. <joint name="caster_front_joint" type="fixed">
  204. <parent link="base_link"/>
  205. <child link="caster_front_link"/>
  206. <origin rpy="-1.57079632679 0 0" xyz="0.115 0.0 0.007"/>
  207. </joint>
  208. <gazebo reference="caster_front_link">
  209. <turnGravityOff>false</turnGravityOff>
  210. </gazebo>
  211. <!--Caster back -->
  212. <link name="caster_back_link">
  213. <visual>
  214. <origin rpy="1.57079632679 0 0" xyz="0.02 0.02 0 "/>
  215. <geometry>
  216. <sphere radius="0.025"/>
  217. </geometry>
  218. <material name="Black"/>
  219. </visual>
  220. <collision>
  221. <geometry>
  222. <sphere radius="0.025"/>
  223. </geometry>
  224. <origin rpy="1.57079632679 0 0" xyz="0 0.02 0 "/>
  225. </collision>
  226. <inertial>
  227. <mass value="0.5"/>
  228. <origin xyz="0 0 0"/>
  229. <inertia ixx="0.001" ixy="0.0" ixz="0.0" iyy="0.001" iyz="0.0" izz="0.001"/>
  230. </inertial>
  231. </link>
  232. <joint name="caster_back_joint" type="fixed">
  233. <parent link="base_link"/>
  234. <child link="caster_back_link"/>
  235. <origin rpy="-1.57079632679 0 0" xyz="-0.135 0.0 0.009"/>
  236. </joint>
  237. <gazebo reference="caster_back_link">
  238. <turnGravityOff>false</turnGravityOff>
  239. </gazebo>
  240. <!-- SENSORS -->
  241. <!-- hokuyo -->
  242. <link name="hokuyo_link">
  243. <visual>
  244. <origin rpy="0 0 0" xyz="0 0 0"/>
  245. <geometry>
  246. <box size="0.05 0.05 0.05"/>
  247. </geometry>
  248. <material name="Blue"/>
  249. </visual>
  250. </link>
  251. <joint name="hokuyo_joint" type="fixed">
  252. <origin rpy="0 0 0" xyz="0.125 0 0.0325"/>
  253. <parent link="base_link"/>
  254. <child link="hokuyo_link"/>
  255. </joint>
  256. <gazebo reference="hokuyo_link">
  257. <material>Gazebo/Blue</material>
  258. <turnGravityOff>false</turnGravityOff>
  259. <sensor name="head_hokuyo_sensor" type="ray">
  260. <pose>0.025 0 0 0 0 0</pose>
  261. <visualize>false</visualize>
  262. <update_rate>40</update_rate>
  263. <ray>
  264. <scan>
  265. <horizontal>
  266. <samples>720</samples>
  267. <resolution>1</resolution>
  268. <min_angle>-1.570796</min_angle>
  269. <max_angle>1.570796</max_angle>
  270. </horizontal>
  271. </scan>
  272. <range>
  273. <min>0.10</min>
  274. <max>10.0</max>
  275. <resolution>0.001</resolution>
  276. </range>
  277. </ray>
  278. <plugin filename="libgazebo_ros_laser.so" name="gazebo_ros_head_hokuyo_controller">
  279. <topicName>/scan</topicName>
  280. <frameName>hokuyo_link</frameName>
  281. </plugin>
  282. </sensor>
  283. </gazebo>
  284. <!-- Differential drive controller -->
  285. <gazebo>
  286. <plugin filename="libgazebo_ros_diff_drive.so" name="differential_drive_controller_front">
  287. <rosDebugLevel>Debug</rosDebugLevel>
  288. <publishWheelTF>True</publishWheelTF>
  289. <publishTf>1</publishTf>
  290. <publishWheelJointState>true</publishWheelJointState>
  291. <alwaysOn>true</alwaysOn>
  292. <updateRate>100.0</updateRate>
  293. <leftJoint>front_left_wheel_joint</leftJoint>
  294. <rightJoint>front_right_wheel_joint</rightJoint>
  295. <wheelSeparation>0.3</wheelSeparation>
  296. <wheelDiameter>0.08</wheelDiameter>
  297. <broadcastTF>1</broadcastTF>
  298. <wheelTorque>30</wheelTorque>
  299. <wheelAcceleration>1.8</wheelAcceleration>
  300. <commandTopic>cmd_vel</commandTopic>
  301. <odometryFrame>odom</odometryFrame>
  302. <odometryTopic>odom</odometryTopic>
  303. <robotBaseFrame>base_link</robotBaseFrame>
  304. </plugin>
  305. </gazebo>
  306. <!--
  307. <gazebo>
  308. <plugin name="kobuki_controller" filename="libgazebo_ros_kobuki.so">
  309. <publish_tf>1</publish_tf>
  310. <left_wheel_joint_name>front_left_wheel_joint</left_wheel_joint_name>
  311. <right_wheel_joint_name>front_right_wheel_joint</right_wheel_joint_name>
  312. <wheel_separation>.30</wheel_separation>
  313. <wheel_diameter>0.08</wheel_diameter>
  314. <torque>30.0</torque>
  315. <velocity_command_timeout>0.6</velocity_command_timeout>
  316. </plugin>
  317. </gazebo>
  318. -->
  319. <!--
  320. <gazebo>
  321. <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so" />
  322. <plugin filename="libgazebo_ros_joint_state_publisher.so" name="joint_state_publisher">
  323. <jointName>front_right_wheel_joint, front_left_wheel_joint</jointName>
  324. <updateRate>10.0</updateRate>
  325. <alwaysOn>true</alwaysOn>
  326. </plugin>
  327. </gazebo>
  328. -->
  329. </robot>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement