STL Colision problem

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

STL Colision problem

Post by Yougo »

Hello,

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 2895 times
Screenshot from 2020-11-27 13-16-13.png
Screenshot from 2020-11-27 13-16-13.png (76.78 KiB) Viewed 2895 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">
        <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>
and here is the stl file :

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