Resolving symbol lookup errors in Gazebo 1.5 and 1.8
Hi all,
I am trying to convert my ROS Fuerte Gazebo simulations over to the stand alone Gazebo setup. My simulatoins consist of SDF files with a plugin to publish data to ROS.
I have been following the 1.5 tutorial, effectively creating a standalone package for compiling my plugin code. This has worked okay in that when the plugin is disabled (ie with an incorrect GAZEBOPLUGINPATH the model is displayed, but does nothing.
With the GAZEBOPLUGINPATH correctly set my simulation exits with:
Msg Waiting for master
Msg Connected to gazebo master @ http://127.0.0.1:11345
Msg Publicized address: 192.168.1.5
gazebo: symbol lookup error: /home/petermilani/local/lib/gazebo_plugins/libros_model_plugin.so: undefined symbol: _ZN8hydmotorC1Ev
Error [ConnectionManager.cc:123] Connection Manager is not running
Now having a look at this similar error, however the solutions do not seem relevant to my plugin or have already been included. My plugin simply models the actuator dynamics of the manipulator, and works in Gazebo 1.0.
I think that it is an issue with the complilation. At the moment my CMakeLists.txt is as per the 1.5 tutorial. And looking through the build directory it is compiling against Gazebo 1.8.
In my fuerte ros package, my CMakeLists has an entry:
rosbuild_add_library(${PROJECT_NAME} src/hydcylinder.cpp)
and the object hydmotor
is defined in hydcylinder.cpp
could the lack of this in my new gazebo package be the reason why a symbol _ZN8hydmotorC1Ev
is not found? If so what is the equivalent call for a non-ros CMakeLists.Txt to compile and include it?
UPDATE 1: Just comparing CMakeLists.txt in the rosbuild environment: In ROSBuild:
rosbuild_add_library(${PROJECT_NAME} src/hydcylinder.cpp) . ...
rosbuild_add_library(HMMv2 src/HMMv2motors.cpp)
in the current standalone environment:
add_library(ros_model_plugin SHARED src/HMMv2motors.cc)
when I add to the standalone environment: addlibrary(rosmodel_plugin SHARED src/hydcylinder.cpp)
I get an error about:
add_library cannot create target "ros_model_plugin" because another target
with the same name already exists.
which sort of makes sense and as the hydcylinder.h is included in HMMv2motors.cc I can't see why a separate library was necessary.
cheers
Peter
Have you tried `$ sudo ldconfig`?
just ran it on verbose setting, didn't see anything unusual, and didn't change the result. I just added an update regarding CMakeLists.txt