10 #include <QtConcurrent/QtConcurrentRun> 13 #include <choreo_msgs/GetAvailableProcessPlans.h> 14 #include <choreo_msgs/OutputProcessPlans.h> 20 gui.
setText(
"Select Plan State.\n" 21 "Please select the desired plan to be simulated in selection window.\n" 22 "Click <Simulate> to continue. ");
29 choreo_msgs::GetAvailableProcessPlans srv;
30 std::vector<std::string> plan_names;
35 plan_names = srv.response.names;
42 if (plan_names.empty())
44 gui.
appendText(
"failed to fetch any computed plan.\n" 45 "Return to Init State");
114 choreo_msgs::SimulateMotionPlanGoal goal;
115 goal.action = choreo_msgs::SimulateMotionPlanGoal::SINGLE_PATH_RUN;
116 goal.index = plan_id;
117 goal.simulate =
true;
118 goal.wait_for_execution =
true;
126 choreo_msgs::OutputProcessPlans srv;
129 for(
auto id : int_ids)
131 srv.request.names.push_back(std::to_string(
id));
136 "output_process_plans");
143 if (output_process_client.
call(srv))
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
void triggerOutputProcess()
virtual void onNext(ChoreoWidget &gui)
void simulateOne(const int &plan_id)
bool call(MReq &req, MRes &res)
void selectPlan(ChoreoWidget &gui)
static const std::string GET_AVAILABLE_PROCESS_PLANS_SERVICE
bool waitForExistence(ros::Duration timeout=ros::Duration(-1))
virtual void onBack(ChoreoWidget &gui)
virtual void onReset(ChoreoWidget &gui)
void makeOutputProcessRequest()
#define ROS_INFO_STREAM(args)
virtual void onExit(ChoreoWidget &gui)
#define ROS_ERROR_STREAM(args)
void newStateAvailable(GuiState *)
std::vector< int > selected_plan_ids_
virtual void onStart(ChoreoWidget &gui)