To show a .urdf in gazebo gui

asked 2019-03-20 00:40:07 -0500

arifle gravatar image

updated 2019-03-20 02:30:04 -0500

gvdhoorn gravatar image


I am trying to build my own robot to make work in gazebo. The model is a .urdf file in which I put a few .xacro files with <xacro:include> tag and the model works, I think, quite well. The model can be shown in rviz, but it failed in Gazebo.

In the launch file, I use the following line to load the model

<param name="robot_description" command="cat '$(find omniprobe_description)/urdf/omniprobe_test.urdf'" />

The error:

Error:   No link elements found in urdf file
         at line 180 in /build/buildd/urdfdom-0.2.10+dfsg/urdf_parser/src/model.cpp
Error [] Unable to call parseURDF on robot model
Error [] parse as old deprecated model file failed.
Error [] Unable to read sdf string[<!-- Omniprobe project, Version 1.0. --><!-- URDF model --><robot xmlns:xacro="" name="robot"><!-- The materials --><xacro:include filename="$(find omniprobe_description)/urdf/materials.xacro" /><!-- Math & physic items --><xacro:include filename="$(find omniprobe_description)/urdf/chassis.xacro" /><!--  Components  --><!-- Base link (chassis) --><xacro:chassis chas_name="base" /><!-- Motors --><xacro:motor cha_name="base" mot_name="Fwd" mot_pos="0" reflect="1" mot_sig="1" mot_no="0" /><xacro:motor cha_name="base" mot_name="left" mot_pos="1" reflect="-1" mot_sig="-1" mot_no="1" /><xacro:motor cha_name="base" mot_name="right" mot_pos="1" reflect="-1" mot_sig="1" mot_no="2" /><!-- Wheel-coupling --><xacro:wcoupling cha_name="base" mot_name="Fwd" wcopl_name="fwcopl" /><xacro:wcoupling cha_name="base" mot_name="left" wcopl_name="lwcopl" /><xacro:wcoupling cha_name="base" mot_name="right" wcopl_name="rwcopl" /><!-- Wheels --><xacro:twheel cha_name="base" mot_name="Fwd" wcopl_name="fwcopl" twhl_name="F" /><xacro:twheel cha_name="base" mot_name="left" wcopl_name="lwcopl" twhl_name="L" /><xacro:twheel cha_name="base" mot_name="right" wcopl_name="rwcopl" twhl_name="R" /><origin xyz="0 0 0" rpy="0 -0 0" /></robot>]
edit retag flag offensive close merge delete


You say it failed in gazebo. Can you elaborate a little more about exactly what did or didn't happen. You will need to use a spawner to create the model in gazeob, setting the robot_description alone isn't enough.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-03-20 08:00:43 -0500 )edit

@PeteBlackerThe3rd Thanks, Pete. I have modified it to add some physic description in the .urdf file, and use .xacro to replace .urdf when using it in gazebo.

arifle gravatar imagearifle ( 2019-03-20 22:10:30 -0500 )edit