Populating the controllers.yaml file in my moveit_generated/config folder

3,486 views
Skip to first unread message

zl...@cornell.edu

unread,
Oct 28, 2013, 4:28:47 PM10/28/13
to moveit...@googlegroups.com
To start, I'm running Hydro on Ubuntu 12.10.

I'm trying to plan a path for my custom robot's arms in Moveit and see the movements simulated in Gazebo, as in the Moveit tutorials for the PR2 robot. I'm currently attempting to tell the control manager which type of controllers are available, as explained in http://moveit.ros.org/wiki/PR2/Gazebo/Quick_Start#Configuring_Controllers

My controllers.yaml file currently looks like:

controller_list:
    - name: r_arm_controller_1
      type: effort_controllers/JointPositionController
      joint: right_shoulder_x_revolute
    - name: r_arm_controller_2
      type: effort_controllers/JointPositionController
      joint: upper_right_arm_z_revolute
                .......etc

 When I try to run the planning_execution launch file, I get these warnings:

[ WARN] [1382990767.161377149]: Name and joints must be specifed for each controller
[ WARN] [1382990767.161401915]: Name and joints must be specifed for each controller
...etc

And I can't connect to my gazebo sim robot to send it any motion paths. 

Instead, I get these errors, which I assume is related to the above issues: 
[ERROR] [1382990730.220985558, 3748.725000000]: Unable to identify any set of controllers that can actuate the specified joints: [ left_shoulder_x_revolute lower_to_wrist_left_arm upper_left_arm_y_revolute upper_left_arm_z_revolute upper_to_lower_left_joint wrist_left_arm_z_revolute ]
[ERROR] [1382990730.221280233, 3748.725000000]: Apparently trajectory initialization failed

Anybody have any idea what I'm botching?

Many thanks,
Jacob

Filip Jareš

unread,
Mar 4, 2014, 3:51:42 PM3/4/14
to moveit...@googlegroups.com
Hi Jacob,

I am replying almost half a year after you posted your question. But I am new to MoveIt and I have been recently struggling with the same issue.

I think that to realize what is wrong with your configuration you need to note that you in fact need two different .yaml configuration files. One for the controller (simulated robot/gazebo plugin side) and one for the moveit controller manager (moveit side). The controller and the moveit controller manager are connected through the action interface (http://wiki.ros.org/actionlib). The controller manager you want to use is probably the MoveItSimpleControllerManager. (Since you are attempting to use effort_controllers/JointPositionController, in this particular case the action interface will be control_msgs::FollowJointTrajectoryAction.)

Your .yaml file suggests that it is intended for the MoveIt! side (because it contains the "controller_list" parameter) but its remaining content resembles the gazebo_ros_control plugin side configuration targeted for the effort_controllers/JointPositionController controller (it contains the "type" parameter). In the effort_controllers/JointPositionController related .yaml, there should be "joints" parameter holding a list of joint names (there is no "joint" parameter which can be seen in your controllers.yaml file) and you need to set up PID parameters for individual joints (see controller configuration examples in section 3.2. on the wiki page referenced in the following paragraph or the rrbot_control.yaml file from the repo referenced in the last paragraph: https://github.com/filipjares/gazebo_ros_demos/blob/with_moveit/rrbot_control/config/rrbot_control.yaml).

Note that the effort_controllers::JointPositionController is just a typedef for joint_trajectory_controller::JointTrajectoryController<SegmentImpl, hardware_interface::EffortJointInterface> which is nicely documented here: http://wiki.ros.org/joint_trajectory_controller including the configuration parameters which are described in section 3.1.5.

There is a tutorial on the Gazebo website that uses a simple "rrbot" model: http://gazebosim.org/wiki/Tutorials/1.9/Using_A_URDF_In_Gazebo. I extended this tutorial and you can have a look at the solution to the problem for the rrbot in the "with_moveit" branch of my repo on github: https://github.com/filipjares/gazebo_ros_demos/tree/with_moveit. It is an extensin of the ros-simulation/gazebo_ros_demos repo.

Best regards,

Filip

Dne pondělí, 28. října 2013 21:28:47 UTC+1 Zhonghe Li napsal(a):

Zhonghe Li

unread,
Mar 6, 2014, 11:42:27 AM3/6/14
to moveit...@googlegroups.com
Hey thanks for replying!

I did manage to fix the issue a few months ago, and I think your answer is part of what I did. I believe I was also missing this segment from my urdf:
 <!--.................ROS_CONTROL PLUGIN........... -->
  <gazebo>
    <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
      <robotNamespace></robotNamespace>
      <robotSimType>gazebo_ros_control/DefaultRobotHWSim</robotSimType>
    </plugin>
  </gazebo>
Without that segment, my gazebo simulation wasn't spawning the arm controllers. Moveit then couldn't load the controllers, because they simply weren't there, and that's the cause of the errors messages.

I forgot that I posted this question, or I would have posted an update on it afterwards.

Hope you have luck on your project!
Jacob
Reply all
Reply to author
Forward
0 new messages