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

Gazebo: no friction, no self collide (self collision not working)

asked 2012-09-09 06:05:02 -0500

dbworth gravatar image

Fuerte
Gazebo 1.6.16

Hi all,

I've been fiddling for a long time, trying to control a model in Gazebo.
After tweaking the ODE settings and setting controller parameters to zero, I think I've found the underlying problem: my simulation has no friction or self collision.

The robot spawns in this position:
image description
and should just sit there under the influence of gravity.

However, the tiny wrist link falls down (arrow 1), because the controller is disabled, and passes through the link below, which suggests that SelfCollision it not working:
image description
Then the forearm rotates (label 2) and the whole think flops to the ground.

If I remove everything beyond the elbow, the elbow rotates to its limit, and the small link keeps swing back and forth (see red arrow) like something in a horror film!
image description

In the URDF, example settings for a joint are:

<gazebo reference="joint">
    <dynamics damping="0.0" friction="100.0"/>
</gazebo>
<gazebo reference="link">
    <selfCollide>true</selfCollide>
    <static>false</static>
    <turnGravityOff>false</turnGravityOff>
</gazebo>

I tried adding some damping, and setting friction really high, but there's no change.

Joint controllers are disabled e.g:

robot/controller/joint:
type: robot_mechanism_controllers/JointPositionController
joint: jointname
pid:
p: 0.0
i: 0.0
d: 0.0
i_clamp: 0.0

Gazebo ODE settings in world file are:

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

If I change the "dt" or "iters" values, it just makes the same thing happen faster or slower in simulation.

If I click on the links in Gazebo, SelfCollide is set to true.

Also, when Gazebo loads, it prints a warning:

[ WARN] [1347205553.791454857, 0.002000000]: multiple inconsistent <selfCollide> exists due to fixed joint reduction, overwriting previous value [false] with [true].

I can't find where it thinks I've set SelfCollide to false? is it something to do with the mechanism configuration?
but nevertheless, it says it's been set to "true".

Are these things meant to be working?

Thanks for your help.

edit retag flag offensive close merge delete

Comments

@hsu is selfCollide fixed? Thanks.

ChickenSoup gravatar image ChickenSoup  ( 2013-02-18 06:04:19 -0500 )edit

@Peshala I can tell you from experience, that it worked on-and-off again in the Fuerte release. It should be fixed now, but you're best best is to go to http://answers.gazebosim.org and read their suggestions on how to use the latest Gazebo e.g. v1.2 with Fuerte.

dbworth gravatar image dbworth  ( 2013-02-18 07:47:27 -0500 )edit

@dbworth thanks for the reply. It didn't work for me with the usual <gazebo reference="myLink"><selfCollide>true</selfCollide></gazebo> in the URDF. I haven't migrated to the new format yet. Anyway I will look into your link.

ChickenSoup gravatar image ChickenSoup  ( 2013-02-18 14:31:44 -0500 )edit

@hsu : I am using Gazebo-1.3 : I am unable to locate the ODELink.cc file. Is it available in Gazebo-1.3 ? Is so can you please tell me where I should find it or how I should fix it . Thanks .

Bharadwaj gravatar image Bharadwaj  ( 2013-04-01 11:09:12 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-09-09 18:43:41 -0500

hsu gravatar image

selfCollide was broken, see https://bitbucket.org/osrf/gazebo/issue/14/model-self_collide-not-working. simulator_gazebo 1.6.17 will have the fix. -John

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-09-09 06:05:02 -0500

Seen: 7,525 times

Last updated: Sep 09 '12