Setting up controllers with MoveIt: No controllers found

Hello everyone!

I'm trying to control the panda robot together with the UR5 robot through MoveIt!. For this, I combined both robots in a xacro file and correctly set up the simulation, including moving to poses etc.

Now I want to work with the real robots and have some troubles with the controllers. At first, I only try to control the Panda robot. The franka_example_controllers worked fine. Now I try to use a new controller. My controllers.yaml file looks like this:

UR5_controller:
action_ns: follow_joint_trajectory
type: FollowJointTrajectory
default: true
joints:
- ur5_shoulder_pan_joint
- ur5_shoulder_lift_joint
- ur5_elbow_joint
- ur5_wrist_1_joint
- ur5_wrist_2_joint
- ur5_wrist_3_joint

Panda_controller:
type: effort_controllers/JointTrajectoryController
joints:
- panda_joint1
- panda_joint2
- panda_joint3
- panda_joint4
- panda_joint5
- panda_joint6
- panda_joint7
gains:
panda_joint1: { p: 120, d: 5, i: 0.0, i_clamp: 10000 }
panda_joint2: { p: 300, d: 10, i: 0.02, i_clamp: 10000 }
panda_joint3: { p: 180, d: 5, i: 0.01, i_clamp: 1 }
panda_joint4: { p: 180, d: 7, i: 0.01, i_clamp: 10000 }
panda_joint5: { p: 120, d: 7, i: 0.01, i_clamp: 1 }
panda_joint6: { p: 100, d: 5, i: 0.01, i_clamp: 1 }
panda_joint7: { p: 100, d: 2, i: 0.0, i_clamp: 1 }
constraints:
goal_time: 2.0
state_publish_rate: 25


This leads me to an error while setting up:

[ERROR] [1561555629.203914705]: No controller_list specified.


The rest of setting up works: RViz opens, showing me the real robot states.

When trying to execute a trajectory, I get the following error message:

[ERROR] [1561553234.640997333]: Unable to identify any set of controllers that can actuate the specified joints: [ panda_joint1 panda_joint2 panda_joint3 panda_joint4 panda_joint5 panda_joint6 panda_joint7 ]
[ERROR] [1561553234.641057622]: Known controllers and their joints:

[ERROR] [1561553234.641112443]: Apparently trajectory initialization failed


It sounds like there weren't any controllers found, though the (rqt_)controller_manager says something different.

Here comes my first question, because it really confuses me that in some places it says, the controllers.yaml file should look like this:

controller_list:
- name: UR5_controller
[...]


When I tried the latter method, I got another error:

[ERROR] [1561554412.210393573]: Could not load controller 'Panda_controller' because the type was not specified. Did you load the controller configuration on the parameter server (namespace: '/Panda_controller')?


In this case, the controller manager doesn't know my controllers.

EDIT: According to this post you have to configure two controllers.yaml-files: one for moveit, one for ROS. Can somebody confirm this? Doesn't sound like a clean solution. I tried to make it in this way, but it didn't work either. It fixes the error that no controller_list was specified, but the other error is still there. After a few tests, I even recognized that the first type of solution (moveit_controllers.yaml file) has no effect and can even be left out. So right now I'm trying it just with the ros_controllers.yaml file. This lets me see the controllers in the rqt Controller Manager and I'm able to control the joints trough the Joint Trajectory Controller of rqt. But whenever I send a move() command from MoveIt, I still get the error message with the empty list of available controllers ...

edit retag close merge delete

Sort by » oldest newest most voted

This appears to be a cross-post of ros-controls/ros_control#383.

In any case:

It sounds like there weren't any controllers found, though the (rqt_)controller_manager says something different.

No, it doesn't.

You're confusing the ros_control controllers with whatever MoveIt calls "a controller".

MoveIt is printing that error message.

According to this post you have to configure two controllers.yaml-files: one for moveit, one for ROS. Can somebody confirm this? Doesn't sound like a clean solution.

I'm not sure how having two files is not "a clean solution", but: there is no need for two separate files, but you will need two sets of parameters: one for your hw interfaces (those of the Panda and the UR) and one for MoveIt. Those also typically live in separate namespaces, so having two files makes sense.

I tried to make it in this way, but it didn't work either. It fixes the error that no controller_list was specified, but the other error is still there. After a few tests, I even recognized that the first type of solution (moveit_controllers.yaml file) has no effect and can even be left out. So right now I'm trying it just with the ros_controllers.yaml file. This lets me see the controllers in the rqt Controller Manager and I'm able to control the joints trough the Joint Trajectory Controller of rqt. But whenever I send a move() command from MoveIt, I still get the error message with the empty list of available controllers.

Again: ros_control controllers != MoveIt controllers.

