Gazebo | Ignition | Community
Ask Your Question

Where is element <gazebo> in the source code parsed?

asked 2020-04-08 07:38:47 -0600

ramonvp gravatar image

Hi all,
I'm not sure if I am setting correctly the parameter names in my URDF model, specifically the tags under <gazebo> elements, such as materials, friction parameters, joints, etc... Therefore, I cloned the gazebo repo and was searching directly in the code, and I found where most of the elements are searched in the XML tree (i.e physics/, rendering/, etc..), but not the <gazebo> element. Anybody knows this info?



edit retag flag offensive close merge delete


not a full answer, but you might check the SDFormat code, or possible the gazebo_ros_pkgs code

Peter Mitrano gravatar imagePeter Mitrano ( 2020-04-08 11:00:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-13 06:26:27 -0600

ramonvp gravatar image

updated 2020-04-17 15:04:22 -0600

I finally found my own answer, just posting it here if by any chance anybody in the future is interested.

The code that really parses this XML file is the sdformat library, source code can be found here:

In my case, I cloned the branch 6_to_default.
The exact place where the parsing takes place is in file src/ in function line 1215:

void URDF2SDF::ParseSDFExtension(TiXmlDocument &_urdfXml)

Here you will be able to read the exact tags that are supported and parsed. If you follow a suggested answer in a thread and that does not work for you, take into account that some of the examples I have seen are wrong, for example tag self_collide is not parsed in the gazebo extension, the correct tag is selfCollide. Almost the same, but not quite.


edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-04-08 07:38:47 -0600

Seen: 70 times

Last updated: Apr 17 '20