Qualcomm Navigator Flight Control Interface  2.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Pages
Public Types | Public Member Functions | Static Public Member Functions | List of all members
snav_fci::FlightControlInterface Class Reference

Interface to the Qualcomm Navigator Flight Controller. More...

#include <flight_control_interface.hpp>

Public Types

enum  Permissions { Permissions::READ_WRITE, Permissions::READ_ONLY }
 Defines the permissions of an instance of FlightControlInterface. More...
 
enum  Return {
  Return::SUCCESS, Return::FAILURE, Return::NOT_CONNECTED, Return::ALREADY_CONNECTED,
  Return::TRAJ_NOT_OPTIMIZED, Return::TRAJ_NOT_FEASIBLE, Return::ACTION_PREEMPTED, Return::NO_LOCK
}
 Return codes for FlightControlInterface. More...
 
enum  Action {
  Action::NONE, Action::TAKEOFF, Action::GO_TO_WAYPOINT, Action::EXECUTE_MISSION,
  Action::LAND
}
 Enum used for possible actions. More...
 

Public Member Functions

 FlightControlInterface (const Permissions &requested_access)
 Constructs an instance of FlightControlInterface. More...
 
 ~FlightControlInterface () noexcept
 Destructor of FlightControlInterface. More...
 
Return configure_tx (const TxConfig &tx_config)
 Specify configuration options for sending commands to Qualcomm Navigator. More...
 
Return configure_rx (const RxConfig &rx_config)
 Specify configuration options for receiving data from Qualcomm Navigator. More...
 
void wait_for_configure () const noexcept
 Block until FlightControlInterface has been configured. More...
 
Return connect ()
 Establish connection to Qualcomm Navigator. More...
 
Return disconnect () noexcept
 End connection to Qualcomm Navigator. More...
 
Return start_props ()
 Blocking call to start the propellers. More...
 
Return stop_props ()
 Blocking call to stop the propellers. More...
 
Return takeoff (const TakeoffConfig &takeoff_config)
 Blocking call to takeoff. More...
 
Return takeoff ()
 
Return takeoff_nb (const TakeoffConfig &takeoff_config)
 Non-blocking call to takeoff. More...
 
Return takeoff_nb ()
 
Return land (const LandingConfig &landing_config)
 Blocking call to land. More...
 
Return land ()
 
Return land_nb (const LandingConfig &landing_config)
 Non-blocking call to land. More...
 
Return land_nb ()
 
Return go_to_waypoint (const Waypoint &waypoint)
 Blocking call to go to specified waypoint. More...
 
Return go_to_waypoint_nb (const Waypoint &waypoint)
 Non-blocking call to go to specified waypoint. More...
 
Return configure_planner (const PlannerConfig &config)
 Specify the configuration options for the planner. More...
 
Return preload_waypoints (const std::vector< Waypoint > &waypoints)
 Load a vector of waypoints. More...
 
Return compute_trajectory (StateVector starting_state)
 Compute a trajectory through the given waypoints. More...
 
Return execute_mission (const double t_start=0)
 Execute the trajectory-following mission. More...
 
Return execute_mission_nb (const double t_start=0)
 Non-blocking call to execute the trajectory-following mission. More...
 
void wait_on_action () const noexcept
 Wait for the currently-executing action to complete. More...
 
Permissions get_permissions () const noexcept
 Return the permissions of this object. More...
 
Return get_last_action_result () const noexcept
 Get the result of the most recently executed action. More...
 
Action get_last_action () const noexcept
 Get the most recently executed action. More...
 
Action get_current_action () const noexcept
 Get the currently-executing action. More...
 
Return get_current_trajectory (std::vector< snav_traj_gen::SnavTrajectory > &traj) const
 Get the current trajectory. More...
 
Return get_last_optimized_trajectory (std::vector< snav_traj_gen::SnavTrajectory > &traj) const
 Get the last optimized trajectory. More...
 
Return get_waypoints (std::vector< Waypoint > &waypoints) const
 Get the input waypoints. More...
 
Return get_optimized_waypoints (std::vector< Waypoint > &waypoints) const
 Get the optimized waypoints. More...
 
