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 ...