38 #include <pr2_gripper_sensor_msgs/PR2GripperGrabAction.h> 39 #include <pr2_gripper_sensor_msgs/PR2GripperReleaseAction.h> 59 grab_client_ =
new GrabClient(
"r_gripper_sensor_controller/grab",
true);
60 release_client_ =
new ReleaseClient(
"r_gripper_sensor_controller/release",
true);
63 ROS_INFO(
"Waiting for the r_gripper_sensor_controller/grab action server to come up");
67 ROS_INFO(
"Waiting for the r_gripper_sensor_controller/release action server to come up");
78 pr2_gripper_sensor_msgs::PR2GripperGrabGoal grip;
79 grip.command.hardness_gain = 0.03;
85 ROS_INFO(
"Successfully completed Grab");
91 pr2_gripper_sensor_msgs::PR2GripperReleaseGoal
place;
93 place.command.event.trigger_conditions = place.command.event.FINGER_SIDE_IMPACT_OR_SLIP_OR_ACC;
95 place.command.event.acceleration_trigger_magnitude = 5.0;
97 place.command.event.slip_trigger_magnitude = .01;
100 ROS_INFO(
"Waiting for object placement contact...");
113 int main(
int argc,
char** argv){
int main(int argc, char **argv)
bool waitForServer(const ros::Duration &timeout=ros::Duration(0, 0)) const
actionlib::SimpleActionClient< pr2_gripper_sensor_msgs::PR2GripperReleaseAction > ReleaseClient
bool waitForResult(const ros::Duration &timeout=ros::Duration(0, 0))
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
actionlib::SimpleActionClient< pr2_gripper_sensor_msgs::PR2GripperGrabAction > GrabClient
void sendGoal(const Goal &goal, SimpleDoneCallback done_cb=SimpleDoneCallback(), SimpleActiveCallback active_cb=SimpleActiveCallback(), SimpleFeedbackCallback feedback_cb=SimpleFeedbackCallback())
SimpleClientGoalState getState() const
ReleaseClient * release_client_
GrabClient * grab_client_