38 #include <pr2_controllers_msgs/Pr2GripperCommandAction.h>
39 #include <pr2_gripper_sensor_msgs/PR2GripperFindContactAction.h>
40 #include <pr2_gripper_sensor_msgs/PR2GripperForceServoAction.h>
69 ROS_INFO(
"Waiting for the r_gripper_sensor_controller/gripper_action action server to come up");
73 ROS_INFO(
"Waiting for the r_gripper_sensor_controller/find_contact action server to come up");
77 ROS_INFO(
"Waiting for the r_gripper_sensor_controller/force_servo action server to come up");
89 pr2_controllers_msgs::Pr2GripperCommandGoal
open;
90 open.command.position = 0.08;
91 open.command.max_effort = -1.0;
99 ROS_INFO(
"The gripper failed to open.");
104 pr2_controllers_msgs::Pr2GripperCommandGoal squeeze;
105 squeeze.command.position = 0.0;
106 squeeze.command.max_effort = -1.0;
114 ROS_INFO(
"The gripper failed to close.");
121 pr2_gripper_sensor_msgs::PR2GripperForceServoGoal squeeze;
122 squeeze.command.fingertip_force = holdForce;
128 ROS_INFO(
"Stable force was achieved");
130 ROS_INFO(
"Stable force was NOT achieved");
136 pr2_gripper_sensor_msgs::PR2GripperFindContactGoal findTwo;
137 findTwo.command.contact_conditions = findTwo.command.BOTH;
138 findTwo.command.zero_fingertip_sensors =
true;
141 ROS_INFO(
"Sending find 2 contact goal");
152 ROS_INFO(
"The gripper did not find a contact or could not maintain contact force.");
156 int main(
int argc,
char** argv){