7 #include <choreo_msgs/TrajectoryExecution.h> 10 #include <boost/thread.hpp> 19 process_exe_action_server_(nh_,
32 const choreo_msgs::ProcessExecutionGoalConstPtr &goal)
34 choreo_msgs::ProcessExecutionResult res;
44 const choreo_msgs::ProcessExecutionGoalConstPtr &goal)
46 choreo_msgs::TrajectoryExecution exe_srv;
47 exe_srv.request.wait_for_execution =
true;
49 for(
auto jts : goal->joint_traj_array)
51 if (exe_srv.request.trajectory.points.empty())
53 exe_srv.request.trajectory = jts;
64 ROS_ERROR(
"[Execution GateKeeper] Execution client unavailable or unable to execute trajectory.");
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
ExecutionGatekeeper(ros::NodeHandle &nh)
bool simulateProcess(const choreo_msgs::ProcessExecutionGoalConstPtr &goal)
actionlib::SimpleActionServer< choreo_msgs::ProcessExecutionAction > process_exe_action_server_
bool call(MReq &req, MRes &res)
void appendTrajectory(trajectory_msgs::JointTrajectory &original, const trajectory_msgs::JointTrajectory &next)
void setSucceeded(const Result &result=Result(), const std::string &text=std::string(""))
void executionCallback(const choreo_msgs::ProcessExecutionGoalConstPtr &goal)
ros::ServiceClient sim_client_
static const std::string PROCESS_EXE_ACTION_SERVER_NAME
static const std::string SIMULATION_SERVICE_NAME