Ask Your Question
1

Display urdf file in gazebo

asked 2012-06-26 05:24:48 -0500

Selim gravatar image

Hi, I made a program that autommatically generate an .urdf file from a .fig file (generate by Xfig editor). When I display my urdf file with RViz, the objects and colors are like they should be so everything is normal. I use the command line :

roslaunch urdf_tutorial display.launch model:=PlanSalle.urdf

but when I want to display it in gazebo, it doesn't work. I use :

rosrun gazebo spawn_model -file `pwd`/PlanSalle.urdf -urdf -z 1 -model salle

here is my code :

<robot name="origins">
<link name="base_link">
    <visual>
        <geometry>
            <box size ="18.8 0.4 2"/>
        </geometry>
    </visual>
    <collision>
        <geometry>
            <box size ="18.8 0.4 2"/>
        </geometry>
    </collision>
        <inertial>
                <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
        <mass value="0.1"/>
        </inertial>
</link>

<link name="Mur1">
    <visual>
        <geometry>
            <box size ="11.0 0.4 2"/>
        </geometry>
    </visual>
    <collision>
        <geometry>
            <box size ="11.0 0.4 2"/>
        </geometry>
    </collision>
        <inertial>
                <origin xyz="1 1 1" />
                <inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
        <mass value="10"/>
        </inertial>
</link>

<joint name="base_link_to_Mur1" type="fixed">
    <origin xyz="0 0 0" rpy="0 0 0" />      
    <parent link="base_link"/>
    <child link="Mur1"/>
</joint> 
</robot>

Does someone know what's wrong ? thanks

edit retag flag offensive close merge delete

Comments

What error are you getting?

Lorenz gravatar image Lorenz  ( 2012-06-26 05:42:42 -0500 )edit

In Gazebo, the object looks to be spawned (as it appears in the list) but can't be seen, as nothing is displayed. If the item is selected in the list, handles are appears to move it, suggesting that it is a displaying issue. In RViz, we are able to visualize the 3D model with the rights colors on...

Erwan R. gravatar image Erwan R.  ( 2012-06-26 21:39:05 -0500 )edit

... the walls. Maybe we are missing something about the way Gazebo and RViz use urdf files. Any help is appreciated.

Erwan R. gravatar image Erwan R.  ( 2012-06-26 21:43:15 -0500 )edit

I just tried your file and it spawns fine for me. have you tried updating to the latest version of gazebo?

mcevoyandy gravatar image mcevoyandy  ( 2012-07-26 13:37:30 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2012-07-29 21:45:48 -0500

Erwan R. gravatar image

Thanks for answering.

We checked for the exact way urdf files must be written and we updated the python program that auto-generates the urdf (there were fields missing in the previous program). Now it's spawning well and walls are detected from sensors.

We're working with electric version.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-06-26 05:24:48 -0500

Seen: 2,003 times

Last updated: Jul 29 '12