8 geometry_msgs::Quaternion geometry_quat;
9 quaternionTFToMsg(quat, geometry_quat);
13 int main(
int argc,
char** argv)
15 ros::init(argc, argv,
"moveit_sample_node");
21 geometry_msgs::Pose target_pose1,target_pose2,target_pose3;
27 move_group_arms.
move();
36 target_pose1.position.x = 0.3;
37 target_pose1.position.y = -0.2;
38 target_pose1.position.z = 1.0;
41 bool success = (move_group_right.
plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
42 if(success)move_group_right.
execute(my_plan);
51 target_pose2.position.x = 0.3;
52 target_pose2.position.y = 0.2;
53 target_pose2.position.z = 1.0;
56 success = (move_group_left.
plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
57 if(success)move_group_left.
execute(my_plan);
61 target_pose1.position.x += 0.2;
62 target_pose2.position.x += 0.2;
64 move_group_arms.
setPoseTarget(target_pose1,
"r_eef_grasp_link");
65 move_group_arms.
setPoseTarget(target_pose2,
"l_eef_grasp_link");
67 success = (move_group_arms.
plan(my_plan) == moveit::planning_interface::MoveItErrorCode::SUCCESS);
68 if(success)move_group_arms.
execute(my_plan);
73 move_group_arms.
move();
static tf::Quaternion createQuaternionFromRPY(double roll, double pitch, double yaw)
geometry_msgs::Quaternion rpy_to_geometry_quat(double roll, double pitch, double yaw)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void setPoseReferenceFrame(const std::string &pose_reference_frame)
bool setPoseTarget(const Eigen::Affine3d &end_effector_pose, const std::string &end_effector_link="")
bool setEndEffectorLink(const std::string &end_effector_link)
MoveItErrorCode execute(const Plan &plan)
MoveItErrorCode plan(Plan &plan)
int main(int argc, char **argv)
ROSCPP_DECL void shutdown()
bool setNamedTarget(const std::string &name)