PX4 ROS 2 Interface Library
Library to interface with PX4 from a companion computer using ROS 2
Loading...
Searching...
No Matches
px4_ros2::HealthAndArmingChecks Class Reference

Public Types

using CheckCallback = std::function< void(HealthAndArmingCheckReporter &)>
 
using WatchdogTimeoutCallback = std::function< void()>
 

Public Member Functions

 HealthAndArmingChecks (rclcpp::Node &node, CheckCallback check_callback, const std::string &topic_namespace_prefix="")
 
 HealthAndArmingChecks (const HealthAndArmingChecks &)=delete
 
bool doRegister (const std::string &name)
 
void setModeRequirements (const RequirementFlags &mode_requirements)
 
RequirementFlagsmodeRequirements ()
 
void disableWatchdogTimer ()
 
void setWatchdogTimeoutCallback (WatchdogTimeoutCallback callback)
 

Friends

class ModeBase
 
class ModeExecutorBase
 

Member Function Documentation

◆ doRegister()

bool px4_ros2::HealthAndArmingChecks::doRegister ( const std::string &  name)

Register the checks. Call this once on startup. This is a blocking method.

Parameters
nameregistration name. Should uniquely identify the component with length < 25 characters
Returns
true on success

◆ setWatchdogTimeoutCallback()

void px4_ros2::HealthAndArmingChecks::setWatchdogTimeoutCallback ( WatchdogTimeoutCallback  callback)

Install a callback that is invoked instead of shutting down the ROS context and throwing when the FMU watchdog times out. The watchdog timer is cancelled before the callback is invoked. The callback should schedule re-creation of the health checks or mode object after the current timer callback returns; the new object will resume watchdog monitoring.


The documentation for this class was generated from the following file: