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

Simple question on setting bounce properties (URDF)

asked 2013-01-10 13:06:37 -0500

Benjamin Blumer gravatar image

updated 2013-01-11 10:12:03 -0500

Hi all,

I'm trying to model a ball. I'm not having any luck with making it bounce. I try to set the restitution coefficient in my URDF code, but when I look at the properties of the ball in Gazebo (ball1 -> ball -> link -> collision -> surface) the restitution_coefficient is still equal to zero.

I'm running Fuerte on Ubuntu 12.04.

The URDF:

 <robot name="my_ball">
  <link name="ball">
    <inertial>
      <origin xyz="0 0 0" /> 
      <mass value="0.0027" />
      <inertia  ixx="0.00000072" ixy="0.0"  ixz="0.0"  iyy="0.00000072"  iyz="0.0"  izz="0.00000072" />
    </inertial>
    <visual>
      <origin xyz="0 0 0"/>
      <geometry>
        <sphere radius=".040" />
      </geometry>
    </visual>
    <collision>
      <origin xyz="0 0 0"/>
      <geometry>
        <sphere radius=".040" />
      </geometry>
      <surface>
           <bounce restitution_coefficient = "1"/>
      </surface>
    </collision>

  </link>
  <gazebo reference="ball">
    <material>Gazebo/Orange</material>
    <kd value = "100">
    <kp value = "999999">
        <mu1>1</mu1>
    <mu2>1</mu2>
  </gazebo>
</robot>

I'm loading the ball using:

rosrun gazebo spawn_model -file `pwd`/ballmodel.urdf -urdf -z 10 -x 1 -y -2 -model ball1
edit retag flag offensive close merge delete

Comments

Also tried: <bounce restitution_coefficient="0.5" threshold="0.00"/>

And: <bounce> <restitution_coefficient="1"/> </bounce> and: <bounce> <restitution_coefficient> 1 </restitution_coefficient> </bounce>

Benjamin Blumer gravatar image Benjamin Blumer  ( 2013-01-11 10:12:23 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2014-09-13 15:16:52 -0500

SHPOWER gravatar image

updated 2015-04-09 20:25:22 -0500

130s gravatar image

In addition to restitution_coefficient and small value for threshold. for example: <bounce restitution_coefficient="1.0" threshold="0.01"/> you must add maxVal under <gazebo>:

    <surface>
      <bounce restitution_coefficient="1.0" threshold="0.01"/>
    </surface>
        <!--contact>
          <ode>
             <max_vel>10</max_vel>
          </ode>
        </contact-->
      </collision>
    </link>
    <gazebo reference="wheel">
      <mu1 value="100.0" />
      <mu2 value="0.1" />
      <!-- kp value="10000000.0" / -->
      **<maxVel value="10.0"/>**
      <kp value="100000000.0" />
      <kd value="1.0" />
      <fdir1 value="1 0 0" />
      <material>Gazebo/Grey</material>
      <turnGravityOff>false</turnGravityOff>
    </gazebo>
edit flag offensive delete link more

Comments

Thanks for the answer! I'm not currently working on this part of my project, but when I return to it, I'll be sure to come back and mark yours as the right answer if it works.

Benjamin Blumer gravatar image Benjamin Blumer  ( 2014-09-13 15:38:27 -0500 )edit

Question Tools

Stats

Asked: 2013-01-10 13:06:37 -0500

Seen: 1,945 times

Last updated: Apr 09 '15