42 RCLCPP_INFO(
getLogger(),
"CbArmPX4: enabling offboard keepalive");
46 RCLCPP_INFO(
getLogger(),
"CbArmPX4: sending setOffboardMode command");
51 RCLCPP_INFO(
getLogger(),
"CbArmPX4: waiting 2s for offboard signal registration...");
52 std::this_thread::sleep_for(std::chrono::seconds(2));
54 for (
int attempt = 0; attempt <
MAX_RETRIES; attempt++)
72 std::this_thread::sleep_for(std::chrono::milliseconds(100));
77 RCLCPP_INFO(
getLogger(),
"CbArmPX4: vehicle ARMED - posting success");
std::atomic< bool > armed_
CpVehicleStatus * vehicleStatus_
static constexpr int MAX_RETRIES
CpVehicleCommand * vehicleCommand_
static constexpr int RETRY_INTERVAL_SEC
CpOffboardKeepAlive * offboardKeepAlive_
smacc2::SmaccSignal< void()> onArmed_
virtual rclcpp::Logger getLogger() const
void requiresComponent(SmaccComponentType *&storage, ComponentRequirement requirementType=ComponentRequirement::SOFT)
ISmaccStateMachine * getStateMachine()
smacc2::SmaccSignalConnection createSignalConnection(TSmaccSignal &signal, TMemberFunctionPrototype callback, TSmaccObjectType *object)