pi_robot.xacro 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  1. <?xml version="1.0"?>
  2. <robot name="pi_robot"
  3. xmlns:sensor="http://playerstage.sourceforge.net/gazebo/xmlschema/#sensor"
  4. xmlns:controller="http://playerstage.sourceforge.net/gazebo/xmlschema/#controller"
  5. xmlns:interface="http://playerstage.sourceforge.net/gazebo/xmlschema/#interface"
  6. xmlns:xacro="http://ros.org/wiki/xacro">
  7. <property name="PI_ROBOT_SCALE" value="0.0254"/>
  8. <property name="MESH_SCALE" value="100"/>
  9. <property name="GROUND_CLEARANCE" value="0.073" />
  10. <xacro:include filename="$(find rbx1_description)/urdf/pi_robot_head.xacro" />
  11. <xacro:include filename="$(find rbx1_description)/urdf/pi_robot_arm.xacro" />
  12. <material name="Green">
  13. <color rgba="0.0 0.8 0.0 1.0"/>
  14. </material>
  15. <material name="OffWhite">
  16. <color rgba="0.8 0.8 0.8 0.9"/>
  17. </material>
  18. <!-- base_footprint is a fictitious link(frame) that is on the ground right below base_link origin, navigation stack depends on this frame -->
  19. <!--
  20. <link name="base_footprint">
  21. <inertial>
  22. <mass value="0.0001" />
  23. <origin xyz="0 0 0" />
  24. <inertia ixx="0.0001" ixy="0.0" ixz="0.0"
  25. iyy="0.0001" iyz="0.0"
  26. izz="0.0001" />
  27. </inertial>
  28. <visual>
  29. <origin xyz="0 0 0" rpy="0 0 0" />
  30. <geometry>
  31. <box size="0.05 0.05 0.001" />
  32. </geometry>
  33. <material name="green">
  34. <color rgba="0.2 0.8 0.2 1.0"/>
  35. </material>
  36. </visual>
  37. <collision>
  38. <origin xyz="0 0 0" rpy="0 0 0" />
  39. <geometry>
  40. <box size="0.001 0.001 0.001" />
  41. </geometry>
  42. </collision>
  43. </link>
  44. -->
  45. <link name="base_link">
  46. <inertial>
  47. <mass value="5.0" />
  48. <origin xyz="0 0 0" />
  49. <inertia ixx="1.0" ixy="0.0" ixz="0.0"
  50. iyy="1.0" iyz="0.0"
  51. izz="1.0" />
  52. </inertial>
  53. <visual>
  54. <origin xyz="0 0 ${GROUND_CLEARANCE}" rpy="0 0 -1.57" />
  55. <geometry>
  56. <!--
  57. <cylinder length="0.3" radius=".15"/>
  58. -->
  59. <mesh filename="package://rbx1_description/meshes/pi_robot.dae" scale="${PI_ROBOT_SCALE} ${PI_ROBOT_SCALE} ${PI_ROBOT_SCALE}"/>
  60. </geometry>
  61. <material name="grey">
  62. <color rgba="0.1 0.1 0.1 10"/>
  63. </material>
  64. </visual>
  65. <collision>
  66. <origin xyz="0 0 0.16" rpy="0 0 0" />
  67. <geometry>
  68. <cylinder length="0.32" radius=".15"/>
  69. </geometry>
  70. </collision>
  71. </link>
  72. <!--
  73. <joint name="base_joint" type="fixed">
  74. <origin xyz="0 0 -0.073" rpy="0 0 0" />
  75. <parent link="base_link"/>
  76. <child link="base_footprint" />
  77. </joint>
  78. -->
  79. <link name="base_laser_bottom">
  80. <visual>
  81. <origin xyz="0 0 0" rpy="0 0 0" />
  82. <geometry>
  83. <box size="0.05 0.05 0.041" />
  84. </geometry>
  85. <material name="black">
  86. <color rgba="0.1 0.1 0.1 1.0"/>
  87. </material>
  88. </visual>
  89. <collision>
  90. <origin xyz="0 0 0" rpy="0 0 0" />
  91. <geometry>
  92. <box size="0.05 0.05 0.041" />
  93. </geometry>
  94. </collision>
  95. <inertial>
  96. <mass value="0.1" />
  97. <inertia ixx="0.001" ixy="0.0" ixz="0.0"
  98. iyy="0.001" iyz="0.0"
  99. izz="0.001" />
  100. </inertial>
  101. </link>
  102. <joint name="base_laser_bottom_joint" type="fixed">
  103. <parent link="base_link"/>
  104. <child link="base_laser_bottom" />
  105. <origin xyz="0.123 0 ${0.0265 + GROUND_CLEARANCE}" rpy="0 0 0" />
  106. </joint>
  107. <link name="base_laser_middle">
  108. <visual>
  109. <origin xyz="0 0 0" rpy="0 0 0" />
  110. <geometry>
  111. <cylinder length="0.0115" radius=".02"/>
  112. </geometry>
  113. <material name="dark_grey">
  114. <color rgba="0.2 0.2 0.2 1.0"/>
  115. </material>
  116. </visual>
  117. <collision>
  118. <origin xyz="0 0 0" rpy="0 0 0" />
  119. <geometry>
  120. <cylinder length="0.0115" radius=".02"/>
  121. </geometry>
  122. </collision>
  123. <inertial>
  124. <mass value="0.1" />
  125. <inertia ixx="0.001" ixy="0.0" ixz="0.0"
  126. iyy="0.001" iyz="0.0"
  127. izz="0.001" />
  128. </inertial>
  129. </link>
  130. <joint name="base_laser_middle_joint" type="fixed">
  131. <parent link="base_laser_bottom"/>
  132. <child link="base_laser_middle" />
  133. <origin xyz="0 0 0.02625" rpy="0 0 0" />
  134. </joint>
  135. <link name="base_laser">
  136. <visual>
  137. <origin xyz="0 0 0" rpy="0 0 0" />
  138. <geometry>
  139. <cylinder length="0.0175" radius=".0185"/>
  140. </geometry>
  141. <material name="red">
  142. <color rgba="0.8 0.1 0.1 1.0"/>
  143. </material>
  144. </visual>
  145. <collision>
  146. <origin xyz="0 0 0" rpy="0 0 0" />
  147. <geometry>
  148. <cylinder length="0.0175" radius=".0185"/>
  149. </geometry>
  150. </collision>
  151. <inertial>
  152. <mass value="0.1" />
  153. <inertia ixx="0.001" ixy="0.0" ixz="0.0"
  154. iyy="0.001" iyz="0.0"
  155. izz="0.001" />
  156. </inertial>
  157. </link>
  158. <joint name="base_laser_joint" type="fixed">
  159. <parent link="base_laser_middle"/>
  160. <child link="base_laser" />
  161. <origin xyz="0 0 0.0145" rpy="0 0 0" />
  162. </joint>
  163. <!-- Attach the head -->
  164. <pi_robot_head parent="base_link" color="white">
  165. <origin xyz="${0.088 - AX12_DEPTH/2} 0 ${0.798 + GROUND_CLEARANCE}"/>
  166. </pi_robot_head>
  167. <!-- Attach the arm -->
  168. <pi_robot_arm parent="base_link" color="white" gripper_color="green">
  169. <origin xyz="0.125 ${AX12_DEPTH + 0.012} ${AX12_HEIGHT + 0.55 + GROUND_CLEARANCE}" rpy="0 0 1.57" />
  170. </pi_robot_arm>
  171. </robot>