Running Gazebo without being superuser
Hello everyone, I am going to run Gazebo7 on Ubuntu 16.04. I installed it with ros-kinetic-desktop-full.
The command 'sudo gazebo'
works without problems.
The command 'gazebo'
returns: gzserver: error while loading shared libraries: libsdformat.so.6: cannot open shared object file: No such file or directory.
Running ldd
on gazebo (and on gzserver) I discovered that there is not a dependency on libsdformat.so.6 but only libsdformat.so.4. And I have it. So I really do not understand why he is complaining on libsdformat.so.6.
Moreover, doing:
sudo updatedb
locate libsdformat.so.6
I have no results, while doing locate libsdformat.so.4
it returns the path of the library: /home/tobi/.local/lib/libsdformat.so.4
So, my .bashrc
file is:
export LD_LIBRARY_PATH=/home/tobi/.local/lib/local/lib:$LD_LIBRARY_PATH
export PATH=/home/tobi/.local/lib/local/bin:$PATH
export PKG_CONFIG_PATH=/home/tobi/.local/lib/local/lib/pkgconfig:$PKG_CONFIG_PATH
source /home/tobi/.local/share/gazebo/setup.sh
And my setup.sh file is:
export GAZEBO_MASTER_URI=http://localhost:11345
export GAZEBO_MODEL_DATABASE_URI=http://models.gazebosim.org
export GAZEBO_RESOURCE_PATH=/home/tobi/.local/share/gazebo-10:${GAZEBO_RESOURCE_PATH}
export GAZEBO_PLUGIN_PATH=/home/tobi/.local/lib/gazebo-10/plugins:${GAZEBO_PLUGIN_PATH}
export GAZEBO_MODEL_PATH=/home/tobi/.local/share/gazebo-10/models:${GAZEBO_MODEL_PATH}
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/home/tobi/.local/lib/gazebo-10/plugins
export OGRE_RESOURCE_PATH=/usr/lib/x86_64-linux-gnu/OGRE-1.9.0
I have also a folder named gazebo-10 with an identical content. This question and This one did not solve my problem.
Any advice, please? Thanks!
As a side note: why the sudo? I don't think that's advisable.