mirror of
https://github.com/bulletphysics/bullet3
synced 2024-12-12 21:00:11 +00:00
6afa0a463d
add cube_convex.urdf for testing this collisionMargin. Test script: import pybullet as p import time p.connect(p.GUI) plane = p.loadURDF("plane_implicit.urdf") cube = p.loadURDF("cube_convex.urdf",[0,0,1]) p.setGravity(0,0,-10) while (1): p.stepSimulation() pts = p.getContactPoints() p.changeDynamics(plane,-1,collisionMargin=0.3) p.changeDynamics(cube,-1,collisionMargin=0.3) print("===================") print("cube pos=", p.getBasePositionAndOrientation(cube)[0]) print("margin=", p.getDynamicsInfo(plane,-1)[11]) #time.sleep(1./10.)
33 lines
805 B
XML
33 lines
805 B
XML
<?xml version="1.0" ?>
|
|
<robot name="cube">
|
|
<link name="baseLink">
|
|
<contact>
|
|
<lateral_friction value="1.0"/>
|
|
<rolling_friction value="0.0"/>
|
|
<contact_cfm value="0.0"/>
|
|
<contact_erp value="1.0"/>
|
|
</contact>
|
|
<inertial>
|
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
|
<mass value="1.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="cube.obj" scale="1 1 1"/>
|
|
</geometry>
|
|
<material name="white">
|
|
<color rgba="1 1 1 1"/>
|
|
</material>
|
|
</visual>
|
|
<collision>
|
|
<origin rpy="0 0 0" xyz="0 0 0"/>
|
|
<geometry>
|
|
<mesh filename="cube.obj" scale="1 1 1"/>
|
|
</geometry>
|
|
</collision>
|
|
</link>
|
|
</robot>
|
|
|