# Joint in gazebo operates beyond limits [closed]

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>
<axis xyz="-1 0 0"/>
<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"/>
<dynamics damping="10" friction="1000"/>
</joint>
<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>
<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 reopen merge delete