To gain some more insight into what is going on, I would suggest to configure ROS logging such that it includes the name of the node and of the logger when printing log messages. Refer to Console Output Formatting for more information, but this is how I'd configure things (add it to your .bashrc fi):

export ROSCONSOLE_FORMAT='[${severity}] [${time}] [${node}] [${logger}]: ${message}'  Running your setup again should show you that MoveIt is complaining. You may take a look at the Low Level Controllers page on the MoveIt tutorials site. Comparing the "yaml configuration" shown there as an example and the one you show in your question immediately shows that yours is missing the top-level controller_list key. That is what MoveIt is complaining about. Probably unrelated, but you'll also want to avoid using capitals everywhere (so no UR5_controller, but ur5_controller). I would suggest to first get one robot working correctly with the ros_control configuration: single robot in your urdf, single robot set of parameters, launch files, etc. If/when you have that working, start extending it. more Comments 1 And a comment: you must think of everything in this setup as a stand-alone component. The driver+ros_control is one component. MoveIt is another. What you are configuring is the connection between these components. MoveIt is often used with its "simple controller" which is essentially just a FollowJointTrajectory action client which forwards trajectories wholesale to the driver. That is what is configured in MoveIt's controllers.yaml file. The configuration of your driver+ros_control is completely separate from that. Putting everything in a single file is possible, but may not be the best approach, as it immediately tightly couples everything. ( 2019-07-04 11:36:04 -0600 )edit So did you get things to work in the end? ( 2019-07-09 06:16:12 -0600 )edit Thanks, this helped a lot. I did several minor changes in both yaml files and now it works. (Lowercase controller names, removed unnecessary stuff that was added by the setup assistant wizard, re-checked consistency between the two files) Maybe I haven't worked with ROS enough, but I did not find the connection between MoveIt and ros_control very intuitive. Also, the documentation for the FCI gets rather short when it comes to franka_ros. Thank you very much for your help. Especially the console output format is very helpful to understand better whats going on. ( 2019-07-09 10:49:20 -0600 )edit Maybe I haven't worked with ROS enough, but I did not find the connection between MoveIt and ros_control very intuitive I guess the assumption is that you already know a thing or two about setting things like this up (and that is "you" in the general sense, not you-you). Also, the documentation for the FCI gets rather short when it comes to franka_ros. that would be something to report/tell Franka Emika. Especially if the robot was specifically bought to use it with ROS. ( 2019-07-09 10:53:20 -0600 )edit that would be something to report/tell Franka Emika. Especially if the robot was specifically bought to use it with ROS. Good point. I will collect a bit of feedback and contact them in the end of my project. ( 2019-07-11 07:31:54 -0600 )edit After some painful hours, I've finally been able to control both robots at the same time! :) I'd like to mention how I solved the biggest challenge, just in case that anybody else has a similar problem. Whenever I tried to define controllers for more than one robot at a time, I had problems due to the different hardware interfaces. I circumvented by using two groups with different namespaces in my launch-file. So basically, I split up the ros_controllers.yaml file, thus I have three controller files: 1. controllers.yaml (the file for MoveIt, including the controller_list tag. Be sure to adjust the controller names so they are equal to the the other ones, e.g. - name: ur5_control/ur5_controller ) 2. panda_controllers.yaml (the controllers of the Panda robot for ros_control) 3. ur5_controllers.yaml (the controllers of the UR5 robot for ros_control) The part of my .launch file where I load the robot drivers looks like this: <!-- Launch interface and controllers for real panda --> <group ns="panda_control"> <rosparam command="load" file="$(find panda_ur5_moveit_config)/config/panda_controllers.yaml" />
<node name="franka_control" pkg="franka_control" type="franka_control_node" output="screen" required="true">
<rosparam command="load" file="$(find franka_control)/config/franka_control_node.yaml" /> <param name="robot_ip" value="$(arg robot_ip_panda)" />
</node>
<node name="panda_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="panda_controller franka_state_controller"/>
</group>

<!-- UR5 params -->
<group ns="ur5_control">
<rosparam command="load" file="$(find panda_ur5_moveit_config)/config/ur5_controllers.yaml" /> [a lot of <arg name=... lines] <!-- Launch interface and controllers for real UR5 --> <node name="ur_driver" pkg="ur_modern_driver" type="ur_driver" output="log" launch-prefix="$(arg launch_prefix)">
[a lot of <param name=... lines]
</node>
<node name="ur5_controller_spawner" pkg="controller_manager" type="spawner" respawn="false" output="screen" args="ur5_controller ur5_joint_state_controller"/>
</group>


For whatever reason I wasn't able to rename the franka_state_controller (even if I redefined it in my own controllers file in the same way). Therefore I just used the provided one.

Also, it was very helpful to remind myself what I'm mostly doing in the launch/yaml files: I configure parameters in ROS. When ROS is running, these can always be checked by rosparam list and rosparam get [namespace/parametername].

more