Skip to content

grasp_execution

Jennifer Buehler edited this page Apr 9, 2016 · 5 revisions

The package grasp_execution offers the following components:

  • A simple grasp control server which executes actions of type GraspControl.action, implemented in class SimpleGraspControlServer. This serves mainly to control opening and closing the grippers/fingers.
  • A grasp action server which executes actions of type Grasp.action, which checks for preconditions required for the grasp before executing it (e.g. checks that the end effector is at the right pose) and supports pre-grasp approach and post-grasp retreat movements. The interface is available in class GraspActionServer while a simple implementation is provided in SimpleGraspActionServer.
  • Helper classes to get started with automated grasp execution, described in the grasp execution overview

Test the simple grasp control server with Jaco

The "simple grasp control server" implemented in class SimpleGraspControlServer accepts an action of type GraspControl.action and then publishes a sensor_msgs/JointState message with the grasp joint state to a topic which uses JointState messages to control the arm. No complex trajectory execution is supported, hence the name "simple".

You can launch the simple grasp control server with the following launch file:

roslaunch grasp_execution simple_grasp_control_server.launch robot_namespace:=<your-robots-namespace>

where <your-robots-namespace> is the namespace of your robot used for the ROS parameters for the arm components name manager in the repository convenience-pkgs. This will just launch the server for the GraspControl.action. However, to test this, you will need a robot loaded, e.g. in Gazebo. You may use the Jaco arm provided in jaco-arm-pkgs.

This launch file for the Jaco arm examples loads the parameters and the grasp servers for you:

roslaunch grasp_execution_jaco_tutorial jaco_on_table_gazebo_objects_controlled.launch

Then, you can use this test client to generate an action request which simply closes the gripper:

roslaunch grasp_execution_jaco_tutorial test_grasp_control.launch

And with the following arguments to open the gripper again:

roslaunch grasp_execution_jaco_tutorial test_grasp_control.launch closing_action:=false target_angles:=0.05

Test the simple grasp action server with Jaco

The simple grasp action server, implemented in class SimpleGraspActionServer, is a very simple implementation of GraspActionServer:

  • It simply forwards the target JointState as a grasp_execution_msgs/GraspControl.action.
  • It does not support gripper translation (approach / retreat).

All it does is set the gripper to the manipulation_msgs::Grasp::grasp_posture for a grasp, and to manipulation_msgs::Grasp::pre_grasp_posture for an ungrasp.

The main launch file for the simple grasp action server is this one:

rosed grasp_execution simple_grasp_action_server.launch

which is launched by the example Jaco launch file:

roslaunch grasp_execution_jaco_tutorial jaco_on_table_gazebo_objects_controlled.launch load_grasp_fix:=true

Then, spawn & recognize cube AND move the arm to the cube:

roslaunch grasp_execution_jaco_tutorial spawn_and_reach_test_cube.launch

Then, grasp the cube:

roslaunch grasp_execution test_grasp.launch object_name:=cube1 robot_namespace:=jaco

Then, move "home":

rosrun grasp_execution_jaco_tutorial set_arm_to_cube_test --home --no-fingers

Ungrasp the cube:

rosrun grasp_execution_jaco_tutorial grasp_cube_test --ungrasp