Restitution coefficient does not change [closed]

asked 2016-09-09 02:11:47 -0500

Mari gravatar image

Hi all,

I'm trying to change the restitution coefficient in Gazebo7, but still I can't make it. My URDF code is here:

Ball:

  <link name="ball_link">
  <visual name="ball_visual">
      <origin xyz="${ball_offset_x} ${ball_offset_y} ${ball_offset_z}" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://single_model/urdf/ball/meshes/ball.dae"/>
         <scale>0.1 0.1 0.1</scale>
    </geometry>
  </visual>
  <collision>
      <origin xyz="${ball_offset_x} ${ball_offset_y} ${ball_offset_z}" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://single_model/urdf/ball/meshes/ball.dae"/>
         <scale>0.1 0.1 0.1</scale>
    </geometry>
      <surface>
         <bounce>
            <restitution_coefficient>0.5</restitution_coefficient>
            <threshold>0.01</threshold>
         </bounce>
      </surface>
  </collision>
  <inertial>
    <mass value="${ball_mass}"/>
      <origin xyz="${ball_offset_x} ${ball_offset_y} ${ball_offset_z}" rpy="0 0 0"/>
    <inertia ixx="${ball_ixx}"
             ixy="${ball_ixy}"
             ixz="${ball_ixz}"
             iyy="${ball_iyy}"
             iyz="${ball_iyz}"
             izz="${ball_izz}"/>
  </inertial>
</link>

Target:

<link name="target_link">
  <visual name="target_visual">
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://single_model/urdf/target/meshes/box.dae"/>
         <scale>0.1 0.1 0.1</scale>
    </geometry>
  </visual>
  <collision>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://single_model/urdf/target/meshes/box.dae"/>
         <scale>0.1 0.1 0.1</scale>
    </geometry>
      <surface>
         <bounce>
            <restitution_coefficient>0.5</restitution_coefficient>
            <threshold>0.01</threshold>
         </bounce>
      </surface>
  </collision>
  <inertial>
    <mass value="${target_mass}"/>
      <origin xyz="0.0 0.0 0.0" rpy="0 0 0"/>
    <inertia ixx="${target_ixx}"
             ixy="${target_ixy}"
             ixz="${target_ixz}"
             iyy="${target_iyy}"
             iyz="${target_iyz}"
             izz="${target_izz}"/>
  </inertial>
</link>

And gazebo.xacro is here: Ball:

<gazebo reference="ball_link">
    <selfCollide>true</selfCollide>
    <maxVel>10.0</maxVel>
    <minDepth>0.01</minDepth>
</gazebo>

Target:

<gazebo reference="target_link">
   <selfCollide>true</selfCollide>
   <maxVel>10.0</maxVel>
   <minDepth>0.01</minDepth>
</gazebo>

When I perform this simulation, both two objects' restitution coefficient are still 0, and they start bounding in the world.

I would really appreciate you if you would give me some advice.

edit retag flag offensive reopen merge delete

Closed for the following reason Gazebo Question: The Gazebo community prefers to answer questions at: http://answers.gazebosim.org by tfoote
close date 2017-03-21 20:12:20.732751

Comments

you might want to check this

alienmon gravatar image alienmon  ( 2016-09-09 03:32:03 -0500 )edit