0
$\begingroup$

Rosanswers logo

Hi,

As posted at : http://answers.ros.org/question/12965/spawn-urdf-joint-stiffness/

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">
<visual>
  <origin rpy="0 0 0" xyz="0.248125 0.0075  0"/>
  <geometry>
    <box size="0.48875 0.015 0.785"/>
  </geometry>
  .
  .
  .
</visual>
<collision>
  <origin rpy="0 0 0" xyz="0.248125 0.0075  0"/>
  <geometry>
    <box size="0.48875 0.015 0.785"/>
  </geometry>
</collision>
<inertial>
  <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"/>
</inertial>
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"/>
  </joint>

I also added following lines from the urdf of door from(changing the link names etc) http://ros.org/wiki/pr2_simulator/Tutorials/PR2OpenDoor,(I am not sure about the functionality of these tags though, they do not seem to have any effect).

<gazebo reference="L_door">
<latchJoint>L_door_joint</latchJoint>
<latchAngle>-1.67075</latchAngle>
<doorClosedAngle>0.1</doorClosedAngle>
<latchKp>200.0</latchKp>
<latchKd>0.0</latchKd>
<latchFMax>1000.0</latchFMax>

</gazebo>

Any suggestions/links is greatly appreciated.


Originally posted by aknirala on ROS Answers with karma: 339 on 2012-09-08

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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">
  <dampingFactor>0.1</dampingFactor>
</gazebo>

Note: not to be confused with

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

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


Originally posted by hsu with karma: 5780 on 2012-09-09

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by aknirala on 2012-09-09:
It also (seems) have no effect. Also in joint I have specified it 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?'

Comment by aknirala on 2012-09-11:
It helped. Thanx.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.