Class FlightControlModule
- Defined in File flight_control.hpp 
Inheritance Relationships
Base Type
- public rclcpp_lifecycle::LifecycleNode
Class Documentation
- 
class FlightControlModule : public rclcpp_lifecycle::LifecycleNode
- Public Types - 
using Trigger = std_srvs::srv::Trigger
 - 
using SetHomeFromGPS = psdk_interfaces::srv::SetHomeFromGPS
 - 
using SetGoHomeAltitude = psdk_interfaces::srv::SetGoHomeAltitude
 - 
using GetGoHomeAltitude = psdk_interfaces::srv::GetGoHomeAltitude
 - 
using SetObstacleAvoidance = psdk_interfaces::srv::SetObstacleAvoidance
 - 
using GetObstacleAvoidance = psdk_interfaces::srv::GetObstacleAvoidance
 - Public Functions - 
explicit FlightControlModule(const std::string &name)
- Construct a new FlightControlModule object. - Parameters:
- node_name – Name of the node 
 
 - 
~FlightControlModule()
- Destroy the Flight Control Module object. 
 - 
CallbackReturn on_configure(const rclcpp_lifecycle::State &state)
- Configures the flight control module. Creates the ROS 2 subscribers and services. - Parameters:
- state – rclcpp_lifecycle::State. Current state of the node. 
- Returns:
- CallbackReturn SUCCESS or FAILURE 
 
 - 
CallbackReturn on_activate(const rclcpp_lifecycle::State &state)
- Activates the flight control module. - Parameters:
- state – rclcpp_lifecycle::State. Current state of the node. 
- Returns:
- CallbackReturn SUCCESS or FAILURE 
 
 - 
CallbackReturn on_cleanup(const rclcpp_lifecycle::State &state)
- Cleans the flight control module. Resets the ROS 2 subscribers and services. - Parameters:
- state – rclcpp_lifecycle::State. Current state of the node. 
- Returns:
- CallbackReturn SUCCESS or FAILURE 
 
 - 
CallbackReturn on_deactivate(const rclcpp_lifecycle::State &state)
- Deactivates the flight control module. - Parameters:
- state – rclcpp_lifecycle::State. Current state of the node. 
- Returns:
- CallbackReturn SUCCESS or FAILURE 
 
 - 
CallbackReturn on_shutdown(const rclcpp_lifecycle::State &state)
- Shuts down the flight control module. - Parameters:
- state – rclcpp_lifecycle::State. Current state of the node. 
- Returns:
- CallbackReturn SUCCESS or FAILURE 
 
 - Initialize the flight control module. It needs the RID information to be passed to the native flight control initialization function from DJI. - Parameters:
- current_gps_position – sensor_msgs::msg::NavSatFix. Current GPS 
- Returns:
- true/false 
 
 - 
bool deinit()
- Deinitialize the flight control module. - Returns:
- true/false 
 
 
- 
using Trigger = std_srvs::srv::Trigger