Gazebo | Ignition | Community
Ask Your Question
1

sdf robot model slippery, slides no friction

asked 2013-01-30 18:53:18 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hello I got an issue with a humanoid robot modeled in sdf format. The model itself is fine. However, my problem is the model slips, slides, and can't stay in place as soon as i move a joint (via plugin of window).

The model plug in is not the problem in this case.

I tried inserting the <mu> tags, <surface><contact> <kp> <kd> tags but they don'e work. I suspect I need a separate world plugin but i am not sure about this since the model already has a plugin.

You anyone please advise?

Thank you

edit retag flag offensive close merge delete

Comments

Please post your SDF files, and tell us what version of Gazebo you're using.

nkoenig gravatar imagenkoenig ( 2013-01-30 19:06:28 -0500 )edit

i am using Gazebo I am not comfortable posting the whole sdf file. Can i post an sdf file that has only the lower body, that is with links (visual + collision) and joints?

nordegren gravatar imagenordegren ( 2013-02-03 18:47:40 -0500 )edit

thank you hsu i will saw the mu values and they are way higher than what i have, in fact these values are crazy high. i will post some of the code for the links and joints once i figure how to properly use this website.

nordegren gravatar imagenordegren ( 2013-02-06 18:17:39 -0500 )edit

here is a sample of a link

nordegren gravatar imagenordegren ( 2013-02-07 18:49:58 -0500 )edit

<link name="right_foot"> <pose>.030 -.090 .010 0 0 0</pose> <inertial> <mass>1.5</mass> <inertia> <ixx>1.0</ixx><ixy>0.0</ixy><ixz>0.0</ixz><iyy>1.0</iyy><iyz>0.0</iyz><izz>1.0</izz> </inertia> </inertial> <collision name="collision"> <geometry> <box><size>.300 .120 .020</size></box> <!-- <mesh><uri>model://</uri></mesh> --> </geometry> <surface> <friction> <ode><mu>0.3</mu></ode

nordegren gravatar imagenordegren ( 2013-02-07 18:52:09 -0500 )edit

<link name="right_foot"> <pose>.030 -.090 .010 0 0 0</pose> <inertial> <mass>1.5</mass> <inertia> <ixx>1.0</ixx><ixy>0.0</ixy><ixz>0.0</ixz><iyy>1.0</iyy><iyz>0.0</iyz><izz>1.0</izz> </inertia> </inertial> <collision name="collision"> <geometry> <box><size>.300 .120 .020</size></box> <!-- <mesh><uri>model://</uri></mesh> --> </geometry> <surface> <friction> <ode><mu>0.3</mu></ode

nordegren gravatar imagenordegren ( 2013-02-07 18:52:10 -0500 )edit

<link name="right_foot"> <pose>.030 -.090 .010 0 0 0</pose> <inertial> <mass>1.5</mass> <inertia> <ixx>1.0</ixx><ixy>0.0</ixy><ixz>0.0</ixz><iyy>1.0</iyy><iyz>0.0</iyz><izz>1.0</izz> </inertia> </inertial> <collision name="collision"> <geometry> <box><size>.300 .120 .020</size></box> <!-- <mesh><uri>model://</uri></mesh> --> </geometry> <surface> <friction> <ode><mu>0.3</mu></ode

nordegren gravatar imagenordegren ( 2013-02-07 18:52:11 -0500 )edit

It will be hard to debug your problem without a complete SDF file. We can take this offline so that you don't have to post a complete SDF. Please contact me using nate@osrfoundation.org

nkoenig gravatar imagenkoenig ( 2013-03-07 22:55:20 -0500 )edit

12 Answers

Sort by » oldest newest most voted
0

answered 2013-02-05 13:57:23 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Ideally, it will be sufficient if you can post a simple (stripped down) version of the model that others can use to reproduces the problem.

Here is an example of usage of friction (not a terribly good one because we are using a very large mu as the place holder until we get better contact properties). But in general, contact friction should have an effect in simulation.

