1 #ifndef FRAMEFAB_CORE_SERVICE_H 2 #define FRAMEFAB_CORE_SERVICE_H 7 #include <choreo_msgs/ElementNumberRequest.h> 8 #include <choreo_msgs/VisualizeSelectedPath.h> 9 #include <choreo_msgs/GetAvailableProcessPlans.h> 10 #include <choreo_msgs/OutputProcessPlans.h> 11 #include <choreo_msgs/QueryComputationRecord.h> 14 #include <choreo_msgs/ChoreoParameters.h> 15 #include <choreo_msgs/ModelInputParameters.h> 16 #include <choreo_msgs/TaskSequenceInputParameters.h> 17 #include <choreo_msgs/RobotInputParameters.h> 18 #include <choreo_msgs/OutputSaveDirInputParameters.h> 19 #include <choreo_msgs/ElementCandidatePoses.h> 20 #include <choreo_msgs/UnitProcessPlan.h> 23 #include <choreo_msgs/TaskSequenceProcessingAction.h> 24 #include <choreo_msgs/TaskSequencePlanningAction.h> 25 #include <choreo_msgs/ProcessPlanningAction.h> 26 #include <choreo_msgs/ProcessExecutionAction.h> 27 #include <choreo_msgs/SimulateMotionPlanAction.h> 40 std::vector<choreo_msgs::UnitProcessPlan>
plans;
56 bool loadModelInputParameters(
const std::string &
filename);
57 void saveModelInputParameters(
const std::string &filename);
58 bool loadTaskSequenceInputParameters(
const std::string& filename);
59 void saveTaskSequenceInputParameters(
const std::string& filename);
60 bool loadRobotInputParameters(
const std::string& filename);
61 void saveRobotInputParameters(
const std::string& filename);
62 bool loadOutputSaveDirInputParameters(
const std::string& filename);
63 void saveOutputSaveDirInputParameters(
const std::string& filename);
64 int checkSavedLadderGraphSize(
const std::string& filename);
67 bool choreoParametersServerCallback(choreo_msgs::ChoreoParameters::Request& req,
68 choreo_msgs::ChoreoParameters::Response&
res);
72 bool elementNumberRequestServerCallback(choreo_msgs::ElementNumberRequest::Request& req,
73 choreo_msgs::ElementNumberRequest::Response& res);
76 bool visualizeSelectedPathServerCallback(choreo_msgs::VisualizeSelectedPath::Request& req,
77 choreo_msgs::VisualizeSelectedPath::Response& res);
79 bool getAvailableProcessPlansCallback(choreo_msgs::GetAvailableProcessPlans::Request& req,
80 choreo_msgs::GetAvailableProcessPlans::Response& res);
82 bool outputProcessPlansCallback(choreo_msgs::OutputProcessPlans::Request& req,
83 choreo_msgs::OutputProcessPlans::Response& res);
85 bool queryComputationResultCallback(choreo_msgs::QueryComputationRecord::Request& req,
86 choreo_msgs::QueryComputationRecord::Response& res);
89 void taskSequenceProcessingActionCallback(
const choreo_msgs::TaskSequenceProcessingGoalConstPtr &goal);
90 void taskSequencePlanningActionCallback(
const choreo_msgs::TaskSequencePlanningGoalConstPtr &goal);
91 void processPlanningActionCallback(
const choreo_msgs::ProcessPlanningGoalConstPtr &goal);
92 void simulateMotionPlansActionCallback(
const choreo_msgs::SimulateMotionPlanGoalConstPtr& goal_in);
96 bool generateMotionLibrary(
97 const int selected_path_index,
106 bool moveToTargetJointPose(std::vector<double> joint_pose);
109 void adjustSimSpeed(
double sim_speed);
111 bool generatePicknPlaceMotionLibrary();
170 choreo_msgs::AssemblySequencePickNPlace
as_pnp_;
ros::ServiceClient task_sequence_processing_srv_client_
choreo_msgs::TaskSequencePlanningFeedback task_sequence_planning_feedback_
choreo_msgs::RobotInputParameters default_robot_input_params_
choreo_msgs::TaskSequenceInputParameters default_task_sequence_input_params_
std::vector< choreo_msgs::UnitProcessPlan > plans
choreo_msgs::OutputSaveDirInputParameters output_save_dir_input_params_
ros::ServiceClient move_to_pose_client_
ros::ServiceServer choreo_parameters_server_
std::string save_location_
ros::ServiceClient process_planning_client_
std::vector< moveit_msgs::CollisionObject > env_objs_
choreo_core_service::TrajectoryLibrary trajectory_library_
std::string assembly_type_
ros::ServiceClient output_processing_client_
choreo_msgs::TaskSequencePlanningResult task_sequence_planning_result_
choreo_msgs::TaskSequenceProcessingFeedback task_sequence_processing_feedback_
choreo_msgs::OutputSaveDirInputParameters default_output_save_dir_input_params_
actionlib::SimpleActionServer< choreo_msgs::SimulateMotionPlanAction > simulate_motion_plan_server_
choreo_msgs::TaskSequenceProcessingResult task_sequence_processing_result_
ros::ServiceClient task_sequence_planning_srv_client_
choreo_msgs::RobotInputParameters robot_input_params_
choreo_msgs::ModelInputParameters model_input_params_
choreo_visual_tools::ChoreoVisualTools visual_tools_
choreo_msgs::TaskSequenceInputParameters task_sequence_input_params_
ros::ServiceServer element_number_sequest_server_
actionlib::SimpleActionClient< choreo_msgs::ProcessExecutionAction > choreo_exe_client_
actionlib::SimpleActionServer< choreo_msgs::ProcessPlanningAction > process_planning_server_
ros::ServiceServer query_computation_result_server_
choreo_msgs::SimulateMotionPlanFeedback simulate_motion_plan_feedback_
choreo_msgs::ProcessPlanningFeedback process_planning_feedback_
actionlib::SimpleActionServer< choreo_msgs::TaskSequenceProcessingAction > task_sequence_processing_server_
actionlib::SimpleActionServer< choreo_msgs::TaskSequencePlanningAction > task_sequence_planning_server_
ros::ServiceServer get_available_process_plans_server_
choreo_msgs::ModelInputParameters default_model_input_params_
choreo_msgs::ProcessPlanningResult process_planning_result_
ros::ServiceServer output_process_plans_server_
choreo_msgs::SimulateMotionPlanResult simulate_motion_plan_result_
std::vector< choreo_msgs::ElementCandidatePoses > task_sequence_
void run(ClassLoader *loader)
ros::ServiceServer visualize_selected_path_server_
std::string param_cache_prefix_
choreo_msgs::AssemblySequencePickNPlace as_pnp_