Rosanswers logo

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!

Originally posted by ColinG on ROS Answers with karma: 68 on 2015-04-23

Post score: 2


1 Answer 1


Rosanswers logo

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.

Originally posted by gvdhoorn with karma: 86574 on 2015-04-24

This answer was ACCEPTED on the original site

Post score: 2

Original comments

Comment by ColinG on 2015-04-24:
This is exactly what I was missing! The controller is functioning now as expected. Thank you for pointing me in the right direction.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.