Planner::Status get_planner_status () const
 Get the current status of the Planner. More...
 
float get_trajectory_time () const
 Get the current trajectory time. More...
 
Return set_waypoint_frame_tf (const Eigen::Quaternionf &q_pw, const Eigen::Vector3f &t_pw)
 Updates the transform between ReferenceFrame::WAYPOINT and its parent. More...
 
Return get_waypoint_frame_tf (Eigen::Quaternionf &q_pw, Eigen::Vector3f &t_pw) const
 Get the transform between ReferenceFrame::WAYPOINT and its parent. More...
 
Return set_tx_command (const TxCommand &command)
 Directly set the command being sent to the flight controller. More...
 
SnavCachedData get_snav_cached_data () const
 Get a copy of the latest data from the cache. More...
 
StateVector get_estimated_state (const SnavCachedData &snav_data) const
 Get the estimated state as a StateVector with respect to ReferenceFrame::WAYPOINT from the SnavCachedData structure. More...
 
StateVector get_desired_state (const SnavCachedData &snav_data) const
 Get the desired state as a StateVector with respect to ReferenceFrame::WAYPOINT from the SnavCachedData structure. More...
 
Return convert_velocity_to_rc_command (const std::array< float, 3 > velocity, const float yaw_rate, RcCommand &rc_command)
 Convert metric velocity command into an RcCommand suitable for sending to the flight controller based on the configured mode. More...
 

Static Public Member Functions

static void preempt_current_action ()
 Send preempt signal to currently-executing action.
 
static void set_verbosity (bool verbose)
 Set verbosity of FlightControlInterface. More...
 
static bool tx_ok ()
 Whether or not write access to Qualcomm Navigator is ok.
 
static bool rx_ok ()
 Whether or not read access to Qualcomm Navigator is ok.
 
static bool ok ()
 Whether or not read and write access to Qualcomm Navigator is ok.
 
static std::string get_return_as_string (Return ret_code)
 Convert a Return code to a string. More...
 

Detailed Description

Interface to the Qualcomm Navigator Flight Controller.

FlightControlInterface is a thread-safe C++ wrapper around the Qualcomm Navigator API that makes it easier to accomplish some high-level actions like taking off and going to waypoints. It handles basic error checking so that the developer does not have to implement as much logic to check aspects of the flight controller's state during runtime, leading to safer API programs.

Member Enumeration Documentation

Enum used for possible actions.

Enumerator
NONE 

No action

TAKEOFF 

Vehicle is taking off

GO_TO_WAYPOINT 

Vehicle is going to a waypoint

EXECUTE_MISSION 

Vehicle is executing a mission

LAND 

Vehicle is landing

Defines the permissions of an instance of FlightControlInterface.

An instance with READ_WRITE permissions can both send commands to and receive data from Qualcomm Navigator, whereas an instance with READ_ONLY permissions can only receive data from Qualcomm Navigator.

Only one instance of FlightControlInterface in a given process can obtain READ_WRITE permissions. This is intended to be a safety mechanism, since commands should only come from a single source.

Warning
This mechanism only works in a single process! A second instance of FlightControlInterface instantiated in a separate process can obtain READ_WRITE permissions, so it is ultimately up to the client to ensure that only one object sends commands. Multiple objects sending commands simultaneously results in undefined behavior.
Enumerator
READ_WRITE 

Read and write permissions; capable of both sending commands to and receiving information from Qualcomm Navigator

READ_ONLY 

Read-only permissions; capable of receiving information from Qualcomm Navigator, but not capable of sending any commands

Return codes for FlightControlInterface.

These return codes define whether or not a function executed successfully and, in the event of failure, why the failure occurred.

Enumerator
SUCCESS 

Action was completed successfully

FAILURE 

Action was not completed successfully

NOT_CONNECTED 

Action was not completed successfully because object is not connected

ALREADY_CONNECTED 

Action was not completed successfully because object is already connected

TRAJ_NOT_OPTIMIZED 

Action was not completed successfully because the trajectory was not optimized

TRAJ_NOT_FEASIBLE 

