Home | Tutorials | Wiki | Issues
Ask Your Question
0

Where does gazebo search for the root.sdf file?

asked 2018-05-28 05:56:00 -0600

Adrian gravatar image

Hi together,

I compiled gazebo 9.0.0 from source with reference to sdformat 6.0.0. Now when I try to start the gzserver with the world "worlds/empty.world" I get the following error:

Error [parser.cc:48] Unable to load file[]
Gazebo multi-robot simulator, version 9.0.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.132.253
[Err] [RenderEngine.cc:725] Can't open display: 
[Wrn] [RenderEngine.cc:93] Unable to create X window. Rendering will be disabled
[Wrn] [RenderEngine.cc:293] Cannot initialize render engine since render path type is NONE. Ignore this warning ifrendering has been turned off on purpose.
Error [parser.cc:77] Unable to find or open SDF file[root.sdf]
[Err] [Server.cc:388] Unable to initialize sdf
[Wrn] [Server.cc:338] Falling back on worlds/empty.world
Error [parser.cc:77] Unable to find or open SDF file[root.sdf]
[Err] [Server.cc:388] Unable to initialize sdf

process with pid 3648 terminated by signal SIGSEGV with status: 139 (core dumped!)

The fact that gazebo cannot open the display is ok for me since gazebo is running headlessly on the robot (yes, that might seem strange but in the end it makes sense ^^).

My SDFormat library is not installed in the standard path (e.g. /usr) but in a special directory for foreign packages. To me it seems that I should tell gazebo via any environment variable where to search for root.sdf but I don't know how to do that.

I would be very thankful if anyone could give me a hint.

Thanks and cheers
Adrian

edit retag flag offensive close merge delete

Comments

Are both Gazebo and SDFormat installed in the same non-standard path?

chapulina gravatar imagechapulina ( 2018-05-28 23:14:39 -0600 )edit

More or less. They share the same PREFIX witch is /volume/software/foreign_packages and the gazebo is in ${PREFIX}/gazebo/9.0.0 and sdf in ${PREFIX}/sdformat/6.0.0. Maybe it is worth mentioning, that both packages have been compiled locally and then moved to ${PREFIX}. While moving I tried to take care of adapting all paths, especially in the pkgconfig-files and the cmake-files to fit the new directory. I also adapted the environment paths in sdf_config.h. Still the issue persists.

Adrian gravatar imageAdrian ( 2018-05-29 02:21:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-29 03:26:30 -0600

Adrian gravatar image

Ok. seems that I found the problem. It did not really have to do with gazebo but rather with SDFormat. My mistake had to do with the way I compiled and then moved SDFormat.

In essence, I had a local install directory, let's call it ${localdir} and then the final destination where SDFormat should be run later ${runtimeDir}. I invoked cmake with cmake .. -DCMAKE_INSTALL_PREFIX=${localdir}, then used make && make install and finally moved the compiled binaries to ${runtimeDir} changing all necessary paths.
However, it seems like I missed some paths or some of them had been compiled into the library, so the solution was to use cmake .. -DCMAKE_INSTALL_PREFIX=${runtimeDir} and then invoke make && make install DESTDIR=${localdir}.

With that approach the libraries were compiled correctly plus I did not have to change any paths at all after moving to ${runtimeDir}.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-05-28 05:56:00 -0600

Seen: 137 times

Last updated: May 29 '18