Adjust max_contacts paramters for a ball

asked 2018-06-01 03:54:37 -0600

markus gravatar image

Hey, there I would like to set the physics parameter of a ball balancing on a plate in a realistic way: -> the ball should have some grip -> the ball should start rolling at a certain angle

Now this is what I currently have for the ball:

  <gazebo reference="ball_link">
  <gravity>1</gravity>
  <maxVel>1000</maxVel>
  <minDepth>0</minDepth>
  <mu1>0.5</mu1>
  <mu2>0.5</mu2>
  <fdir1>0 0 0</fdir1>
  <kp>1e+20</kp>
  <kd>1.0</kd>
  <selfCollide>0</selfCollide>
  <maxContacts>3</maxContacts>  <!-- set this to 1 and ball stops sliding with high angle -->
  <material>Gazebo/Blue</material> <!-- caution this overrwrites (dae) everything!!! -->

</gazebo>

And for the plate:

  <gazebo reference="ee_link">
     <material>Gazebo/White</material>
     <selfCollide>0</selfCollide>
     <maxContacts>10</maxContacts>
     <mu1>0.5</mu1>
     <mu2>0.5</mu2>
  </gazebo>

Now the problem is, that when the plate angle is slowly increasing and the max_contacts of the ball is not 1 it occurs a behaviour like in the picture:

ball_plate.png

On the other hand if I set the max_contacts value of the ball not to 1 the ball is moving instantly already on very small angles of the plate (which I also do not want....)

How to set the maxContacts of the Ball corretly? Should I also adjust the mu1, mu2 values of the plate and ball? (They should have the same value or?)

Best and Thanks :) Markus

edit retag flag offensive close merge delete