Action was not completed successfully because a feasible trajectory satisfying the required constraints could not be generated

ACTION_PREEMPTED 

Action was not completed successfully because it was preempted

NO_LOCK 

Action was not completed successfully because the necessary mutex lock could not be acquired

Constructor & Destructor Documentation

snav_fci::FlightControlInterface::FlightControlInterface ( const Permissions requested_access)
explicit

Constructs an instance of FlightControlInterface.

Precondition
Flight controller is running
Postcondition
FlightControlInterface object initialized (but not connected) with requested permissions
Parameters
[in]requested_permissionsSpecifies desired permissions of this instance. Only one FlightControlInterface instance can be granted write permissions.
Exceptions
std::runtime_errorIf unable to initialize SnavCachedData (usually means that flight controller is not responding)
std::logic_errorIf requested Permissions::READ_WRITE but an object with write permissions has already been created
snav_fci::FlightControlInterface::~FlightControlInterface ( )
noexcept

Destructor of FlightControlInterface.

Before object destruction, disconnect() is called if it was not called previously.

Member Function Documentation

Return snav_fci::FlightControlInterface::compute_trajectory ( StateVector  starting_state)

Compute a trajectory through the given waypoints.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
At least one waypoint has been added via preload_waypoints()
Postcondition
Function result is returned
Parameters
[in]starting_stateState represented with respect to ReferenceFrame::WAYPOINT used as first constraint of trajectory
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::logic_errorIf waypoint timestamps are not monotonically increasing
std::runtime_errorIf trajectory generation fails
Return snav_fci::FlightControlInterface::configure_planner ( const PlannerConfig config)

Specify the configuration options for the planner.

If this function is not called, default options are used.

Precondition
None
Postcondition
Function result is returned
Parameters
[in]configDefines options used by the planner
Returns
FlightControlInterface::Return
Return snav_fci::FlightControlInterface::configure_rx ( const RxConfig rx_config)

Specify configuration options for receiving data from Qualcomm Navigator.

If this function is not called, default options are used.

Precondition
Object has not been connected via connect()
Postcondition
Object is configured to use given rx_config
Parameters
[in]rx_configDefines options used in receiving data
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
Return snav_fci::FlightControlInterface::configure_tx ( const TxConfig tx_config)

Specify configuration options for sending commands to Qualcomm Navigator.

If this function is not called, default options are used.

Precondition
Object has Permissions::READ_WRITE
Object has not been connected via connect()
Postcondition
Object is configured to use given tx_config
Parameters
[in]tx_configDefines options used in sending commands
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::runtime_errorIf given config is impossible to achieve
Return snav_fci::FlightControlInterface::connect ( )

Establish connection to Qualcomm Navigator.

Opens a persistent connection between the FlightControlInterface object and Qualcomm Navigator.

Precondition
None
Postcondition
Function result is returned
Returns
FlightControlInterface::Return
Return snav_fci::FlightControlInterface::convert_velocity_to_rc_command ( const std::array< float, 3 >  velocity,
const float  yaw_rate,
RcCommand rc_command 
)

Convert metric velocity command into an RcCommand suitable for sending to the flight controller based on the configured mode.

This function only works for closed-loop position control modes.

Precondition
Object has been connected via connect()
Object is configured for a closed-loop position control mode
Postcondition
rc_command is populated with appropriate commands
Parameters
[in]velocityDesired velocity in meters per second with respect to ReferenceFrame::ESTIMATION
[in]yaw_rateDesired yaw rate in radians per second with respect to ReferenceFrame::ESTIMATION
[out]rc_commandResulting rc command ready to be sent to the flight controller
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
Return snav_fci::FlightControlInterface::disconnect ( )
noexcept

End connection to Qualcomm Navigator.

Returns
FlightControlInterface::Return
Return snav_fci::FlightControlInterface::execute_mission ( const double  t_start = 0)

Execute the trajectory-following mission.

