Skip to content

Commit

Permalink
refactor: delete unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
HansRobo committed Feb 5, 2025
1 parent 4d40bbf commit e36acb2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 68 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,36 +203,6 @@ class Interpreter : public rclcpp_lifecycle::LifecycleNode,
return handle();
}
}
template <typename TimeoutHandler, typename Thunk>
auto withTimeoutHandler(TimeoutHandler && handle, Thunk && thunk) -> decltype(auto)
{
if (const auto time = execution_timer.invoke("", thunk); currentLocalFrameRate() < time) {
handle(execution_timer.getStatistics(""));
}
}
auto defaultTimeoutHandler() const
{
/*
Ideally, the scenario should be terminated with an error if the total
time for the ScenarioDefinition evaluation and the traffic_simulator's
updateFrame exceeds the time allowed for a single frame. However, we
have found that many users are in environments where it is not possible
to run the simulator stably at 30 FPS (the default setting) while
running Autoware. In order to prioritize comfortable daily use, we
decided to give up full reproducibility of the scenario and only provide
warnings.
*/
return [this](const auto & statistics) {
RCLCPP_WARN_STREAM(
get_logger(),
"Your machine is not powerful enough to run the scenario at the specified frame rate ("
<< local_frame_rate << " Hz). We recommend that you reduce the frame rate to "
<< 1000.0 / statistics.template max<std::chrono::milliseconds>().count() << " or less.");
};
}
};
} // namespace openscenario_interpreter
Expand Down

This file was deleted.

0 comments on commit e36acb2

Please sign in to comment.