YAML configuration

The planning environment depends on parameters loaded through YAML configuration on two different parameter topics.

robot_description_planning/groups

This parameter group exists to define the groups of the robot for the purposes of planning and collision checks. Groups for planning purposes are named sets of links and joints. These groups can then be referenced by planners, and used for enabling and disabling collision checks for sets of links conveniently. Joints and links can appear in more than one group, and a group need not contain both joints and links. As described in the section for robot_description_collision, the union of the links in all groups will be used in collision checking, so all links for which collision checking should be performed should be included in some group - an individual group for a link is allowed.

For the pr2 we use the following YAML file, contained in pr2_arm_navigation/pr2_arm_navigation_config/config/planning_groups.yaml:

## the definition of each group
groups:

  - name: robot_body
    joints:
      torso_lift_joint
    links:
      base_link
      torso_lift_link
      head_pan_link
      head_tilt_link
      laser_tilt_mount_link
      base_laser_link

  - name: left_arm
    joints:
      l_shoulder_pan_joint
      l_shoulder_lift_joint
      l_upper_arm_roll_joint
      l_elbow_flex_joint
      l_forearm_roll_joint
      l_wrist_flex_joint
      l_wrist_roll_joint
    links:
      l_shoulder_pan_link
      l_shoulder_lift_link
      l_upper_arm_link
      l_upper_arm_roll_link
      l_elbow_flex_link
      l_forearm_link
      l_forearm_roll_link
      l_forearm_cam_frame
      l_wrist_flex_link
      l_wrist_roll_link

  - name: right_arm
    joints:
      r_shoulder_pan_joint
      r_shoulder_lift_joint
      r_upper_arm_roll_joint
      r_elbow_flex_joint
      r_forearm_roll_joint
      r_wrist_flex_joint
      r_wrist_roll_joint
    links: 
      r_shoulder_pan_link
      r_shoulder_lift_link
      r_upper_arm_link
      r_upper_arm_roll_link
      r_elbow_flex_link
      r_forearm_link
      r_forearm_roll_link
      r_forearm_cam_frame
      r_wrist_flex_link
      r_wrist_roll_link
      
  - name: arms
    joints: 
      l_shoulder_pan_joint
      l_shoulder_lift_joint
      l_upper_arm_roll_joint
      l_elbow_flex_joint
      l_forearm_roll_joint
      l_wrist_flex_joint
      l_wrist_roll_joint
      r_shoulder_pan_joint
      r_shoulder_lift_joint
      r_upper_arm_roll_joint
      r_elbow_flex_joint
      r_forearm_roll_joint
      r_wrist_flex_joint
      r_wrist_roll_joint
    links:
      l_shoulder_pan_link
      l_shoulder_lift_link
      l_upper_arm_link
      l_upper_arm_roll_link
      l_forearm_link
      l_forearm_roll_link
      l_forearm_cam_frame
      l_wrist_flex_link
      l_wrist_roll_link
      r_shoulder_pan_link
      r_shoulder_lift_link
      r_upper_arm_link
      r_upper_arm_roll_link
      r_forearm_link
      r_forearm_roll_link
      r_forearm_cam_frame
      r_wrist_flex_link
      r_wrist_roll_link
 
  - name: l_end_effector
    links: 
      l_gripper_palm_link
      l_gripper_l_finger_link
      l_gripper_r_finger_link
      l_gripper_l_finger_tip_link
      l_gripper_r_finger_tip_link

  - name: r_end_effector
    links: 
      r_gripper_palm_link
      r_gripper_l_finger_link
      r_gripper_r_finger_link
      r_gripper_l_finger_tip_link
      r_gripper_r_finger_tip_link

robot_description_collision/default_collision_operations

The other potential parameter topic corresponding to a YAML file is the parameterization of default collision operations for self-collision checking contained in robot_description_collision. By default, all robot links included in any group in robot_description_planning are added to the collision space contained in the planning environment, but no self collision checking is enabled by default. This means that the default configuration of the collision space will not report that a given state is in collision even if both robot arms are attempting to occupy the same space. However, if collision operations are specified in default_collision_operations, a user of the planning environment can specify a default safe configuration that detects harmful self collisions even if a user of planning environment services does not include ordered collision operations in a request.

Each ordered collision operation takes the following format:

  -object1: <planning_group or link name>
   object2: <planning_group or link name>
   operation: <enable or disable>

The operations in this list will be applied in order to the collision space. For more information on ordered collision operations, see the OrderedCollisionOperation message. Each object can either specify an individual link or the name of a planning group as defined in robot_description_planning. The enable operation means that self-collision checks should be performed between the two objects, while disable means that they shouldn't. The file we use for the pr2 (found in pr2_arm_navigation/pr2_arm_navigation_config/config/collision_checks_both_arms.yaml) is:

default_collision_operations:
  - object1: robot_body
    object2: arms
    operation: enable

  - object1: left_arm
    object2: right_arm
    operation: enable

  - object1: l_end_effector
    object2: right_arm
    operation: enable

  - object1: r_end_effector
    object2: left_arm
    operation: enable

  - object1: r_shoulder_pan_link
    object2: torso_lift_link
    operation: disable

  - object1: r_upper_arm_link
    object2: torso_lift_link
    operation: disable

  - object1: r_upper_arm_link
    object2: r_elbow_flex_link
    operation: disable

  - object1: r_elbow_flex_link
    object2: r_forearm_link
    operation: disable

  - object1: r_forearm_link
    object2: r_gripper_palm_link
    operation: disable

  - object1: l_shoulder_pan_link
    object2: torso_lift_link
    operation: disable

  - object1: l_upper_arm_link
    object2: torso_lift_link
    operation: disable

  - object1: l_upper_arm_link
    object2: l_elbow_flex_link
    operation: disable

  - object1: l_elbow_flex_link
    object2: l_forearm_link
    operation: disable

  - object1: l_forearm_link
    object2: l_gripper_palm_link
    operation: disable

Wiki: planning_environment/YAML configuration (last edited 2011-05-18 01:25:28 by SachinChitta)