10 #include <moveit_msgs/DisplayRobotState.h> 11 #include <moveit_msgs/DisplayTrajectory.h> 13 #include <moveit_msgs/AttachedCollisionObject.h> 14 #include <moveit_msgs/CollisionObject.h> 17 #include <std_msgs/Bool.h> 18 #include <xarm_planner/joint_plan.h> 19 #include <xarm_planner/exec_plan.h> 21 #define SPINNER_THREAD_NUM 2 60 bool do_joint_plan(xarm_planner::joint_plan::Request &req, xarm_planner::joint_plan::Response &res);
62 bool exec_plan_cb(xarm_planner::exec_plan::Request &req, xarm_planner::exec_plan::Response &res);
99 ROS_INFO(
"move_group_planner received new plan Request target: %lu, %lf", req.target.size(), req.target[0]);
101 std::vector<double> mimic_target(6,req.target[0]);
105 res.success = success;
106 ROS_INFO_NAMED(
"move_group_planner",
"This plan (joint goal) %s", success ?
"SUCCEEDED" :
"FAILED");
115 ROS_INFO(
"Received Execution Service Request");
117 res.success = finish_ok;
130 ROS_INFO(
"Received Execution Command !!!!!");
138 int main(
int argc,
char** argv)
140 ros::init(argc, argv,
"xarm_gripper_planner");
150 ROS_INFO(
"Waiting for \'pose_plan\' or \'joint_plan\' service Request ...");
#define ROS_INFO_NAMED(name,...)
bool exec_plan_cb(xarm_planner::exec_plan::Request &req, xarm_planner::exec_plan::Response &res)
XArmGripperPlanner(const std::string plan_group_name)
ros::ServiceServer plan_joint_srv
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
bool setJointValueTarget(const std::vector< double > &group_variable_values)
ros::Subscriber exec_plan_sub
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
moveit::planning_interface::MoveGroupInterface group
const std::string & getPlanningFrame() const
ros::AsyncSpinner spinner
const std::string & getEndEffectorLink() const
const double maxV_scale_factor
MoveItErrorCode asyncExecute(const Plan &plan)
const double jump_threshold
moveit_visual_tools::MoveItVisualTools * visual_tools
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
MoveItErrorCode execute(const Plan &plan)
MoveItErrorCode plan(Plan &plan)
int main(int argc, char **argv)
static std::string PLANNING_GROUP
moveit::planning_interface::PlanningSceneInterface planning_scene_interface
const std::vector< std::string > & getJointNames()
#define SPINNER_THREAD_NUM
void execute_plan_topic(const std_msgs::Bool::ConstPtr &exec)
ros::Publisher display_path
ros::NodeHandle node_handle
std::vector< std::string > joint_names
bool do_joint_plan(xarm_planner::joint_plan::Request &req, xarm_planner::joint_plan::Response &res)
ROSCPP_DECL void waitForShutdown()
ros::ServiceServer exec_plan_srv
moveit::planning_interface::MoveGroupInterface::Plan my_xarm_plan