ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

Using the diff_drive_controller as an example, from what I can see these are potential fixes:

  • You want to specify a SHARED library for your plugins (this is not the default anymore in ROS 2 like it is in ROS 1 when you make a library). You can do this by changing

add_library(${PROJECT_NAME} src/LinearController1.cpp src/LinearController1.cpp )

to

add_library(${PROJECT_NAME} SHARED src/LinearController1.cpp src/LinearController1.cpp )

  • The xml where you specify the plugins, the library path shouldn't be "/liblinear_controller". instead it should probably just be "linear_controller".

  • The pluginlib_export_plugin_description_file(linear_controller linear_controller_plugins.xml) line in the CMakeLists.txt for your plugin package I believe should be pluginlib_export_plugin_description_file(controller linear_controller_plugins.xml)