Causes the vehicle to execute the planned trajectory through the given waypoints. If no trajectory has been planned, one will be generated and consequently executed.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Propellers are spinning
No action is in progress
At least one waypoint has been added via preload_waypoints()
Postcondition
Action::EXECUTE_MISSION is concluded due to either completion or preemption
Parameters
[in]t_startOptional parameter defining the absolute start time for the mission in seconds according to the system-wide real time wall clock. Set t_start equal to zero for the mission to start immediately. If t_start is not zero, it must specify a moment in time in the future. t_start is used to establish time zero for "trajectory time," accessible via get_trajectory_time().
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::logic_errorIf waypoint timestamps are not monotonically increasing
std::runtime_errorIf trajectory generation fails
std::runtime_errorIf tx/rx connection is lost
std::invalid_argumentIf t_start is negative or corresponds to a time in the past
Note
Return snav_fci::FlightControlInterface::execute_mission_nb ( const double  t_start = 0)

Non-blocking call to execute the trajectory-following mission.

This is a non-blocking version of execute_mission().

Precondition
See execute_mission()
Postcondition
Action::EXECUTE_MISSION has been initiated
Note
Action snav_fci::FlightControlInterface::get_current_action ( ) const
noexcept

Get the currently-executing action.

Precondition
None
Postcondition
Current action is returned
Returns
FlightControlInterface::Action
Return snav_fci::FlightControlInterface::get_current_trajectory ( std::vector< snav_traj_gen::SnavTrajectory > &  traj) const

Get the current trajectory.

Precondition
None
Postcondition
Function result is returned
Parameters
[out]trajThe current trajectory, possibly composed of multiple segments each defined by a SnavTrajectory object, which has been optimized and satisfies the constraints enforced by the Planner. This is valid only if function returns Return::SUCCESS
Returns
FlightControlInterface::Return
StateVector snav_fci::FlightControlInterface::get_desired_state ( const SnavCachedData &  snav_data) const

Get the desired state as a StateVector with respect to ReferenceFrame::WAYPOINT from the SnavCachedData structure.

Precondition
None
Postcondition
Desired state is returned
Parameters
[in]snav_dataStructure containing data from the cache
Returns
Desired state vector represented with respect to ReferenceFrame::WAYPOINT
StateVector snav_fci::FlightControlInterface::get_estimated_state ( const SnavCachedData &  snav_data) const

Get the estimated state as a StateVector with respect to ReferenceFrame::WAYPOINT from the SnavCachedData structure.

Precondition
None
Postcondition
Estimated state is returned
Parameters
[in]snav_dataStructure containing data from the cache
Returns
Estimated state vector represented with respect to ReferenceFrame::WAYPOINT
Action snav_fci::FlightControlInterface::get_last_action ( ) const
noexcept

Get the most recently executed action.

Precondition
None
Postcondition
Last action is returned
Returns
FlightControlInterface::Action
Return snav_fci::FlightControlInterface::get_last_action_result ( ) const
noexcept

Get the result of the most recently executed action.

Precondition
None
Postcondition
Last action result is returned
Returns
FlightControlInterface::Return
Return snav_fci::FlightControlInterface::get_last_optimized_trajectory ( std::vector< snav_traj_gen::SnavTrajectory > &  traj) const

Get the last optimized trajectory.

The last optimized trajectory may be different from the current trajectory if the last optimized trajectory failed to satisfy the constraints enforced by the Planner.

Precondition
None
Postcondition
Function result is returned
Parameters
[out]trajThe last optimized trajectory, possibly composed of multiple segments each defined by a SnavTrajectory object, which has been optimized but does not necessarily satisfy the constraints enforced by the Planner. Only valid if function returns Return::SUCCESS.
Returns
FlightControlInterface::Return
Return snav_fci::FlightControlInterface::get_optimized_waypoints ( std::vector< Waypoint > &  waypoints) const

Get the optimized waypoints.

The optimized waypoints are different from the input waypoints in that they are an augmented set of the input waypoints. For example, the optimized waypoints contain at least one extra waypoint prepended to the start of the vector containing the current state. Further, they contain the higher derivatives computed from the optimization.

Precondition
None
Postcondition
Optimized waypoints are returned
Parameters
[out]waypointsVector of optimized waypoints used by planner
Returns
FlightControlInterface::Return
Permissions snav_fci::FlightControlInterface::get_permissions ( ) const
noexcept

