Gazebo | Ignition | Community
Ask Your Question
0

Robot collision and visuals not loaded/shown properly

asked 2022-05-04 05:45:48 -0500

NotARobot gravatar image

Greetings. I try to load a Universal Robots UR10 via it's URDF file into Gazebo. The robot spawner does allegedly spawn the robot correctly. Nevertheless, nether the robots visuals (.dae) nor its collisions (.stl) are shown. I can verify that the robot is in the world with all its links and joints according to the 'World' tab, also if the inertia is visualized, the inertia is properly displayed (as seen in the images).

image description

RViz does visualize properly.

image description

image description

Due to it's complexity I tried to load just the base of the robot for a minimal example.

<?xml version="1.0"?>

<robot name="test_ur10" xmlns:xacro="http://wiki.ros.org/xacro">

<link name="world">
    <origin xyz="0 0 1" rpy="0 0 0"/>
</link>

<link name="base">
    <visual>
        <origin xyz="0 0 1" rpy="0 0 0"/>
        <geometry>
            <mesh filename="package://models/meshes/ur10/visual/base.dae" scale="0.001 0.001 0.001"/>
        </geometry>
        <color rgba="${255/255} ${108/255} ${10/255} 1.0"/>
    </visual>
    <collision>
        <origin xyz="0 0 1" rpy="0 0 0"/>
        <geometry>
            <box size="1 1 1"/>
        </geometry>
    </collision>
    <inertial>
        <origin xyz="0 0 1" rpy="0 0 0"/>
        <mass value="1"/>
        <inertia ixx="1" ixy="0.0" ixz="0.0"
                 iyy="1" iyz="0.0"
                 izz="1" />
    </inertial>
</link>

<joint name="wold_joint" type="fixed">
    <parent link="world"/>
    <child link="base"/>
</joint>

</robot>

But even here the visual is not displayed, just the collision (in order to confirm a simple collision loads with the visual).

image description

Note: The meshes are originally from Universal Robots and at least the .stl are checked by me in Fusion 360.

Is there a solution to my problem? Am I missing something?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-08-03 02:37:45 -0500

NotARobot gravatar image

Even if the path for the meshes is defined as 'package' somewhere in the process it is changed to 'model' and subsequently Gazebo searches its model directory (.gazebo/models). My workaround is the creation of a soft link between my meshes within my ROS Package and the model directory (ln -s [Source_File_Path] [Symbolic_Link_Path]).

It is not elegant but it works - I hope this helps others.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-05-04 05:45:48 -0500

Seen: 72 times

Last updated: Aug 03 '22