STL Colision problem

Official Python bindings with a focus on reinforcement learning and robotics.
Post Reply
Posts: 1
Joined: Fri Nov 27, 2020 12:20 pm

STL Colision problem

Post by Yougo »


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 :
Screenshot from 2020-11-27 13-16-40.png
Screenshot from 2020-11-27 13-16-40.png (10.5 KiB) Viewed 1507 times
Screenshot from 2020-11-27 13-16-13.png
Screenshot from 2020-11-27 13-16-13.png (76.78 KiB) Viewed 1507 times
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">
            <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"/>
            <origin rpy="0 0 0" xyz="0 0 0"/>
                <mesh filename="fractalPlane4.stl" scale="1 1 1"/>
            <material name="white">
                <color rgba="1 1 1 1"/>
            <origin rpy="0 0 0" xyz="0 0 0"/>
                <mesh filename="fractalPlane4.stl"/>
and here is the stl file :

Thanks in advance!


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.
Post Reply