It's possible the problem might be more than just contact; for example you can isolate the issue by turning off controllers/plugins to see if friction behavior changes.

edit flag offensive delete link more
0

answered 2018-01-05 12:16:30 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

has anyone got the answer. I am also facing this problem. thanks in advance.

edit flag offensive delete link more

Comments

Given how old the original question is, I'd suggest asking a new question. Including a full URDF/SDF in your question will increase the odds that somebody can help you!

josephcoombe gravatar imagejosephcoombe ( 2018-01-08 15:50:43 -0500 )edit
0

answered 2013-02-18 22:16:42 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

does this mean that when writing an animation plugin you must "manually" implement the physics engine? if so how? there's nothing on physics engine when using common::NumericAnimation() classes

edit flag offensive delete link more

Comments

I really don't know. But there is no chance to implement the physics engine. I think that the best approach is try to create a PID controller that applies force to robot joints. I am new in gazebo. Maybe @nkoenig or @hsu can help you.

Daniel Vaz gravatar imageDaniel Vaz ( 2013-02-19 06:43:33 -0500 )edit
0

answered 2013-02-14 19:02:02 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

class Motion : public ModelPlugin { public: void Load(physics::ModelPtr model, sdf::ElementPtr /*sdf*/) { std::map<std::string, common::numericanimationptr=""> motion;

  motion["thor-op::l_hip_pitch"].reset(new common::NumericAnimation("motion", 4.5, true));
  ...
  so on and so on for every other joint
  ...
  common::NumericKeyFrame *key = motion["thor-op::l_hip_pitch"]->CreateKeyFrame(0.0);
  key->SetValue(0.0);
  ...
  so on and so on for every other joint
  ...
  key = motion["thor-op::l_hip_pitch"]->CreateKeyFrame(.75);
  key->SetValue(-1.57);
  ...
  so on and so on for every other joint, for every .75 seconds until 4.5 seconds
  ...

model->SetJointAnimation(motion); } }; GZREGISTERMODELPLUGIN(Motion) }

So what happens is as soon as the robot moves it begins to slip and slide. however, when no plugin is loaded the model stays in place but it collapses under its own weight.

edit flag offensive delete link more

Comments

