0
$\begingroup$

Rosanswers logo

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


Originally posted by Selim on ROS Answers with karma: 11 on 2012-06-26

Post score: 1


Original comments

Comment by Lorenz on 2012-06-26:
What error are you getting?

Comment by Erwan R. on 2012-06-26:
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...

Comment by Erwan R. on 2012-06-26:
... the walls. Maybe we are missing something about the way Gazebo and RViz use urdf files. Any help is appreciated.

Comment by mcevoyandy on 2012-07-26:
I just tried your file and it spawns fine for me. have you tried updating to the latest version of gazebo?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Erwan R. with karma: 697 on 2012-07-29

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.