To put it simple, I have issues when loading a urdf representing a fractal ground linking to a stl. Collisions are not working as I thought they would. The visual representation is fine, but the collisions are not working.
Here is some pictures :
You can clearly see the robot is colliding with something, but it doesn't match the visual representation of my ground, thus we can observe a floating effect.
Here is the URDF file :
Code: Select all
<?xml version="1.0" ?>
<robot name="plane">
<link name="planeLink">
<inertial>
<origin rpy="0 0 0" xyz="0 0 0"/>
<mass value=".0"/>
<inertia ixx="0" ixy="0" ixz="0" iyy="0" iyz="0" izz="0"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="fractalPlane4.stl" 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="fractalPlane4.stl"/>
</geometry>
</collision>
</link>
</robot>
https://gitlab.com/UgoRoux/stl_file
Thanks in advance!
EDIT :
I solved my problem by using createVisualShape and createCollisionShape instead of load URDF.
The createCollisionShape can be used with the flag: GEOM_FORCE_CONCAVE_TRIMESH.