ros2_controllers icon indicating copy to clipboard operation
ros2_controllers copied to clipboard

Loader for controller 'XXX' not found.

Open AlezzzRd opened this issue 2 years ago • 1 comments

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. image Could you help me to think where the problem might occur? Thanks a lot.

AlezzzRd avatar May 29 '22 15:05 AlezzzRd

I think I fixed it by adding this in the CMakeList file.

target_compile_definitions(${PROJECT_NAME} PUBLIC "PLUGINLIB__DISABLE_BOOST_FUNCTIONS")

AlezzzRd avatar May 30 '22 05:05 AlezzzRd