31#include <rclcpp/parameter_client.hpp>
47 RCLCPP_INFO(
getLogger(),
"[CbAbortNavigation] no navigation goal in flight");
52 const auto deadline = std::chrono::steady_clock::now() + std::chrono::seconds(5);
57 if (std::chrono::steady_clock::now() >= deadline)
59 RCLCPP_ERROR(
getLogger(),
"[CbAbortNavigation] no result for the cancelled goal after 5 s");
63 std::this_thread::sleep_for(std::chrono::milliseconds(10));
66 RCLCPP_INFO(
getLogger(),
"[CbAbortNavigation] the cancelled goal has finished");
void onNavigationResult(const components::CpNav2ActionInterface::WrappedResult &result)
components::CpNav2ActionInterface * nav2ActionInterface_
std::atomic< bool > goalFinished_
smacc2::SmaccSignalConnection onNavigationSucceeded(void(T::*callback)(const WrappedResult &), T *object)
smacc2::SmaccSignalConnection onNavigationAborted(void(T::*callback)(const WrappedResult &), T *object)
typename GoalHandle::WrappedResult WrappedResult
smacc2::SmaccSignalConnection onNavigationCancelled(void(T::*callback)(const WrappedResult &), T *object)
virtual rclcpp::Logger getLogger() const
bool isShutdownRequested()
onEntry is executed in a new thread. However the current state cannot be left until the onEntry threa...