Home | Tutorials | Wiki | Issues
Ask Your Question
0

Plugin tutorial: Gazebo starts but not plugin

asked 2016-08-09 09:07:46 -0500

hassanbot gravatar image

updated 2016-08-10 02:49:56 -0500

I'm doing the Velodyne LiDAR plugin tutorial (http://gazebosim.org/tutorials?cat=gu...), but I can't get Gazebo to recognize the plugin. I have copied the code from steps 2-4 and successfully built it using cmake and make, but when I run the scene using

cd ~/velodyne_plugin/build
gazebo ../velodyne.world

Gazebo just starts the scene without outputting anything to the terminal. I also tried adding the code supposed to spin the joint, as in step 5, with the same result. I even tried removing the plugin library file (libvelodyne_plugin.so) that I built altogether, while still having the line

<plugin name="velodyne_control" filename="libvelodyne_plugin.so"/>

in my .world-file and Gazebo still launches the scene just fine. I also tried adding another model (the Cessna air plane) to the .world-file, and that one appears as it should.

Any ideas?

EDIT: My OS is Ubuntu 16.04, and I run Gazebo version 7.0.0

EDIT2: Using the --verbose tag gives the following output:

~/Developer/Gazebo/velodyne_plugin/build$gazebo ../velodyne.world --verbose
Gazebo multi-robot simulator, version 7.0.0
Copyright (C) 2012-2016 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
Gazebo multi-robot simulator, version 7.0.0
Copyright (C) 2012-2016 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] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.121.123
[Msg] Publicized address: 192.168.121.123
[Err] [Plugin.hh:165] Failed to load plugin libvelodyne_plugin.so: libvelodyne_plugin.so: cannot open shared object file: No such file or directory
edit retag flag offensive close merge delete

Comments

1

Have you tried running gazebo in verbose mode? Just add --verbose to the command. Then update the question with the output.

chapulina gravatar imagechapulina ( 2016-08-09 11:33:30 -0500 )edit
1

And also check that your GAZEBO_PLUGIN_PATH environment variable is correctly set.

Brosseau.F gravatar imageBrosseau.F ( 2016-08-10 01:41:57 -0500 )edit

It was the environment variables that hadn't been set. Thanks! I updated the question with the verbose output and added the solution.

hassanbot gravatar imagehassanbot ( 2016-08-10 02:50:00 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-08-10 02:50:38 -0500

hassanbot gravatar image

The problem was I hadn't set the Gazebo environment variables. See this tutorial: http://gazebosim.org/tutorials?tut=co...

edit flag offensive delete link more

Comments

Could specify this? I installed Gazebo-7 and started with the tutorial same as you. We are using gazebo 7 because we use a UR5 Modell which requires ver 7 instead of 8. I think my envirment variables are correct, but I'm not shure about which are the right variables.

MaKaNu gravatar imageMaKaNu ( 2017-10-16 05:30:01 -0500 )edit
0

answered 2017-10-21 11:56:26 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I am using Gazebo 7 and I found both

export GAZEBO_PLUGIN_PATH=${GAZEBO_PLUGIN_PATH}:~/velodyne_plugin/build
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:~/velodyne_plugin/build

did not work at all.

In somehow, I realized the relative path format in xml is the issue and I solve it by changing the

<plugin name="velodyne_control" filename="libvelodyne_plugin.so"/>

to

<plugin name="velodyne_control" filename="./libvelodyne_plugin.so"/>

and everything works well.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-08-09 09:07:46 -0500

Seen: 6,067 times

Last updated: Aug 10 '16