File tree 2 files changed +7
-12
lines changed
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(
420
420
return ;
421
421
}
422
422
423
+ assert (
424
+ (void (" cannot execute an AnyExecutable without a valid callback group" ),
425
+ any_exec.callback_group ));
426
+
423
427
if (any_exec.timer ) {
424
428
TRACETOOLS_TRACEPOINT (
425
429
rclcpp_executor_execute,
@@ -450,18 +454,7 @@ Executor::execute_any_executable(
450
454
}, exception_handler);
451
455
}
452
456
// 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 );
465
458
}
466
459
467
460
Original file line number Diff line number Diff line change @@ -42,6 +42,8 @@ class CustomExecutor : public rclcpp::Executor
42
42
43
43
void spin () override {}
44
44
45
+ void spin (const std::function<void (const std::exception & e)> &) override {}
46
+
45
47
void collect ()
46
48
{
47
49
this ->collect_entities ();
You can’t perform that action at this time.
0 commit comments