Skip to content

Commit 8e6c9e3

Browse files
author
Janosch Machowinski
committed
chore: Fixes for rebase
Signed-off-by: Janosch Machowinski <[email protected]>
1 parent d3d36ab commit 8e6c9e3

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

rclcpp/src/rclcpp/executor.cpp

+5-12
Original file line numberDiff line numberDiff 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

rclcpp/test/rclcpp/executors/test_executors_callback_group_behavior.cpp

+2
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)