Skip to content

Commit

Permalink
chore: Fixes for rebase
Browse files Browse the repository at this point in the history
Signed-off-by: Janosch Machowinski <[email protected]>
  • Loading branch information
Janosch Machowinski committed Apr 13, 2024
1 parent d3d36ab commit 8e6c9e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
17 changes: 5 additions & 12 deletions rclcpp/src/rclcpp/executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,10 @@ Executor::execute_any_executable(
return;
}

assert(
(void("cannot execute an AnyExecutable without a valid callback group"),
any_exec.callback_group));

if (any_exec.timer) {
TRACETOOLS_TRACEPOINT(
rclcpp_executor_execute,
Expand Down Expand Up @@ -450,18 +454,7 @@ Executor::execute_any_executable(
}, exception_handler);
}
// Reset the callback_group, regardless of type
if(any_exec.callback_group) {
any_exec.callback_group->can_be_taken_from().store(true);
}
// Wake the wait, because it may need to be recalculated or work that
// was previously blocked is now available.
try {
interrupt_guard_condition_->trigger();
} catch (const rclcpp::exceptions::RCLError & ex) {
throw std::runtime_error(
std::string(
"Failed to trigger guard condition from execute_any_executable: ") + ex.what());
}
any_exec.callback_group->can_be_taken_from().store(true);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ class CustomExecutor : public rclcpp::Executor

void spin() override {}

void spin(const std::function<void(const std::exception & e)> &) override {}

void collect()
{
this->collect_entities();
Expand Down

0 comments on commit 8e6c9e3

Please sign in to comment.