ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Making revolute joint stay at rest, if no effort/wrench is applied

asked 2012-09-08 11:08:17 -0500


As posted at :

the solution for keeping a revolute joint fixed seems to be writing a controller for it. However a controller would be required if it is for a robot (and then I can control it with code directly). However, if the joint is associated with an object (like door, say of a closet) and if it is to be manipulated by robot actuators then I guess controller is not needed (for the door).

Or do I need to write the controller in this case also?

But now, the door is moving slowly from lower angle to upper and vice versa, w/o any outer effort. How can I stop this?

Specifically, I have created URDF for a closet. It has two doors with revolute-joint. The joint description is (for left joint):

  ....<link name="L_door">
  <origin rpy="0 0 0" xyz="0.248125 0.0075  0"/>
    <box size="0.48875 0.015 0.785"/>
  <origin rpy="0 0 0" xyz="0.248125 0.0075  0"/>
    <box size="0.48875 0.015 0.785"/>
  <origin xyz="0.248125 0.0075 0"/>
  <mass value="2"/>
  <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0"/>


I added the joint as

<joint name="L_door_joint" type="revolute">
    <origin rpy="0 0 0" xyz="-0.48875 0 0.6"/>
    <axis xyz="0 0 1"/>
    <limit effort="1000" lower="-1.67075" upper="0.1" velocity="10"/>
    <safety_controller k_position="100.0" k_velocity="10.0" soft_lower_limit="1.57075" soft_upper_limit="0.0"/>
    <dynamics damping="100" friction="0.0"/>
    <parent link="L_side"/>
    <child link="L_door"/>

I also added following lines from the urdf of door from(changing the link names etc),(I am not sure about the functionality of these tags though, they do not seem to have any effect).

<gazebo reference="L_door">


Any suggestions/links is greatly appreciated.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2012-09-09 07:39:51 -0500

hsu gravatar image

updated 2012-09-11 05:29:05 -0500

Well, there is a way to "cheat" and slow things down simply by decaying velocity of the object over time, v(t+dt) = (1 - dampingFactor) * v(t), by adding this to your link description:

<gazebo reference="L_door">

Note: not to be confused with

<joint ...>
  <dynamics damping="xxx"/>

where the latter is viscous damping and has not been enabled by default in gazebo.

edit flag offensive delete link more


It also (seems) have no effect. Also in joint I have specified it <dynamics damping="100" friction="0.0"> I guess it too works with controller. For now I raised door side a little, it is slanted & at rest. Am I correct in saying 'I do not need (ideally) a controller if ROBOT has to open the door?'

aknirala gravatar image aknirala  ( 2012-09-09 07:53:24 -0500 )edit

It helped. Thanx.

aknirala gravatar image aknirala  ( 2012-09-11 00:23:09 -0500 )edit

answered 2012-09-08 20:03:48 -0500

updated 2012-09-08 20:13:45 -0500

I haven't got into gazebo yet, but my physical intuition says you should add friction. If friction is 0, there is nothing to slow the joint down and it will move continuously until there is a way for it to transfer its momentum to something else. However, I doubt the physics engine accounts for inelastic collisions so it will probably never come to a stop without friction.

edit flag offensive delete link more


I tried. Friction has its effect only when controller is running :

aknirala gravatar image aknirala  ( 2012-09-09 06:29:19 -0500 )edit

I see. Sorry, I guess I missed that part.

dougbot01 gravatar image dougbot01  ( 2012-09-09 12:33:09 -0500 )edit

Question Tools

1 follower


Asked: 2012-09-08 11:08:17 -0500

Seen: 2,819 times

Last updated: Sep 11 '12