Ask Your Question

controller type 'position_controllers/JointTrajectoryController' does not exist.

asked 2020-06-14 16:04:15 -0600

GUENNI gravatar image

updated 2020-06-14 16:15:03 -0600

I try to follow a tutorial in the "Programming Robots with ROS" book. In this tutorial I want to show and move my own robot model in Gazebo. The URDF description loads correctly in Gazebo, the model is shown. Then I extended the URDF by dynamics and ros_control. When I launch the configuration, there are errors from gazebo_ros_control, that my controller could not be loaded.

controller type 'position_controllers/JointTrajectoryController' does not exist.
In the Doc of JointTrajectoryController in the minimal description, position interface is written, that
type: "position_controllers/JointTrajectoryController"
should be used.

In my case this leads to the above error.

My controller definition:

        type: "position_controllers/JointTrajectoryController"
                - hip
                - shoulder
                - elbow
                - wrist 

rosservice call controller_manager/list_controller_types
  - diff_drive_controller/DiffDriveController
  - joint_state_controller/JointStateController
  - position_controllers/JointGroupPositionController
  - position_controllers/JointPositionController
  - controller_interface::ControllerBase
  - controller_interface::ControllerBase
  - controller_interface::ControllerBase
  - controller_interface::ControllerBase 

There it shows position_controllers only with JointPositionController. In this case my arm_controller is not found.


<include file="$(find gazebo_ros)/launch/empty_world.launch"/>

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -model my robot"/>

<rosparam file="$(find myrobot)/controllers.yaml" command="load"/>

<node name="controller_spawner" pkg="controller_manager" type="spawner" args="arm_controller" output="scre en"/>


My Environment:

- Ubuntu focal

- ROS - noetic

Which is the correct way to follow, to bring my robot to life? rostopic list should show my arm_controller. But it is not loaded.

edit retag flag offensive close merge delete


Think I got it to work. I changed JointTrajectoryController to JointGroupPositionController. /arm_controller is now loaded and a topic /arm_controller/command is visible. Now I must see, how I can get functionality of the JointTrajectoryController.

GUENNI gravatar image GUENNI  ( 2020-06-15 01:50:28 -0600 )edit

2 Answers

Sort by » oldest newest most voted

answered 2020-06-14 21:47:28 -0600

xibeisiber gravatar image

try “sudo apt-get install ros-noetic-position-controllers”?

edit flag offensive delete link more


Thanks for the suggestion. ros-noetic-position-controllers was already installed with the main package ...desktop-full.

GUENNI gravatar image GUENNI  ( 2020-06-15 01:17:38 -0600 )edit

answered 2020-06-15 02:14:24 -0600

GUENNI gravatar image

Thank you xibeisiber. Your answer helped me. Only I had to install ros-noetic-joint-trajectory-controller. This one was not automatically installed.

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools


Asked: 2020-06-14 16:04:15 -0600

Seen: 915 times

Last updated: Jun 15 '20