ROS Resources: Documentation | Support | Discussion Forum | Service Status | Q&A answers.ros.org
Ask Your Question
1

Controller makes robot unstable in Gazebo

asked 2012-09-07 01:47:33 -0500

dbworth gravatar image

updated 2014-04-20 14:06:44 -0500

ngrennan gravatar image

Fuerte, Gazebo 1.6.16

Hi all, I've setup a robot model in a world. I start the simulation paused and everything is ok, but when I press 'play' the controller won't hold the robots position.

From it's resting position, it actually jiggles a bit then flops the links to one side. I've tried adjusting the parameters... I wonder if my robot's mass is too light. The measurements are accurate, but being in meter units the inertia matrix is very small for each link.

e.g. for one link:

<inertial>
    <mass value="0.5692" />
    <origin xyz="-0.000000157 0.014876512 0.044359344"/>
    <inertia ixx="0.001427609768" ixy="-0.000000003731" ixz="0.000000282945" 
                                  iyy= "0.000797193532" iyz="0.000106505679" 
                                                        izz= "0.001191235228" />
</inertial>

I'm using the robot_mechanism_controllers/JointPositionController controller for each joint, with:

  pid:
    p: 2.0
    i: 0.0
    d: 0.5
    i_clamp: 0.0

Gazebo settings in the URDF are

<dynamics damping="1.0" friction="1.0"/>

<selfCollide>true</selfCollide>
<static>false</static>
<turnGravityOff>false</turnGravityOff>

Do I need to set these other parameters?:

<initial_joint_position>    ?
<stopKd value="1.0" />   ?
<stopKp value="1000000.0" />   ?

World settings are:

<physics type="ode">
  <gravity xyz="0 0 -9.8"/>
  <ode>
    <solver type="quick" dt="0.001" iters="10" sor="1.3"/>
    <constraints cfm="0.0" erp="0.1" contact_max_correcting_vel="10.0" contact_surface_layer="0.001"/>
  </ode>
</physics>

This is so frustrating...

Thanks for your help.

edit retag flag offensive close merge delete

Comments

Is the dynamics element that of a joint? If so, try lowering substantially the damping value. The same goes for the d gain in the controller.

Adolfo Rodriguez T gravatar imageAdolfo Rodriguez T ( 2012-09-07 02:49:13 -0500 )edit

Thanks Adolfo Rodriguez T that does help calm things down...

dbworth gravatar imagedbworth ( 2012-09-09 06:06:50 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
2

answered 2012-09-07 04:58:56 -0500

hsu gravatar image

First isolate source of instability by setting

pid:
  p: 0
  i: 0
  d: 0
  i_clamp: 0

and

<dynamics damping="0.0" friction="0.0"/>

and

<physics type="ode">
  <gravity xyz="0 0 -9.8"/>
  <ode>
    <solver type="quick" dt="0.0001" iters="1000" sor="1.3"/>
    <constraints cfm="0.0" erp="0.1" contact_max_correcting_vel="10.0" contact_surface_layer="0.001"/>
  </ode>
</physics>

Then, change back the parameters one by one, and see which one(s) are the culprit of your instability.

edit flag offensive delete link more
0

answered 2012-09-09 06:11:21 -0500

dbworth gravatar image

Thanks hsu this help me find the underlying problem, which seems to be that my model has no friction or self collision.

Originally, when I disabled the controller, the model would spawn and sit in place. Now it spawns, links pass through each other and it rolls and flops onto the ground:

http://answers.ros.org/question/43457/gazebo-no-friction-no-self-collide-self-collision-not-working/

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2012-09-07 01:47:33 -0500

Seen: 1,209 times

Last updated: Sep 09 '12