0
$\begingroup$

Gazebo Answers logo

I recently checked out the source code of Gazebo 1.3.0 (02a2ec16375a+ (gazebo_1.3) gazebo_1.3.0) and was looking into how the XML and SDF system works. I noticed that for each SDF file is loaded (from gazebo/Server.cc:, Server::LoadFile(), then from gazebo/sdf/interface/parser.cc:616, readXml()), it makes multiple calls to sdf::init(). When debugging, it would load the same SDF description files (in gazebo/sdf/1.3) several times.

This seems like it might be redundant and inefficient. Are there plans to cache these loaded XML documents, or are there reasons why they are reloaded every time?


Originally posted by eacousineau on Gazebo Answers with karma: 27 on 2012-12-12

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

The current plan is to generate C++ class from the SDF description files at compile time. This will bypass touching the filesystem, and also bypass a lot of string based searching.

Look for this in Gazebo 1.4


Originally posted by nkoenig with karma: 7676 on 2012-12-12

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by eacousineau on 2012-12-12:
Ah, makes sense. Thank you.

$\endgroup$

Your Answer

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