File tree Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Expand file tree Collapse file tree 2 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -420,6 +420,10 @@ Executor::execute_any_executable(
420420 return ;
421421 }
422422
423+ assert (
424+ (void (" cannot execute an AnyExecutable without a valid callback group" ),
425+ any_exec.callback_group ));
426+
423427 if (any_exec.timer ) {
424428 TRACETOOLS_TRACEPOINT (
425429 rclcpp_executor_execute,
@@ -450,18 +454,7 @@ Executor::execute_any_executable(
450454 }, exception_handler);
451455 }
452456 // Reset the callback_group, regardless of type
453- if (any_exec.callback_group ) {
454- any_exec.callback_group ->can_be_taken_from ().store (true );
455- }
456- // Wake the wait, because it may need to be recalculated or work that
457- // was previously blocked is now available.
458- try {
459- interrupt_guard_condition_->trigger ();
460- } catch (const rclcpp::exceptions::RCLError & ex) {
461- throw std::runtime_error (
462- std::string (
463- " Failed to trigger guard condition from execute_any_executable: " ) + ex.what ());
464- }
457+ any_exec.callback_group ->can_be_taken_from ().store (true );
465458}
466459
467460
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ class CustomExecutor : public rclcpp::Executor
4242
4343 void spin () override {}
4444
45+ void spin (const std::function<void (const std::exception & e)> &) override {}
46+
4547 void collect ()
4648 {
4749 this ->collect_entities ();
You can’t perform that action at this time.
0 commit comments