Robot joint detaches when simulation is loaded
I'm trying to simulate a simple 4 DOF robot using gazebo. The robot has 3 revolute joints and 1 prismatic joint. The link named "walllink" is fixed to the world. I've created the MYROBOTdescription and MYROBOT_gazebo packages using the following tutorial.
However, when I run the simulation the prismatic and the first revolute joints simply detach from the fixed link and float away. No warnings or errors pop up when the simulation launch file is loaded (snippets of the launch file in the terminal and the code are attached). Here are the fixes that I have tried until this point (none of these have worked):
- Rechecked whether the inertial tag in each link is defined and accurate
- Checked the joints and whether the child / parent links are properly defined
- Tried adding a self_collide tag for the links to see if that fixes it
Can someone please help me out with this?
Terminal output when launch file is run
Before Running (while paused)
After Running (after unpausing)
The URDF file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<!-- World Link -->
<!-- Wall - World Joint -->
<!-- Wall Link -->
<inertial>
<origin
xyz="-1.3668E-17 0.3 0.00020351"
rpy="0 0 0" />
<mass
value="18.067" />
<inertia
ixx="0.5559"
ixy="-4.6489E-21"
ixz="-4.3369E-18"
iyy="0.15"
iyz="7.5132E-22"
izz="0.6759" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/wall_link.STL" />
</geometry>
<material
name="">
<color
rgba="1 1 1 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/wall_link.STL" />
</geometry>
</collision>
<!-- Linear Rail Link -->
<inertial>
<origin
xyz="-4.1743E-15 0.0085192 -0.016"
rpy="0 0 0" />
<mass
value="0.011057" />
<inertia
ixx="1.4641E-06"
ixy="5.4276E-21"
ixz="4.8907E-22"
iyy="3.7337E-06"
iyz="-2.9124E-22"
izz="3.7228E-06" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/linear_rail.STL" />
</geometry>
<material
name="">
<color
rgba="0.75294 0.75294 0.75294 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/linear_rail.STL" />
</geometry>
</collision>
<!-- Linear Rail Joint -->
<!-- Thigh Link -->
<inertial>
<origin
xyz="9.8897E-05 -0.072814 0.00035302"
rpy="0 0 0" />
<mass
value="0.18426" />
<inertia
ixx="0.00011096"
ixy="-2.6884E-10"
ixz="8.301E-14"
iyy="4.5179E-05"
iyz="-1.6755E-07"
izz="9.3875E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/thigh_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/thigh_link.STL" />
</geometry>
</collision>
<!-- Thigh Joint -->
<!-- Shank Link -->
<inertial>
<origin
xyz="9.8897E-05 -0.072814 0.00035302"
rpy="0 0 0" />
<mass
value="0.18426" />
<inertia
ixx="0.00011096"
ixy="-2.6884E-10"
ixz="8.301E-14"
iyy="4.5179E-05"
iyz="-1.6755E-07"
izz="9.3875E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/shank_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/shank_link.STL" />
</geometry>
</collision>
<!-- Shank Joint -->
<!-- Toe Link -->
<inertial>
<origin
xyz="8.7264E-05 -0.027482 0.00044851"
rpy="0 0 0" />
<mass
value="0.13019" />
<inertia
ixx="6.1131E-05"
ixy="-5.1058E-10"
ixz="8.301E-14"
iyy="4.0965E-05"
iyz="-1.6755E-07"
izz="4.3864E-05" />
</inertial>
<visual>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/toe_link.STL" />
</geometry>
<material
name="">
<color
rgba="0.79216 0.81961 0.93333 1" />
</material>
</visual>
<collision>
<origin
xyz="0 0 0"
rpy="0 0 0" />
<geometry>
<mesh
filename="package://r3_description/meshes/toe_link.STL" />
</geometry>
</collision>
<!-- Toe Joint -->
<!-- Rail Joint Transmission -->
<transmission name="trans_rail_joint">
<type>transmission_interface/SimpleTransmission</type>
<joint name="rail_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="rail_joint_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<!-- Thigh Joint Transmission -->
<transmission name="trans_thigh_joint">
<type>transmission_interface/SimpleTransmission</type>
<joint name="thigh_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="thigh_joint_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<!-- Shank Joint Transmission -->
<transmission name="trans_shank_joint">
<type>transmission_interface/SimpleTransmission</type>
<joint name="shank_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="shank_joint_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<!-- Toe Joint Transmission -->
<transmission name="trans_toe_joint">
<type>transmission_interface/SimpleTransmission</type>
<joint name="toe_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="toe_joint_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<!-- Plugins -->
<!-- Gazebo ROS Control Plugin -->
<gazebo>
<plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
<robotNamespace>/r3</robotNamespace>
<robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
</plugin>
</gazebo>
Asked by anishdiwan on 2021-08-18 06:08:57 UTC
Comments
hello, did you try with a smaller simulation timestep ?
Asked by Clément Rolinat on 2021-08-23 07:56:02 UTC