Display urdf file in gazebo
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
What error are you getting?
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...
... the walls. Maybe we are missing something about the way Gazebo and RViz use urdf files. Any help is appreciated.
I just tried your file and it spawns fine for me. have you tried updating to the latest version of gazebo?