Ask Your Question
1

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 http://wiki.ros.org/joint_trajectory_... 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:

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

rosservice call controller_manager/list_controller_types
types: 
  - diff_drive_controller/DiffDriveController
  - joint_state_controller/JointStateController
  - position_controllers/JointGroupPositionController
  - position_controllers/JointPositionController
base_classes: 
  - 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.


<launch>

<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"/>

</launch>

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

Comments

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
0

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

Comments

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
1

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

Stats

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

Seen: 915 times

Last updated: Jun 15 '20