|
105 | 105 | use_fake_hardware="false" |
106 | 106 | /> |
107 | 107 |
|
| 108 | + <?xml version="1.0"?> |
| 109 | +<robot name="ur5" xmlns:xacro="http://www.ros.org/wiki/xacro"> |
| 110 | + |
| 111 | + <!-- Pass through arguments to included files --> |
| 112 | + <xacro:arg name="name" default="ur"/> |
| 113 | + <xacro:arg name="ur_type" default="ur5"/> |
| 114 | + <xacro:arg name="prefix" default=""/> |
| 115 | + <xacro:arg name="use_fake_hardware" default="false"/> |
| 116 | + <xacro:arg name="fake_sensor_commands" default="false"/> |
| 117 | + <xacro:arg name="sim_gazebo" default="false"/> |
| 118 | + <xacro:arg name="sim_gz" default="true"/> |
| 119 | + <xacro:arg name="simulation_controllers" default=""/> |
| 120 | + |
| 121 | + <xacro:include filename="$(find ur5_gripper_description)/urdf/ur.urdf.xacro" /> |
| 122 | + <xacro:include filename="$(find robotiq_description)/urdf/robotiq_85_gripper.urdf.xacro" /> |
| 123 | + <xacro:include filename="$(find robotiq_description)/urdf/robotiq_85_gripper.ros2_control.xacro" /> |
| 124 | + |
| 125 | + <link name="robotiq_coupler"> |
| 126 | + <visual> |
| 127 | + <geometry> |
| 128 | + <mesh filename="package://robotiq_description/meshes/robotiq_85_coupler.stl" /> |
| 129 | + </geometry> |
| 130 | + <material name="flat_black"/> |
| 131 | + </visual> |
| 132 | + <collision> |
| 133 | + <geometry> |
| 134 | + <cylinder radius="0.04" length="0.015"/> |
| 135 | + </geometry> |
| 136 | + </collision> |
| 137 | + <inertial> |
| 138 | + <origin xyz="2.073e-05 1.45286e-03 -1.1049e-03" rpy="0 0 0" /> |
| 139 | + <mass value="0.168" /> |
| 140 | + <inertia ixx="6.69695624e-05" ixy="5.21511788e-09" ixz="-2.74383009e-08" |
| 141 | + iyy="7.85088161e-05" iyz="5.41105193e-07" izz="1.41819717e-04"/> |
| 142 | + </inertial> |
| 143 | + </link> |
| 144 | + |
| 145 | + <joint name="robotiq_coupler_joint" type="fixed"> |
| 146 | + <origin xyz="0 0 0.004" rpy="0 0 ${-pi/2.0}" /> |
| 147 | + <parent link="tool0"/> |
| 148 | + <child link="robotiq_coupler"/> |
| 149 | + </joint> |
| 150 | + <gazebo reference="robotiq_coupler"> |
| 151 | + <mu1>0.9</mu1> |
| 152 | + <mu2>0.9</mu2> |
| 153 | + <material>Gazebo/FlatBlack</material> |
| 154 | + </gazebo> |
| 155 | + |
| 156 | + <!-- Equivalent to the OpenRAVE manipulator denso_robotiq_85_gripper --> |
| 157 | + <!-- <link name="ee_link" /> |
| 158 | + <joint name="manipulator_dummy_joint" type="fixed"> |
| 159 | + <origin xyz="0 0 0.17" rpy="0 0 0" /> |
| 160 | + <parent link="tool0"/> |
| 161 | + <child link="ee_link"/> |
| 162 | + </joint> --> |
| 163 | + |
| 164 | + <!-- Attach the robotiq 85 gripper --> |
| 165 | + <xacro:robotiq_85_gripper prefix="" parent="robotiq_coupler" > |
| 166 | + <origin xyz="0 0 0.004" rpy="0 ${-pi/2} ${pi}"/> |
| 167 | + </xacro:robotiq_85_gripper> |
| 168 | + |
| 169 | + <!-- Gazebo FT sensor plugin - Gazebo Sim (Harmonic) compatible --> |
| 170 | + <!-- Note: FT sensor requires gazebo_ros2_control_demos or custom implementation --> |
| 171 | + <!-- |
| 172 | + <gazebo reference="wrist_3_joint"> |
| 173 | + <sensor name="force_torque_sensor" type="force_torque"> |
| 174 | + <always_on>true</always_on> |
| 175 | + <update_rate>250</update_rate> |
| 176 | + <force_torque> |
| 177 | + <frame>child</frame> |
| 178 | + <measure_direction>child_to_parent</measure_direction> |
| 179 | + </force_torque> |
| 180 | + </sensor> |
| 181 | + </gazebo> |
| 182 | + --> |
| 183 | + |
| 184 | + <!-- Gazebo grasping plugin - Note: Grasping plugin may need custom implementation for Gazebo Sim --> |
| 185 | + <!-- Commenting out for now as this plugin is not directly available in Gazebo Sim --> |
| 186 | + <!-- |
108 | 187 | <gazebo> |
109 | | - <plugin filename="gz_ros2_control-system" |
110 | | - name="gz_ros2_control::GazeboSimROS2ControlPlugin"> |
111 | | - </plugin> |
112 | | -</gazebo> |
| 188 | + <gripper name="gazebo_gripper"> |
| 189 | + <grasp_check> |
| 190 | + <attach_steps>2</attach_steps> |
| 191 | + <detach_steps>2</detach_steps> |
| 192 | + <min_contact_count>3</min_contact_count> |
| 193 | + </grasp_check> |
| 194 | + <gripper_link>robotiq_85_left_finger_tip_link</gripper_link> |
| 195 | + <gripper_link>robotiq_85_right_finger_tip_link</gripper_link> |
| 196 | + <palm_link>robotiq_85_base_link</palm_link> |
| 197 | + </gripper> |
| 198 | + </gazebo> |
| 199 | + --> |
| 200 | + |
| 201 | + <!-- ros2_control for gripper --> |
| 202 | + <xacro:robotiq_85_ros2_control |
| 203 | + name="robotiq" |
| 204 | + prefix="" |
| 205 | + sim_gz="true" |
| 206 | + use_fake_hardware="false"/> |
| 207 | + |
| 208 | + <!-- ros2_control for UR5 (Gazebo Harmonic) --> |
| 209 | + <ros2_control name="ur_system" type="system"> |
| 210 | + <hardware> |
| 211 | + <plugin>gz_ros2_control/GazeboSimSystem</plugin> |
| 212 | + </hardware> |
| 213 | + |
| 214 | + <joint name="shoulder_pan_joint"> |
| 215 | + <command_interface name="position"/> |
| 216 | + <state_interface name="position"/> |
| 217 | + <state_interface name="velocity"/> |
| 218 | + </joint> |
| 219 | + |
| 220 | + <joint name="shoulder_lift_joint"> |
| 221 | + <command_interface name="position"/> |
| 222 | + <state_interface name="position"/> |
| 223 | + <state_interface name="velocity"/> |
| 224 | + </joint> |
| 225 | + |
| 226 | + <joint name="elbow_joint"> |
| 227 | + <command_interface name="position"/> |
| 228 | + <state_interface name="position"/> |
| 229 | + <state_interface name="velocity"/> |
| 230 | + </joint> |
| 231 | + |
| 232 | + <joint name="wrist_1_joint"> |
| 233 | + <command_interface name="position"/> |
| 234 | + <state_interface name="position"/> |
| 235 | + <state_interface name="velocity"/> |
| 236 | + </joint> |
| 237 | + |
| 238 | + <joint name="wrist_2_joint"> |
| 239 | + <command_interface name="position"/> |
| 240 | + <state_interface name="position"/> |
| 241 | + <state_interface name="velocity"/> |
| 242 | + </joint> |
| 243 | + |
| 244 | + <joint name="wrist_3_joint"> |
| 245 | + <command_interface name="position"/> |
| 246 | + <state_interface name="position"/> |
| 247 | + <state_interface name="velocity"/> |
| 248 | + </joint> |
| 249 | + </ros2_control> |
| 250 | + |
| 251 | + <gazebo> |
| 252 | + <plugin filename="gz_ros2_control-system" |
| 253 | + name="gz_ros2_control::GazeboSimROS2ControlPlugin"> |
| 254 | + </plugin> |
| 255 | + </gazebo> |
113 | 256 |
|
114 | 257 | </robot> |
0 commit comments