4 #include <pr2_common_action_msgs/ArmMoveIKAction.h> 6 int main (
int argc,
char **argv)
14 ROS_INFO(
"Waiting for action server to start.");
18 ROS_INFO(
"Action server started, sending goal.");
20 pr2_common_action_msgs::ArmMoveIKGoal goal;
21 goal.pose.header.frame_id =
"base_link";
23 goal.pose.pose.orientation.x = 0.0;
24 goal.pose.pose.orientation.y = 0.0;
25 goal.pose.pose.orientation.z = 0.0;
26 goal.pose.pose.orientation.w = 1.0;
27 goal.pose.pose.position.x = 0.5;
28 goal.pose.pose.position.y = -0.1;
29 goal.pose.pose.position.z = 0.5;
31 goal.ik_seed.name.push_back(
"r_shoulder_pan_joint");
32 goal.ik_seed.name.push_back(
"r_shoulder_lift_joint");
33 goal.ik_seed.name.push_back(
"r_upper_arm_roll_joint");
34 goal.ik_seed.name.push_back(
"r_elbow_flex_joint");
35 goal.ik_seed.name.push_back(
"r_forearm_roll_joint");
36 goal.ik_seed.name.push_back(
"r_wrist_flex_joint");
37 goal.ik_seed.name.push_back(
"r_wrist_roll_joint");
38 goal.ik_seed.position.push_back(-1.46);
39 goal.ik_seed.position.push_back(1.09);
40 goal.ik_seed.position.push_back(-6.58);
41 goal.ik_seed.position.push_back(-1.73);
42 goal.ik_seed.position.push_back(4.82);
43 goal.ik_seed.position.push_back(-0.46);
44 goal.ik_seed.position.push_back(-4.72);
51 if (finished_before_timeout)
57 ROS_INFO(
"Action did not finish before the time out.");
bool waitForServer(const ros::Duration &timeout=ros::Duration(0, 0)) const
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)
std::string toString() const
int main(int argc, char **argv)
void sendGoal(const Goal &goal, SimpleDoneCallback done_cb=SimpleDoneCallback(), SimpleActiveCallback active_cb=SimpleActiveCallback(), SimpleFeedbackCallback feedback_cb=SimpleFeedbackCallback())
SimpleClientGoalState getState() const