I am a PhD student trying to use PyBullet for clash simulations.
I have set up a model using an URDF file consisting of bodies with geometry described with cylinders.
Code: Select all
<link name="part6">
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value="1e-6"/>
<inertia ixx="1e-6" ixy="1e-6" ixz="1e-6" iyy="1e-6" iyz="1e-6" izz="1e-6"/>
</inertial>
<visual>
<origin rpy="1.57079 0 0" xyz="0 -1 0"/>
<geometry>
<cylinder radius="0.05" length="2"/>
</geometry>
<material name="Green"/>
</visual>
<collision>
<origin rpy="1.57079 0 0" xyz="0 -1 0"/>
<geometry>
<cylinder radius="0.05" length="2"/>
</geometry>
</collision>
</link>
>>> simulate(steps_)
result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 13640, 'remainingResidual': 1.3439036802013416e-06},)
result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 7394348, 'remainingResidual': 9.57627865711726e-06},)
As soon as I replace one part with STL geometry instead of cylinders, the residuum is way too high. Result is that joints constraints are not working and bodies are moving free in space.
Code: Select all
<link name="part6">
<inertial>
<origin rpy="0 0 0" xyz="0 0 0 "/>
<mass value="1e-6"/>
<inertia ixx="1e-6" ixy="1e-6" ixz="1e-6" iyy="1e-6" iyz="1e-6" izz="1e-6"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="part6.stl"/>
</geometry>
<material name="Blue"/>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="part6.stl"/>
</geometry>
</collision>
</link>
I have attached a simlified model. Some short explanations:>>> simulate(steps_)
result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 1000000000, 'remainingResidual': 6700.951337930589},)
result: ({'islandId': 8, 'numBodies': 9, 'numIterationsUsed': 1000000000, 'remainingResidual': 5282.910818305261},)
- 2 urdf files are needed since it is a closed loop system
- dummypart is used because PyBullet does not support revolute constraint between 2 models (createConstraint)
Any help is highly appreciated
Christian