Home | Tutorials | Wiki | Issues
Ask Your Question
0

Could not open file hello.world

asked 2015-05-11 21:07:57 -0500

mugenHexapod gravatar image

updated 2015-05-12 17:45:45 -0500

I went over the tutorial, and produced the libhelloworld.so file, I checked env and found GAZEBOPLUGINPATH=:/home/rhexlover/gazeboplugintutorial/build being added. When I ran it, it just didn't open

rhexlover@rhexlover-OptiPlex-790:~/gazebo_plugin_tutorial/build$ gzserver ../hello.world --verboseGazebo multi-robot simulator, version 5.1.0 
Copyright (C) 2012-2015 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: 128.114.62.230
[Err] [Server.cc:285] Could not open file[../hello.world]

What's wrong here?

UPDATE: I created my model in /home/rhexlover/.gazebo/models/my_robot by following the tutorial. And I added the following to my model's sdf file,

<sdf version='1.5'>
<world name="default">
<plugin name="hello_world" filename="libhello_world.so"/>
</world>
<model name="my_robot">
...

I click my model in Gazebo, and click again to put it in the world. It doesn't show up and in the terminal it prints the entire content of the model's sdf file.

but the plugin works when I call it directly with gzserver:

rhexlover@rhexlover-OptiPlex-790:~/gazebo_plugin_tutorial/build$ $ gzserve ~/.gazebo/models/my_robot/model.sdf --verbose
Gazebo multi-robot simulator, version 5.1.0
Copyright (C) 2012-2015 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: 128.114.62.230
Hello World!
^Crhexlover@rhexlover-OptiPlex-790:~/gazebo_plugin_tutorial/build$

UPDATE #2: I think I figured it out. The world tag should not be in model's sdf. When I put my model's sdf into a .world file and the model tag under the world tag, it all works now.

edit retag flag offensive close merge delete

Comments

It seems like the hello.world file was not found. Did you copy the world file into ~/gazebo_plugin_tutorial/hello.world?

chapulina gravatar imagechapulina ( 2015-05-12 01:13:14 -0500 )edit

Yes that was the problem. I didn't have the file. But when I tried to run it from my model, it prints out the entire sdf content. I'll put the setup I have above to show that how it occurs.

mugenHexapod gravatar imagemugenHexapod ( 2015-05-12 16:23:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-05-12 17:50:11 -0500

mugenHexapod gravatar image

I think I figured it out. The world tag should not be in model's sdf. When I put my model's sdf into a .world file and the model tag under the world tag, it all works now.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

Stats

Asked: 2015-05-11 21:07:57 -0500

Seen: 1,142 times

Last updated: May 12 '15