ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Unknown controller type with Moveit

asked 2021-08-18 07:59:44 -0500

Gates gravatar image

I am trying to control the open manipulator on the TB3. I created a Moveit config package and everything works fine until I want to execute the plan on a Gazebo simulated robot. Planning is solved but no controllers are found so execution failed.

When I use roslaunch open_manipulator_controller open_manipulator_controller.launch use_platform:=false use_moveit:=true I can control the Gazebo robot but with my custom Moveit config file, I cannot.

I have controllers.yaml and I believe it is loaded correctly because the problem comes from the controller types in the .yaml file.

[ERROR] [1629291143.338820460, 1893.061000000]: Unknown controller type: position_controllers/JointPositionController
[ERROR] [1629291143.339038429, 1893.061000000]: Unknown controller type: position_controllers/JointPositionController
[ERROR] [1629291143.339144118, 1893.061000000]: Unknown controller type: position_controllers/JointPositionController
[ERROR] [1629291143.339236787, 1893.061000000]: Unknown controller type: position_controllers/JointPositionController
[ERROR] [1629291143.339306340, 1893.061000000]: Unknown controller type: joint_state_controller/JointStateController

And the respective controllers.yaml is here:

controller_list:
  - name: joint1_position
    action_ns: /om_with_tb3
    type: position_controllers/JointPositionController
    default: true
    joints: 
      - joint1

  - name: joint2_position
    action_ns: /om_with_tb3
    type: position_controllers/JointPositionController
    default: true
    joints: 
      - joint2

  - name: joint3_position
    action_ns: /om_with_tb3
    type: position_controllers/JointPositionController
    default: true
    joints: 
      - joint3

  - name: joint4_position
    action_ns: /om_with_tb3
    type: position_controllers/JointPositionController
    default: true
    joints: 
      - joint4

  - name: joint_state_controller
    action_ns: /om_with_tb3
    type: joint_state_controller/JointStateController
    default: true
    joints:
      - joint1
      - joint2
      - joint3
      - joint4

With a bit of research, I found out that this problem is linked to some missing Moveit controller packages. I tried to install them sudo apt install ros-melodic-ros-controllers and sudo apt install ros-melodic-joint-state-controller but it looks like I already have them.

Anyone has any ideas why the Moveit config package cannot recognize any controller types?

edit retag flag offensive close merge delete

Comments

did you install gazebo-ros-controllers?

pmuthu2s gravatar image pmuthu2s  ( 2021-08-18 08:05:08 -0500 )edit

it is installed in default as well. ros-melodic-gazebo-ros-control is already the newest version (2.8.7-1bionic.20210616.200839)

Gates gravatar image Gates  ( 2021-08-18 08:20:38 -0500 )edit

MoveIt "controllers" != ros_control controllers.

gvdhoorn gravatar image gvdhoorn  ( 2021-08-18 10:17:56 -0500 )edit

Yes, I am aware of that part. Actually that's why I tried to explain the problem as "Moveit controller" issue. However, similar problem may occur if the ros_control is not installed (properly). I just tried to explain that part doesn't look like the issue for my case.

Gates gravatar image Gates  ( 2021-08-18 11:43:24 -0500 )edit

I guess the problem is in the controller type. MoveitSimpleController has only FollowJointTrajectory and GripperAction type (I am not sure that part, couldn't find a proper documentation/tutorial) . So I cannot load let say joint_state_controller/JointStateController as ros_control supports. I don't know how to solve it...

Gates gravatar image Gates  ( 2021-08-18 11:49:15 -0500 )edit

I think you want to use a

type: position_controllers/JointTrajectoryController
pmuthu2s gravatar image pmuthu2s  ( 2021-08-19 04:25:20 -0500 )edit

Yes, position_controllers/JointTrajectoryController for joints and joint_state_controller/JointStateController for the last joint_state_controller but the problem is that those ros_control controllers are not supported by Moveit (by moveitsimplecontrollermanager). That's my question.

Gates gravatar image Gates  ( 2021-08-19 04:38:42 -0500 )edit

@Gates, you can use position_controllers/JointTrajectoryController with moveit (or any other ros_control controller as long as the controller offers a FollowJointTrajectory action service ). You need to use type: position_controllers/JointTrajectoryController in your controllers.yaml for ros_control. For the moveit controllers.yaml you need to use action_ns: follow_joint_trajectory and type: FollowJointTrajectory for your controller.

Check the minimal example in my answer below.

Pratik Somaiya gravatar image Pratik Somaiya  ( 2021-08-19 18:10:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2021-08-19 17:20:10 -0500

Pratik Somaiya gravatar image

updated 2021-09-08 11:08:58 -0500

I think two different controllers.yaml files got mixed up (controllers from ros_control and Moveit! controllers - check the example below). I am assuming the controllers.yaml you posted is part of your moveit_config package as the controllers are under the controllers_list ns (please, correct me here if I'm wrong here). If that assumption holds true can you try changing the following things?

   action_ns: follow_joint_trajectory
   type: FollowJointTrajectory

If you haven't already, you can check this tutorial from the moveit guide for controllers.yamlexample for moveit: http://docs.ros.org/en/melodic/api/mo...

Also, it would be a good idea to confirm that the controllers from ros_control are running properly as moveit assumes that the robot offers a FollowJointTrajectory (or GripperCommand in case of gripper) action service. You can use service or GUI from the controller_manager to confirm the controller status.

Minimal example from franka_ros:

position_joint_trajectory_controller:
  type: position_controllers/JointTrajectoryController
  joints:
    - panda_joint1
    - panda_joint2
    - panda_joint3
    - panda_joint4
    - panda_joint5
    - panda_joint6
    - panda_joint7
 controller_list:
  - name: position_joint_trajectory_controller
    action_ns: follow_joint_trajectory
    type: FollowJointTrajectory
    default: true
    joints:
      - panda_joint1
      - panda_joint2
      - panda_joint3
      - panda_joint4
      - panda_joint5
      - panda_joint6
      - panda_joint7
edit flag offensive delete link more

Comments

I like to give those yaml files nice, distinctive names since they are so easy to get confused. I usually go with ros_control_controllers.yaml and moveit_controllers.yaml.

The ros_control_controllers.yaml typically defines all of the controllers that are available. There may be gripper controllers, arm controllers, and maybe even mobile base controllers all mixed in.

The moveit_controllers.yaml (obviously) tells MoveIt which controllers to hook up with. Typically a JointTrajectoryController but I think MoveIt can also connect with gripper action server controllers.

AndyZe gravatar image AndyZe  ( 2021-08-20 13:33:59 -0500 )edit

wow, really? That's something I didn't know (and couldn't guess either). I thought that the type must match the ROS controller type. ATM I am not in reach to the PC which I had this problem. I cannot check if it solves my problem but this answer looks like it can solve issues for many who are having similar confusion with me. Thank you!

Gates gravatar image Gates  ( 2021-08-27 02:20:27 -0500 )edit

Thanks, @AndyZe! I updated my answer and added that one can use moveit! with the GripperCommand service as well. It might help someone.

Pratik Somaiya gravatar image Pratik Somaiya  ( 2021-09-08 11:22:24 -0500 )edit

@Gates no worries! I hope that helped.

Pratik Somaiya gravatar image Pratik Somaiya  ( 2021-09-08 11:24:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-08-18 07:59:44 -0500

Seen: 689 times

Last updated: Sep 08 '21