File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -143,7 +143,7 @@ class AbstractActionBase
143143 // if there is already a plugin running on the same slot, cancel it
144144 slot_it->second .execution ->cancel ();
145145
146- // TODO + WARNING: this will block the main thread for an arbitrary time during which we won't execute callbacks
146+ // WARNING: this will block the main thread for an arbitrary time during which we won't execute callbacks
147147 if (slot_it->second .thread_ptr ->joinable ()) {
148148 slot_it->second .thread_ptr ->join ();
149149 }
Original file line number Diff line number Diff line change @@ -81,9 +81,10 @@ void ControllerAction::start(
8181 if (slot_it != concurrency_slots_.end () && slot_it->second .in_use )
8282 {
8383 boost::lock_guard<boost::mutex> goal_guard (goal_mtx_);
84+ const auto slot_status = slot_it->second .goal_handle .getGoalStatus ().status ;
8485 if ((slot_it->second .execution ->getName () == goal_handle.getGoal ()->controller ||
8586 goal_handle.getGoal ()->controller .empty ()) &&
86- slot_it-> second . goal_handle . getGoalStatus (). status == actionlib_msgs::GoalStatus::ACTIVE)
87+ (slot_status == actionlib_msgs::GoalStatus::ACTIVE || slot_status == actionlib_msgs::GoalStatus::PREEMPTING) )
8788 {
8889 ROS_DEBUG_STREAM_NAMED (name_, " Updating running controller goal of slot " << static_cast <int >(slot));
8990 update_plan = true ;
You can’t perform that action at this time.
0 commit comments