@nordegren I am new in gazebo, but here [http://gazebosim.org/wiki/Tutorials/1.3/intermediate/animate_pose] says that animation engine doesn't take into account physics engine. So I don't know if your animation plugin do the black magic and your model slips.

Daniel Vaz gravatar imageDaniel Vaz ( 2013-02-15 03:27:11 -0500 )edit
0

answered 2013-02-11 18:56:12 -0500

nordegren gravatar image

thank you hsu for your answer.

i already tried this method way before i started this thread. the problem is that as soon as i load a plugin to the model to control the joints position (common::NumericAnimation, SetValue(double position)) the model begins slipping regardless how heavy or how high the mu's are set.

Of course if i do not load a controller to the model then the robot collapses on its own weight (without slipping).

edit flag offensive delete link more
0

answered 2013-02-12 05:01:19 -0500

updated 2013-02-16 14:29:11 -0500

@nordegren, if you think that problem is the controller, could you post your code? I am not sure if animations take into account the physics engine.


@nordegren I am new in gazebo, but here [http://gazebosim.org/wiki/Tutorials/1...] says that animation engine doesn't take into account physics engine. So I don't know if your animation plugin do the black magic and your model slips.

edit flag offensive delete link more

Comments

@hsu, the animation classes take into account the physics engine?

Daniel Vaz gravatar imageDaniel Vaz ( 2013-02-13 04:07:37 -0500 )edit
0

answered 2013-02-07 19:01:42 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

this is a sample of the robot The entire robot still slips regardless of mu values or mass values

<!-- left foot -->
  <link name="left_foot">
    <pose>.030 .090 .010 0 0 0</pose>
    <inertial>
      <mass>1.5</mass>
      <inertia>
        <ixx>1.0</ixx><ixy>0.0</ixy><ixz>0.0</ixz><iyy>1.0</iyy><iyz>0.0</iyz><izz>1.0</izz>
      </inertia>
    </inertial>
    <collision name="collision">
      <geometry>
        <box><size>.300 .120 .020</size></box>
      </geometry>
      <surface>
        <friction>
          <ode><mu>100000.0</mu><mu2>100000.0</mu2></ode>
        </friction>
      </surface>
    </collision>
    <visual name="visual">
      <geometry>
        <box><size>.300 .120 .020</size></box>
      </geometry>
    </visual>
  </link>
edit flag offensive delete link more

Comments

you can update your original question with the model

hsu gravatar imagehsu ( 2013-02-07 19:35:25 -0500 )edit

hi hsu could you please clarify the request. I don't quite understand (sorry).

nordegren gravatar imagenordegren ( 2013-02-12 18:10:34 -0500 )edit
0

answered 2013-02-11 22:45:07 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

hello hsu I also already tried the <min_depth> tags and still did not work. I exhausted every single possibility and the robot still slips.

robot does not slip when no plugin is loaded to it. however, in case of my humanoid, the robot collapses on its own weight because there is nothing controlling the joints.

my big problem is that when i use a plugin to control the robot joints (i.e. program some robot motions) the robot beings to slip as soon as a joint moves.

I don't know what else to do. This is the reason why i started this thread.

edit flag offensive delete link more

Comments

another possibility is controller tuning. Can you say a little more about the types of controller you are using?

hsu gravatar imagehsu ( 2013-02-14 20:39:36 -0500 )edit
0

answered 2013-02-12 18:09:31 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

The plugin is very long and very repetitive so i am posting just a few pieces for one joint. The model itself moving is not a problem. My problem is as soon as the model beings to move it slips and slides all over the world.

The plugin is for ModelPlugin class

class Motion : public ModelPlugin { public: void Load(physics::ModelPtr model, sdf::ElementPtr /*sdf*/) { std::map<std::string, common::numericanimationptr=""> motion; ... motion["humanoid::lhippitch"].reset(new common::NumericAnimation("motion", 4.5, true)); ... common::NumericKeyFrame *key = motion["thor-op::lhippitch"]->CreateKeyFrame(0.0); key->SetValue(0.0); ... key = motion["thor-op::lhippitch"]->CreateKeyFrame(.75); key->SetValue(-1.57); ... so on and so on for every .75 seconds until the 4.5 second mark and it repeats over ... model->SetJointAnimation(motion); } }; GZREGISTERMODEL_PLUGIN(Motion)

I don't think i am doing anything wrong so I hope there is something i am missing on my plugin.

edit flag offensive delete link more
0

answered 2013-02-11 19:41:57 -0500

hsu gravatar image

try adding the min_depth of 3mm to both feet, see if that helps. For example,

<!-- left foot -->
  <link name="left_foot">
    <pose>.030 .090 .010 0 0 0</pose>
    <inertial>
      <mass>1.5</mass>
      <inertia>
        <ixx>1.0</ixx><ixy>0.0</ixy><ixz>0.0</ixz><iyy>1.0</iyy><iyz>0.0</iyz><izz>1.0</izz>
      </inertia>
    </inertial>
    <collision name="collision">
      <geometry>
        <box><size>.300 .120 .020</size></box>
      </geometry>
      <surface>
        <friction>
          <ode><mu>100000.0</mu><mu2>100000.0</mu2></ode>
        </friction>
                <contact>
                  <ode><min_depth>0.003</min_depth></ode>
                </contact>
      </surface>
    </collision>
    <visual name="visual">
      <geometry>
        <box><size>.300 .120 .020</size></box>
      </geometry>
    </visual>
  </link>
edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2013-01-30 18:53:18 -0500

Seen: 17,181 times

Last updated: Jan 05 '18