ros2_controllers
ros2_controllers copied to clipboard
Loader for controller 'XXX' not found.
Hi,
I tried to write a new controller according to the guidance in this link. https://control.ros.org/foxy/doc/ros2_controllers/doc/writing_new_controller.html
I think my export definition for pluginlib in the CMakeList file and at the bottom of the controller .cpp file are correct. But when I tried to spawn the controller using code as follows.
effort_position_controller_spawner = Node(
package="controller_manager",
executable="spawner.py",
arguments=["effort_position_controller", "--controller-manager", "/controller_manager"],
)
I got the error as follows.
Could you help me to think where the problem might occur? Thanks a lot.
I think I fixed it by adding this in the CMakeList file.
target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")