pi_robot_arm.xacro 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <?xml version="1.0"?>
  2. <robot name="pi_robot_arm" xmlns:xacro="http://ros.org/wiki/xacro">
  3. <property name="MESH_SCALE" value="100"/>
  4. <xacro:include filename="$(find rbx1_description)/urdf/pi_robot_arm_hardware.xacro" />
  5. <material name="white">
  6. <color rgba="0.87 0.90 0.87 1.0"/>
  7. </material>
  8. <material name="black">
  9. <color rgba="0.0 0.0 0.0 1.0"/>
  10. </material>
  11. <material name="green">
  12. <color rgba="0.22 0.32 0.14 1.0"/>
  13. </material>
  14. <macro name="pi_robot_arm" params="parent color gripper_color *origin">
  15. <link name="arm_base_link" />
  16. <joint name="arm_base_joint" type="fixed">
  17. <insert_block name="origin" />
  18. <parent link="${parent}"/>
  19. <child link="arm_base_link" />
  20. </joint>
  21. <!-- fake gripper_link joint -->
  22. <link name="gripper_link" />
  23. <joint name="gripper_link_joint" type="fixed">
  24. <origin xyz="0 0 .112" rpy="0 -${M_PI/2} 0" />
  25. <parent link="arm_wrist_flex_link"/>
  26. <child link="gripper_link" />
  27. </joint>
  28. <!-- shoulder pan joint -->
  29. <dynamixel_AX12_fixed parent="arm_base_link" name="arm_shoulder_pan_servo">
  30. <origin xyz="0 0 0" rpy="${M_PI/2} 0 ${M_PI/2}"/>
  31. </dynamixel_AX12_fixed>
  32. <bioloid_F3_revolute parent="arm_shoulder_pan_servo_link" name="arm_shoulder_pan" color="${color}" vlimit="0.785" llimit="-2.617" ulimit="2.617">
  33. <origin xyz="0 ${AX12_WIDTH/2} 0" rpy="${-M_PI/2} ${M_PI/2} ${M_PI}" />
  34. </bioloid_F3_revolute>
  35. <!-- shoulder lift joint -->
  36. <dynamixel_AX12_fixed parent="arm_shoulder_pan_link" name="arm_shoulder_lift_servo">
  37. <origin xyz="0 0 ${-AX12_HEIGHT-F10_HEIGHT+0.001}" rpy="0 ${M_PI} 0" />
  38. </dynamixel_AX12_fixed>
  39. <bioloid_F4_revolute parent="arm_shoulder_lift_servo_link" name="arm_shoulder_lift" color="${color}" vlimit="1.571" llimit="-2.617" ulimit="2.617">
  40. <origin xyz="0 0 0" rpy="0 0 0" />
  41. </bioloid_F4_revolute>
  42. <bioloid_F10_fixed parent="arm_shoulder_lift_link" name="arm_shoulder_F10_0" color="${color}">
  43. <origin xyz="0 0 ${F4_HEIGHT+F10_HEIGHT/2}" rpy="0 0 0" />
  44. </bioloid_F10_fixed>
  45. <bioloid_F10_fixed parent="arm_shoulder_F10_0_link" name="arm_shoulder_F10_1" color="${color}">
  46. <origin xyz="0 0 ${F10_HEIGHT}" rpy="0 0 0" />
  47. </bioloid_F10_fixed>
  48. <bioloid_F10_fixed parent="arm_shoulder_F10_1_link" name="arm_shoulder_F10_2" color="${color}">
  49. <origin xyz="0 0 ${F10_HEIGHT}" rpy="0 0 0" />
  50. </bioloid_F10_fixed>
  51. <bioloid_F3_fixed parent="arm_shoulder_F10_2_link" name="arm_shoulder_F3_0" color="${color}">
  52. <origin xyz="0 0 ${F10_HEIGHT/2}" rpy="0 ${M_PI} 0" />
  53. </bioloid_F3_fixed>
  54. <!-- elbow joint -->
  55. <dynamixel_AX12_fixed parent="arm_shoulder_F3_0_link" name="arm_elbow_flex_servo">
  56. <origin xyz="0 0 ${-AX12_HEIGHT-F10_HEIGHT+0.001}" rpy="0 ${M_PI} 0"/>
  57. </dynamixel_AX12_fixed>
  58. <bioloid_F4_revolute parent="arm_elbow_flex_servo_link" name="arm_elbow_flex" color="${color}" vlimit="1.571" llimit="-2.617" ulimit="2.617">
  59. <origin xyz="0 0 0" rpy="0 0 0" />
  60. </bioloid_F4_revolute>
  61. <bioloid_F10_fixed parent="arm_elbow_flex_link" name="arm_elbow_F10_0" color="${color}">
  62. <origin xyz="0 0 ${F4_HEIGHT+F10_HEIGHT/2}" rpy="0 0 0" />
  63. </bioloid_F10_fixed>
  64. <bioloid_F10_fixed parent="arm_elbow_F10_0_link" name="arm_elbow_F10_1" color="${color}">
  65. <origin xyz="0 0 ${F10_HEIGHT}" rpy="0 0 0" />
  66. </bioloid_F10_fixed>
  67. <bioloid_F10_fixed parent="arm_elbow_F10_1_link" name="arm_elbow_F10_2" color="${color}">
  68. <origin xyz="0 0 ${F10_HEIGHT}" rpy="0 0 0" />
  69. </bioloid_F10_fixed>
  70. <bioloid_F3_fixed parent="arm_elbow_F10_2_link" name="arm_elbow_F3_0" color="${color}">
  71. <origin xyz="0 0 ${F10_HEIGHT/2}" rpy="0 ${M_PI} 0" />
  72. </bioloid_F3_fixed>
  73. <!-- wrist joint -->
  74. <dynamixel_AX12_fixed parent="arm_elbow_F3_0_link" name="arm_wrist_flex_servo">
  75. <origin xyz="0 0 ${-AX12_HEIGHT-F10_HEIGHT+0.001}" rpy="0 ${M_PI} 0"/>
  76. </dynamixel_AX12_fixed>
  77. <bioloid_F2_revolute parent="arm_wrist_flex_servo_link" name="arm_wrist_flex" color="${color}" vlimit="1.571" llimit="-1.745" ulimit="1.745">
  78. <origin xyz="0 0 0" rpy="0 0 0" />
  79. </bioloid_F2_revolute>
  80. <bioloid_F3_fixed parent="arm_wrist_flex_link" name="arm_wrist_F3_0" color="${color}">
  81. <origin xyz="0 0.016 ${F2_HEIGHT}" rpy="0 ${M_PI} ${-M_PI/2}" />
  82. </bioloid_F3_fixed>
  83. <!-- gripper joint -->
  84. <dynamixel_AX12_fixed parent="arm_wrist_F3_0_link" name="gripper_servo">
  85. <origin xyz="-0.02275 0 ${-AX12_WIDTH/2}" rpy="${M_PI} ${M_PI/2} 0"/>
  86. </dynamixel_AX12_fixed>
  87. <!-- finger 1 -->
  88. <joint name="gripper_joint" type="revolute">
  89. <origin xyz="0 0 0" rpy="0 0 0"/>
  90. <axis xyz="0 1 0"/>
  91. <limit effort="30" velocity="0.785" lower="-0.060" upper="0.50" />
  92. <parent link="gripper_servo_link"/>
  93. <child link="gripper_active_link" />
  94. </joint>
  95. <link name="gripper_active_link">
  96. <inertial>
  97. <mass value="0.00001" />
  98. <origin xyz="0 0 0" />
  99. <inertia ixx="1.0" ixy="0.0" ixz="0.0"
  100. iyy="1.0" iyz="0.0"
  101. izz="1.0" />
  102. </inertial>
  103. <visual>
  104. <origin xyz=" 0 0 0 " rpy="0 0 0" />
  105. <geometry>
  106. <mesh filename="package://rbx1_description/meshes/F2.dae" scale="${M_SCALE} ${M_SCALE} ${M_SCALE}"/>
  107. </geometry>
  108. <material name="${color}"/>
  109. </visual>
  110. <collision>
  111. <origin xyz="0.0 0.0 0.00775" rpy="0 0 0" />
  112. <geometry>
  113. <box size="0.025 0.0485 0.0375"/>
  114. </geometry>
  115. </collision>
  116. </link>
  117. <finger_fixed parent="gripper_active_link" name="gripper_active_finger" color="${gripper_color}">
  118. <origin xyz="0 0 ${F2_HEIGHT}" rpy="0 0 0" />
  119. </finger_fixed>
  120. <!-- finger 2 -->
  121. <bioloid_F3_fixed parent="gripper_servo_link" name="gripper_static" color="${color}">
  122. <origin xyz="0 0 ${-AX12_HEIGHT-F10_HEIGHT+0.001}" rpy="0 ${M_PI} 0" />
  123. </bioloid_F3_fixed>
  124. <finger_fixed parent="gripper_static_link" name="gripper_static_finger" color="${gripper_color}">
  125. <origin xyz="0 0 0" rpy="0 0 ${M_PI}" />
  126. </finger_fixed>
  127. </macro>
  128. </robot>