MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / Cancel

Method Cancel

roborts_decision/executor/chassis_executor.cpp:91–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

89};
90
91void ChassisExecutor::Cancel(){
92 switch (execution_mode_){
93 case ExcutionMode::IDLE_MODE:
94 ROS_WARN("Nothing to be canceled.");
95 break;
96
97 case ExcutionMode::GOAL_MODE:
98 global_planner_client_.cancelGoal();
99 local_planner_client_.cancelGoal();
100 execution_mode_ = ExcutionMode::IDLE_MODE;
101 break;
102
103 case ExcutionMode::SPEED_MODE:
104 cmd_vel_pub_.publish(zero_twist_);
105 execution_mode_ = ExcutionMode::IDLE_MODE;
106 break;
107
108 case ExcutionMode::SPEED_WITH_ACCEL_MODE:
109 cmd_vel_acc_pub_.publish(zero_twist_accel_);
110 execution_mode_ = ExcutionMode::IDLE_MODE;
111 usleep(50000);
112 break;
113 default:
114 ROS_ERROR("Wrong Execution Mode");
115 }
116
117}
118
119void ChassisExecutor::GlobalPlannerFeedbackCallback(const roborts_msgs::GlobalPlannerFeedbackConstPtr& global_planner_feedback){
120 if (!global_planner_feedback->path.poses.empty()) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected