9 #include <choreo_msgs/ElementCandidatePoses.h> 12 #include <choreo_msgs/ProcessPlanning.h> 29 choreo_msgs::ProcessPlanning::Response &res)
34 if (req.task_sequence.empty())
36 ROS_WARN(
"[Process Planning] Planning request contained no process path. Nothing to be done.");
40 const static double LINEAR_VEL = 0.1;
41 const static double RETRACT_DISTANCE = 0.010;
43 const static double LINEAR_DISCRETIZATION = 0.005;
48 constrained_seg_params.
linear_vel = LINEAR_VEL;
49 constrained_seg_params.
linear_disc = LINEAR_DISCRETIZATION;
50 constrained_seg_params.
angular_disc = ANGULAR_DISCRETIZATION;
58 const std::vector<choreo_msgs::ElementCandidatePoses>
59 chosen_task_seq(req.task_sequence.begin(), req.task_sequence.begin() + req.index + 1);
61 std::vector<descartes_planner::ConstrainedSegment> constrained_segs =
68 for(
const auto& obj : req.env_collision_objs)
75 req.use_saved_graph, req.file_name, req.clt_rrt_unit_process_timeout, req.clt_rrt_timeout,
79 req.wf_collision_objs,
bool addCollisionObject(ros::ServiceClient &planning_scene, const moveit_msgs::CollisionObject &c_obj)
bool clearAllCollisionObjects(ros::ServiceClient &planning_scene)
descartes_core::RobotModelPtr hotend_model_
static const std::string JOINT_TOPIC_NAME
moveit::core::RobotModelConstPtr moveit_model_
std::vector< double > getCurrentJointState(const std::string &topic)
std::vector< descartes_planner::ConstrainedSegmentPickNPlace > toDescartesConstrainedPath(const choreo_msgs::AssemblySequencePickNPlace &as_pnp, const std::vector< std::vector< planning_scene::PlanningScenePtr >> &planning_scene_subprocess, const double &linear_vel, const double &linear_disc)
std::string hotend_group_name_
bool generateMotionPlan(const std::string world_frame, const bool use_saved_graph, const std::string &saved_graph_file_name, const double clt_rrt_unit_process_timeout, const double clt_rrt_timeout, const std::string &move_group_name, const std::vector< double > &start_state, const std::vector< choreo_msgs::ElementCandidatePoses > &task_seq, const std::vector< choreo_msgs::WireFrameCollisionObject > &wf_collision_objs, std::vector< descartes_planner::ConstrainedSegment > &segs, descartes_core::RobotModelPtr model, moveit::core::RobotModelConstPtr moveit_model, ros::ServiceClient &planning_scene_diff_client, std::vector< choreo_msgs::UnitProcessPlan > &plans)
bool handlePrintPlanning(choreo_msgs::ProcessPlanning::Request &req, choreo_msgs::ProcessPlanning::Response &res)
ros::ServiceClient planning_scene_diff_client_
const double PRINT_ANGLE_DISCRETIZATION