Return the permissions of this object.

Precondition
None
Postcondition
Permissions are returned
Returns
Permissions
Planner::Status snav_fci::FlightControlInterface::get_planner_status ( ) const

Get the current status of the Planner.

Precondition
None
Postcondition
Planner status is returned
Returns
Planner::Status Current status of the planner
static std::string snav_fci::FlightControlInterface::get_return_as_string ( Return  ret_code)
static

Convert a Return code to a string.

Precondition
None
Postcondition
String representation of ret_code is returned
Parameters
[in]ret_codeReturn code to convert to string
Returns
std::string
SnavCachedData snav_fci::FlightControlInterface::get_snav_cached_data ( ) const

Get a copy of the latest data from the cache.

Precondition
Object has been connected via connect()
Postcondition
SnavCachedData is returned
Returns
Latest cached data
Exceptions
std::logic_errorIf any precondition is violated
float snav_fci::FlightControlInterface::get_trajectory_time ( ) const

Get the current trajectory time.

Trajectory time is relative to the current trajectory. The start of the trajectory corresponds to time zero.

Precondition
None
Postcondition
Trajectory time is returned
Returns
float Trajectory time in s
Return snav_fci::FlightControlInterface::get_waypoint_frame_tf ( Eigen::Quaternionf &  q_pw,
Eigen::Vector3f &  t_pw 
) const

Get the transform between ReferenceFrame::WAYPOINT and its parent.

Precondition
None
Postcondition
ReferenceFrame::WAYPOINT transform is returned
Parameters
[out]q_pqQuaternion representing the orientation of ReferenceFrame::WAYPOINT with respect to its parent
[out]t_pwVector from the origin of the parent frame to the origin of ReferenceFrame::WAYPOINT represented with respect to the parent frame
Returns
FlightControlInterface::Return
Return snav_fci::FlightControlInterface::get_waypoints ( std::vector< Waypoint > &  waypoints) const

Get the input waypoints.

Precondition
None
Postcondition
Waypoints are returned
Parameters
[out]waypointsVector of input waypoints used by planner
Returns
FlightControlInterface::Return
Note
Return snav_fci::FlightControlInterface::go_to_waypoint ( const Waypoint waypoint)

Blocking call to go to specified waypoint.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Propellers are spinning
No action is in progress
Postcondition
Action::GO_TO_WAYPOINT is concluded due to either completion or preemption
Parameters
[in]waypointSpecifies the destination waypoint represented with respect to ReferenceFrame::WAYPOINT
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::runtime_errorIf tx/rx connection is lost
Note
Return snav_fci::FlightControlInterface::go_to_waypoint_nb ( const Waypoint waypoint)

Non-blocking call to go to specified waypoint.

This is a non-blocking version of go_to_waypoint().

Precondition
See go_to_waypoint()
Postcondition
Action::GO_TO_WAYPOINT has been initiated
Note
Return snav_fci::FlightControlInterface::land ( const LandingConfig landing_config)

Blocking call to land.

This function commands the vehicle to descend until reaching the ground, at which point it attempts to stop the propellers via stop_props().

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Propellers are spinning
No action is in progress
Postcondition
Action::LAND is concluded due to either completion or preemption
Parameters
[in]landing_configSpecifies parameters for landing
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::runtime_errorIf tx/rx connection is lost
Note
Return snav_fci::FlightControlInterface::land ( )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Return snav_fci::FlightControlInterface::land_nb ( const LandingConfig landing_config)

Non-blocking call to land.

This is a non-blocking version of land().

Precondition
See land()
Postcondition
Action::LAND has been initiated
Note
Return snav_fci::FlightControlInterface::land_nb ( )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Return snav_fci::FlightControlInterface::preload_waypoints ( const std::vector< Waypoint > &  waypoints)

Load a vector of waypoints.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Planner status is IDLE
Postcondition
Waypoints have been added to planner
Parameters
[in]waypointsWaypoints to pass to planner.
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
Return snav_fci::FlightControlInterface::set_tx_command ( const TxCommand command)

