Ask Your Question

Getting controller_manager to recognize new controller

asked 2015-04-23 21:17:45 -0500

ColinG gravatar image

Hello everyone,

I am trying to write a new controller as simply as possible and get it working with Gazebo, but now that I have everything set up, my new controller does not seem to register with controller_manager. I am new to ROS, ros_control, and cmake, so I am struggling to troubleshoot.

When launching my controller, parameters load successfully, but I receive an error for each controller:

Could not load controller 'joint1_position_controller' because controller type 'artbot_control_new/CustomController' does not exist.

What is necessary for controller_manager to recognize the new class? In my workspace I have:

1) Robot description and gazebo packages for a robot very similar to this tutorial. Works correctly with existing ros_controllers examples.

2) A control package with the following:

  • CMakeLists.txt and package.xml files specifying controller_interface, hardware_interface, pluginlib.
  • In src, a controller class .cpp file based on this example, with the namespace, class name, and pluginlib arguments updated.
  • A .yaml config file and launchfile specifying this package and the new controller.

I could be missing something very basic, but I am not sure where to look next. Let me know what information I can provide.

I'm using ROS Indigo on Ubuntu 14.04.

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-24 01:45:30 -0500

gvdhoorn gravatar image

updated 2015-04-24 01:47:55 -0500

Did you add an export section to your pkg manifest? Something like (from position_controllers/package.xml):

    <controller_interface plugin="${prefix}/artbot_control_plugins.xml"/>

Without that export, your package will not be considered a package providing a controller plugin, which is what the manager will look for.

See also wiki/pluginlib - Registering Plugin with ROS Package System.

edit flag offensive delete link more


This is exactly what I was missing! The controller is functioning now as expected. Thank you for pointing me in the right direction.

ColinG gravatar image ColinG  ( 2015-04-24 18:45:21 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-04-23 21:17:45 -0500

Seen: 551 times

Last updated: Apr 24 '15