Gazebo | Ignition | Community
Ask Your Question

Adrien Thibault's profile - activity

2017-03-06 16:40:36 -0600 received badge  Enthusiast
2017-02-28 16:02:00 -0600 asked a question Error Plugin

Hi, I am trying to implement a basic camera using ROS (Kinetic) and Gazebo (v 7.5).

I need the ROS plugin to publish my frames on a rostopic. I am using the SDF standard and not URDF.

I had trouble finding such a plugin. First I tried to compile it myself from the sources found there using this CMakeLists.txt :

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)




# Find Gazebo
find_package(gazebo REQUIRED)

# Build our plugins
add_library(gazebo_ros_camera_utils gazebo_ros_camera_utils.cpp)
add_dependencies(gazebo_ros_camera_utils ${PROJECT_NAME}_gencfg)
target_link_libraries(gazebo_ros_camera_utils ${GAZEBO_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})

add_library(gazebo_ros_camera gazebo_ros_camera.cpp)
add_dependencies(gazebo_ros_camera ${PROJECT_NAME}_gencfg)
target_link_libraries(gazebo_ros_camera gazebo_ros_camera_utils ${GAZEBO_LIBRARIES} CameraPlugin    ${catkin_LIBRARIES})

It created the shared library, but when using it in this SDF model

<?xml version="1.0"?>
<sdf version="1.5">
<world name="default">
<!-- A global light source -->

    <!-- A ground plane -->

    <!-- A testing model that includes the camera sensor model -->
    <model name="my_camera">

        <!-- Attach the plugin to this model -->
        <plugin name='CameraPlugin' filename=''/>




using the command

gazebo --verbose ../

But after launching successfuly Gazebo I received the error

[Err] [Plugin.hh:165] Failed to load plugin /home/adrien/camera_plugin/build/ undefined symbol: _ZTIN6gazebo12CameraPluginE

From different forums I found it meant that my linkage was not done properly in the CMakeLists.txt. I haven't been able to solve this.

I finally compile gazebo_ros_pkgs. The compilation provides many plugins including the one interesting me :

But when using this library as the plugin of my camera in my SDF world file I receive the following error after launching Gazebo :

[Err] [] Model[my_camera] is attempting to load a plugin, but detected an incorrect plugin type. Plugin filename[] name[CameraPlugin]

So far I have no idea of what that error means.

I would appreciate any help !

Thanks in advance,