Skip to content

HFTS Integrated Grasp Planner

Yoshua Nava edited this page Feb 22, 2018 · 2 revisions

Parameters

The default parameters for the HFTS Integrated Grasp Planner can be modified in:

htfs_grasp_planner/config/integrated_hfts_params.yaml

How to launch the HFTS Integrated Grasp Planner node

roslaunch hfts_grasp_planner start_integrated_hfts_planner.launch

Once this node is running, you can issue planning by calling the service /hfts_integrated_planner_node/plan_fingertip_grasp_motion. An example on how to do this, via direct ROS service call:

rosservice call /hfts_integrated_planner_node/plan_fingertip_grasp_motion "object_identifier: 'bunny'
model_identifier: 'bunny'
point_cloud:
  header:
    seq: 0
    stamp: {secs: 0, nsecs: 0}
    frame_id: ''
  points:
  - {x: 0.0, y: 0.0, z: 0.0}
  channels:
  - name: ''
    values: [0]
start_configuration:
  header:
    seq: 0
    stamp: {secs: 0, nsecs: 0}
    frame_id: ''
  name: ['iiwa.joint0','iiwa.joint1', 'iiwa.joint2', 'iiwa.joint3', 'iiwa.joint4', 'iiwa.joint5', 'iiwa.joint6', 'scissor_joint', 'finger_2_joint_1']
  position: [0, 0, 0, 0, 0, 0, 0, 0.0, 0.5]
  velocity: [0]
  effort: [0]
object_pose:
  header:
    seq: 0
    stamp: {secs: 0, nsecs: 0}
    frame_id: ''
  pose:
    position: {x: 0.8, y: 0.8, z: 0.8}
    orientation: {x: 0.0, y: 0.0, z: 0.0, w: 0.0}"

If planning a grasp was succesful, you should receive a message containing a hand-arm path/trajectory to a grasping configuration and some additional information. See the service definition in hfts_grasp_planner/srv/PlanGraspMotion.srv for more details.

Configuring hfts_integrated_planner_node

All parameters that are required on startup or not likely to change while a node is running are set on the ROS parameter server. Those are the following:

visualize_grasps: False
visualize_system: True
visualize_hfts: False
show_trajectory: False
show_search_tree: False
hand_file: models/robotiq/urdf_openrave_conversion/robotiq_s_thin.xml
hand_cache_file: data/cache/robotiq_hand.npy
environment_file_name: data/environments/test_env.xml
robot_name: kmr_iiwa_robotiq
manipulator_name: arm_with_robotiq
joint_state_topic: /kmr/hand_arm_joint_states
joint_names_mapping:
  iiwa.joint0: lbrAxis1
  iiwa.joint1: lbrAxis2
  iiwa.joint2: lbrAxis3
  iiwa.joint3: lbrAxis4
  iiwa.joint4: lbrAxis5
  iiwa.joint5: lbrAxis6
  iiwa.joint6: lbrAxis7

The parameters visualize_grasps and visualize_system can either be True or False and determine whether to show a window showing the whole environment, i.e. the full robot with its surrounding or just a free-floating robotic hand with the target object. Note that at most one flag can be True at a time. You can not display both at the same time.

The parameters visualize_hfts and show_search_tree are for debugging purposes. In case of visualize_hfts the explored grasp search space is published to a ROS topic /hfts_integrated_planner_node/goal_region_graph. This search space can be visualized using the node hierarchy_visualizer_node.py. If the parameter show_search_tree and visualize_system are True, a projection of the BiRRT is shown in the system viewer.

In case the parameter show_trajectory is True, every trajectory found by the planner will be executed on the simulated robot in OpenRAVE, allowing the user to see the trajectory.

The parameters hand_cache_file and hand_file are identical to the ones described for hfts_planner_node.

The parameter environment_file_name must be a path relative to the package pointing a file containing an OpenRAVE environment. This environment needs to contain a robot with the same robotic hand as specified in hand_file. The name of the robot in this environment must have the name robot_name.

The parameter manipulator_name specifies which manipulator of the robot to use for planning.

Finally, the parameters joint_state_topic and joint_names_mapping serve for synchronization of the robot state. The parameter joint_state_topic must be the name of a ROS topic on which the current joint states of the robot are published. It is assumed that the published joint state contains the joint states for the whole robot, i.e. the arm and the hand. The parameter joint_names_mapping is optional and may define a mapping from joint names used in the joint states messages published on joint_state_topic to the joint names used in the OpenRAVE model. If no joint states are published, a planning request always needs to specify the start configuration.

Dynamic parameters

Parameters that directly affect the performance of the algorithms that a user may want to change without restarting the node can be set using dynamic reconfigure. See hfts_grasp_planner/cfg/integrated_hfts_planner.cfg for details.

The planning scene can be modified using the services /hfts_integrated_grasp_planner_node/add_object and /hfts_integrated_grasp_planner_node/remove_object. Again, please consult the service definitions in hfts_grasp_planner/srv/AddObject.srv and hfts_grasp_planner/srv/RemoveObject.srv for more details.