0
$\begingroup$

Gazebo Answers logo

Hi, I am new to Gazebo and learning it as i have to do my Final Year Project in it. I am following the tutorials from the official site of gazebo and now i am stuck at Inserting Models Plugin.

When at the end i run server it shows error.

salmaan@ubuntu:~$ gzserver ~/gazebo_plugin_tutorial/factory.sdf Gazebo multi-robot simulator, version 1.8.6 Copyright (C) 2013 Open Source Robotics Foundation. Released under the Apache 2 License. http://gazebosim.org

Warning [parser.cc:361] Converting a deprecated SDF source[/home/salmaan/gazebo_plugin_tutorial/factory.sdf]. Warning [Converter.cc:58] Version[1.3] to Version[1.4] Please use the gzsdf tool to update your SDF files. $ gzsdf convert [sdf_file] Msg Waiting for master Msg Connected to gazebo master @ http://127.0.0.1:11345 Msg Publicized address: 192.168.1.6

Error [Plugin.hh:126] Failed to load plugin libfactory.so: libfactory.so: cannot open shared object file: No such file or directory

I discovered that the directory is build/libfactory.so, i changed the directory in the world file but still it gives me the same error. :/

NOTE: I am making the files and folders on my home directory, not in gazebo directory. But previous 2 examples of plugins worked fine.


Originally posted by SalmaanAhmed on Gazebo Answers with karma: 17 on 2013-07-06

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Gazebo Answers logo

Hi,

you have to set up the GAZEBO_PLUGIN_PATH to your plugin file:

export GAZEBO_PLUGIN_PATH=<path_to_your_lib>/:${GAZEBO_PLUGIN_PATH}

you should add this line to your ~/.bashrc file, and then source it.


Another thing, you should fix the sdf since it is an older version, you could run this tool for that:

$ gzsdf convert <path_to_sdf>/factory.sdf

Cheers, Andrei


Originally posted by AndreiHaidu with karma: 2108 on 2013-07-07

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by SalmaanAhmed on 2013-07-08:
i copied

export GAZEBO_MODEL_PATH=$HOME/gazebo_plugin_tutorial/models:$GAZEBO_MODEL_PATH at end of the .bashrc file... But it gives me the same error .... Dont know why ???

Comment by Ben B on 2013-07-08:
What is the exact path of your plugin?

Comment by SalmaanAhmed on 2013-07-09:
it is /home/salmaan/gazebo_plugin_tutorial/factory.cc

Comment by AndreiHaidu on 2013-07-09:
export GAZEBO_PLUGIN_PATH as well, /lib

Comment by SalmaanAhmed on 2013-07-09:
It worked. Thanks, You rock :)

$\endgroup$

Your Answer

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