Joint in gazebo operates beyond limits [closed]

asked 2012-11-06 20:15:17 -0500

prasanna.kumar gravatar image

updated 2012-11-06 20:21:21 -0500

I have created a sliding door in gazebo. The joint is prismatic with an upper limit of 1.1 and lower limit of 0. This is the urdf:

<?xml version="1.0" ?>
<robot name="door_workroom">
  <gazebo reference="base_wr">
    <material>Gazebo/RustySteel</material>
  </gazebo>
  <link name="world"/>
  <joint name="link_joint_wr" type="prismatic">
    <axis xyz="-1 0 0"/>
    <parent link="world"/>
    <origin rpy="0 0 1.57" xyz="3.75 7.6 1.07"/>
    <limit effort="1000.0" lower="-0" upper="1.1" velocity="0.5"/>
    <child link="link_wr"/>
    <dynamics damping="10" friction="1000"/>
  </joint>
  <link name="link_wr">
    <inertial>
      <mass value="10"/>
      <origin xyz="0 0 0"/>
      <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1"/>
    </inertial>
    <visual>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="1 0.06 2"/>
      </geometry>
    </visual>
    <collision>
      <origin rpy="0 0 0" xyz="0 0 0"/>
      <geometry>
        <box size="1 0.06 2"/>
      </geometry>
    </collision>
  </link>
  <gazebo reference="link_wr">
    <material>Gazebo/RustySteel</material>
    <turnGravityOff>true</turnGravityOff>
  </gazebo>
</robot>

When I apply +1 effort to push it (for pre-calculated duration) to upper limit, it goes to 1.1 and stops as programmed. But when I apply -1 (for same duration) so as to bring it to push it back to its original position, it moves to 0, hits the lower limit and bounces back. From then on, no stopping. It crosses the upper limit of 1.1 and moves to infinity.

How can I make a joint stop its motion after it has reached a point ? Is there a mistake that I am making anywhere ? Is there a variable that needs to me altered in the urdf ?

Thanks

edit retag flag offensive reopen merge delete

Closed for the following reason Gazebo Question: The Gazebo community prefers to answer questions at: http://answers.gazebosim.org by tfoote
close date 2015-06-29 02:13:40.003255