0
$\begingroup$

Rosanswers logo

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?


Originally posted by Gates on ROS Answers with karma: 68 on 2021-08-18

Post score: 0


Original comments

Comment by pmuthu2s on 2021-08-18:
did you install gazebo-ros-controllers?

Comment by Gates on 2021-08-18:
it is installed in default as well. ros-melodic-gazebo-ros-control is already the newest version (2.8.7-1bionic.20210616.200839)

Comment by gvdhoorn on 2021-08-18:
MoveIt "controllers" != ros_control controllers.

Comment by Gates on 2021-08-18:
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.

Comment by Gates on 2021-08-18:
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...

Comment by pmuthu2s on 2021-08-19:
I think you want to use a

type: position_controllers/JointTrajectoryController

Comment by Gates on 2021-08-19:
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.

Comment by Pratik Somaiya on 2021-08-19:
@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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.yaml example for moveit: http://docs.ros.org/en/melodic/api/moveit_tutorials/html/doc/controller_configuration/controller_configuration_tutorial.html#yaml-configuration

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

Originally posted by Pratik Somaiya with karma: 146 on 2021-08-19

This answer was ACCEPTED on the original site

Post score: 4


Original comments

Comment by AndyZe on 2021-08-20:
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.

Comment by Gates on 2021-08-27:
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!

Comment by Pratik Somaiya on 2021-09-08:
Thanks, @AndyZe! I updated my answer and added that one can use moveit! with the GripperCommand service as well. It might help someone.

Comment by Pratik Somaiya on 2021-09-08:
@Gates no worries! I hope that helped.

$\endgroup$

Your Answer

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