expose pybullet changeDynamics(spinningFriction=..., rollingFriction=..., restitution=...)

Bullet C-API b3ChangeDynamicsInfoSetSpinningFriction/RollingFriction/Resitution
b3PhysicsParamSetRestitutionVelocityThreshold, / pybullet.setPhysicsEngineParameter restitutionVelocityThreshold:
if the velocity is below this threshhold, the restitution is zero (this prevents energy buildup at near-resting state)
pybullet restitution.py example.
This commit is contained in:
Erwin Coumans
2017-05-26 18:14:38 -07:00
parent 8c6d4a4c85
commit b645963879
12 changed files with 317 additions and 51 deletions

View File

@@ -0,0 +1,33 @@
<?xml version="0.0" ?>
<robot name="urdf_robot">
<link name="baseLink">
<contact>
<restitution value="0.5" />
<rolling_friction value="0.001"/>
<spinning_friction value="0.001"/>
</contact>
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="10.0"/>
<inertia ixx="1" ixy="0" ixz="0" iyy="1" iyz="0" izz="1"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="textured_sphere_smooth.obj" scale="0.5 0.5 0.5"/>
</geometry>
<material name="white">
<color rgba="1 1 1 1"/>
</material>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="0.5"/>
</geometry>
</collision>
</link>
</robot>