I am using a slide type joint in my robot for connecting the main body with a part. This part should contract when it collides with some object. I am able to achieve the same using a slide type joint. But the joint is expended(before the collision) more than what I set in the limits. How I can effectively set the joint limit/range? <joint name="joint_x" type="slide" axis="1 0 0" pos=".05 .05 .05" limited="true" range=".01 .02"/>
Joint limits are soft, like all other constraint in mujoco. You can adjust the softness of each constraint with the corresponding solref and solimp parameters.