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

Controller makes robot unstable in Gazebo

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

dbworth gravatar image

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

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 image Adolfo Rodriguez T  ( 2012-09-07 02:49:13 -0600 )edit

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

dbworth gravatar image dbworth  ( 2012-09-09 06:06:50 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

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

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

Comments

Thnak you, I was having this problem with my robot collapsing after unpausing gazebo. It turns out, I had changed damping from 0.0 to 0.7, which caused the physics engine to fail. Setting it to 0.01 made it work again.

LasseBoerresen gravatar image LasseBoerresen  ( 2018-12-28 16:41:00 -0600 )edit
0

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

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

Question Tools

1 follower

Stats

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

Seen: 4,731 times

Last updated: Sep 09 '12