Directly set the command being sent to the flight controller.

This function sets the command being sent to the flight controller in the tx thread. Calling this function will only have an impact if the tx thread is configured for sending this type of command.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Object has been configured for sending this type of command; refer to TxConfig for options
Parameters
[in]commandCommand to be sent to the flight controller
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
static void snav_fci::FlightControlInterface::set_verbosity ( bool  verbose)
inlinestatic

Set verbosity of FlightControlInterface.

By default, verbosity of FlightControlInterface is set to true. When true, FlightControlInterface emits informational messages to std::out and error messages to std::cerr.

Precondition
None
Postcondition
Verbosity is set to value of verbose
Parameters
[in]verboseDesired verbosity of FlightControlInterface
Return snav_fci::FlightControlInterface::set_waypoint_frame_tf ( const Eigen::Quaternionf &  q_pw,
const Eigen::Vector3f &  t_pw 
)

Updates the transform between ReferenceFrame::WAYPOINT and its parent.

FlightControlInterface expects waypoints to be given with respect to ReferenceFrame::WAYPOINT. The transformation between ReferenceFrame::WAYPOINT and its parent, defined by TxConfig::waypoint_frame_parent, is initialized to identity rotation and zero translation.

Precondition
None
Postcondition
Transform is updated
Parameters
[in]q_pwQuaternion representing the orientation of ReferenceFrame::WAYPOINT with respect to its parent
[in]t_pwVector from the origin of the parent frame to the origin of ReferenceFrame::WAYPOINT represented with respect to the parent frame
Returns
FlightControlInterface::Return
Return snav_fci::FlightControlInterface::start_props ( )

Blocking call to start the propellers.

In general, favor calling takeoff(), which automatically calls start_props() at the appropriate time, instead of manually calling this function.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Postcondition
Propellers are spinning according to flight controller
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::runtime_errorIf tx/rx connection is lost
std::runtime_errorIf unable to start props
Return snav_fci::FlightControlInterface::stop_props ( )

Blocking call to stop the propellers.

In general, favor calling land(), which automatically calls stop_props() at the appropriate time, instead of manually calling this function.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Postcondition
Propellers are not spinning according to flight controller
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::runtime_errorIf tx/rx connection is lost
std::runtime_errorIf unable to stop props
Return snav_fci::FlightControlInterface::takeoff ( const TakeoffConfig takeoff_config)

Blocking call to takeoff.

This function attempts to spin the propellers via start_props() and to take off to a specified height above the ground.

Precondition
Object has Permissions::READ_WRITE
Object has been connected via connect()
Propellers are not spinning
No action is in progress
Postcondition
Action::TAKEOFF is concluded due to either completion or preemption
Parameters
[in]takeoff_configSpecifies parameters for takeoff
Returns
FlightControlInterface::Return
Exceptions
std::logic_errorIf any precondition is violated
std::runtime_errorIf tx/rx connection is lost
Note
Return snav_fci::FlightControlInterface::takeoff ( )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Return snav_fci::FlightControlInterface::takeoff_nb ( const TakeoffConfig takeoff_config)

Non-blocking call to takeoff.

This is a non-blocking version of takeoff().

Precondition
See takeoff()
Postcondition
Action::TAKEOFF has been initiated
Note
Return snav_fci::FlightControlInterface::takeoff_nb ( )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

void snav_fci::FlightControlInterface::wait_for_configure ( ) const
noexcept

Block until FlightControlInterface has been configured.

This function can be used in a multithreaded architecture to synchronize multiple FlightControlInterface objects before calling connect() to ensure that the object with Permissions::READ_WRITE has an opportunity to set the desired configuration. This is necessary because it would otherwise be possible for an object with Permissions::READ_ONLY to spawn the rx thread prior to the rx configuration being set from a separate thread.

Precondition
None
Postcondition
Rx thread has been configured
void snav_fci::FlightControlInterface::wait_on_action ( ) const
noexcept

Wait for the currently-executing action to complete.

Blocks until the currently-executing action completes. The result of the action can be obtained via get_last_action_result().

Precondition
None
Postcondition
Currently-executing action is complete

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