A simple question on changing bounce properties
Hello everyone,
I'm trying to model a cube and a slope. The cube free fall under gravity and make collision with the slope. I'm curious about their bounce properties. I try to set the kp in <ode> and restitution_coefficient in <bounce> in my SDF code.
I'm running Gazebo 7 on Ubuntu 14.04.
1.Restitution_coefficient should be the only factor that affects the collision effect, but when I change the value of kp, the collision effect is also affected. Why?
2.When I set the value of restitution_coefficient equal to zero, the cube still bounces from the slope. According to common sense, the cube should be rest on the slope. Why bounce?
The cube SDF:
<?xml version="1.0" ?>
<sdf version="1.5">
<model name="elasticBall">
<pose>0.5 0 0 0 -0.7854 0</pose>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>0.3 0.3 0.3</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>10</mu>
<mu2>10</mu2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0.0</restitution_coefficient>
<threshold>0.01</threshold>
</bounce>
<contact>
<ode>
<kp>1e10</kp>
<max_vel>1e10</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<inertial>
<mass>2</mass>
<inertia>
<ixx>1</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>1</iyy>
<iyz>0</iyz>
<izz>1</izz>
</inertia>
</inertial>
<visual name="visual">
<geometry>
<box>
<size>0.3 0.3 0.3</size>
</box>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/WoodPallet</name>
</script>
</material>
</visual>
</link>
</model> </sdf>
The Slope SDF
<?xml version="1.0"?>
<sdf version="1.4">
<model name="slopePlaneLong">
<static>true</static>
<pose>0.5 0 0 0 -0.2618 0</pose>
<link name="link">
<collision name="collision">
<geometry>
<box>
<size>5 5 .01</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>10</mu>
<mu2>10</mu2>
</ode>
</friction>
<bounce>
<restitution_coefficient>0.0</restitution_coefficient>
<threshold>0.01</threshold>
</bounce>
<contact>
<ode>
<kp>1e10</kp>
<max_vel>1e10</max_vel>
<min_depth>0.001</min_depth>
</ode>
</contact>
</surface>
</collision>
<visual name="visual">
<cast_shadows>false</cast_shadows>
<geometry>
<box>
<size>5 5 .01</size>
</box>
</geometry>
<material>
<script>
<name>Gazebo/Orange</name>
</script>
</material>
</visual>
</link>
</model>
</sdf>
The launch file
<launch>
<!-- these are the arguments you can pass this launch file, for example paused:=true -->
<arg name="use_sim_time" default="true"/>
<arg name="gui" default="true"/>
<arg name="headless" default="false"/>
<arg name="debug" default="false"/>
<arg name="paused" default="true"/>
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
<include file="$(find gazebo_ros)/launch/empty_world.launch">
<arg name="world_name" value="$(find collision_gazebo)/worlds/blank.world"/>
<arg name="debug" value="$(arg debug)" />
<arg name="gui" value="$(arg gui)" />
<arg name="paused" value="$(arg paused)"/>
<arg name="use_sim_time" value="$(arg use_sim_time)"/>
<arg name="headless" value="$(arg headless)"/>
</include>
<node name="spawn_slopePlane" pkg="gazebo_ros" type="spawn_model" args="-file $(find collision_description)/sdf/slopePlane.sdf -sdf -x 0.6 -z 0.6 -model slopePlane" />
<node name="spawn_Cube" pkg="gazebo_ros" type="spawn_model" args="-file $(find ...
I'm worried about similar problem. Could you resolve this problem? If so, would you tell me the solution of this problem?