Skip to content

ctrl (Vehicle Control)


The ctrl module provides core interfaces for drone flight control, including high-level simplified APIs, low-level PX4 MAVLink communication, and DLL simulation control functionalities.


Module Features

Feature Description
High-level Control API Simplified high-level control interface supporting one-click takeoff, landing, and waypoint flight
PX4 MAVLink Communication Low-level MAVLink protocol communication with the PX4 flight controller
DLL Simulation Control Interaction and control with the CopterSim DLL model
ROS Interface Control interface for ROS/ROS2 system integration
Earth Coordinate Transformation Coordinate transformations among WGS84, UTM, NED, and other systems

Core Classes and Interfaces

Class/Interface Description
PX4MavCtrlV4 Core class for PX4 flight controller control, supporting MAVLink communication
PX4MavCtrlV4ROS PX4 control class integrated with ROS
DllSimCtrlAPI DLL simulation model control interface
DllSimCtrlAPIROS DLL control class integrated with ROS
ReqCopterSim CopterSim request interface
EarthModel Earth coordinate transformation model
IPMgr IP address management utility
RosStart ROS environment startup utility

Usage Scenarios

Single-Vehicle Control

  • Takeoff, landing, and hover control for a single drone
  • Waypoint flight and trajectory tracking
  • Precise control of velocity, position, and attitude

Simulation Validation

  • Validation of control algorithms in the CopterSim simulation environment
  • High-fidelity dynamics simulation using DLL models
  • Hardware-in-the-loop (HIL) and software-in-the-loop (SIL) simulation

Real-World Deployment

  • Transmission of control commands to real drones
  • Real-time acquisition of flight controller status data
  • Processing and forwarding of remote controller signals


Note: This document serves as the index page for the ctrl module. Detailed API descriptions for each interface can be found in their respective standalone documentation pages.