UAV tools
Ground control software
- Mission Planner
- QGroundControl
- APM Planner 2
- Mobile apps
FC Firmware
- Ardupilot
- PX4-Autopilot
PX4-Autopilot
Getting started resources
- All the confusing names in ‘Pixhawk’ explained (Mission Planner, PX4, Ardupilot Pixhawk etc.)
- Ubuntu Development Environment
- Building PX4 Software
make px4_sitl jmavsim
./QGroundControl.AppImage
Websites
Visual Studio Code IDE (VSCode)
Standard Configuration of flight controller
Videos
Integrating I2C/SPI C++ Sensor Driver for PX4
Getting started as a contributor on PX4
Architecture
PX4 Flight Task Architecture Overview
Tools
Integration
Interface Bosch AI Sensor BME688 on PX4
Notes
EKF resets
Location : lockLocalPositionEstimator::gpsInit()
Tyically depends on nSat, eph, epv and fix_type and it’s configurable with EKF2_GPS_CHECK
GPS blending
gps_blending
Replay
- Set environmental variables in terminal
- Configure EKF2 for running single EKF2 instance otherwise system replay is needed
MAVLINK
Before waiting for a heartbeat message, it’s essential to send a heartbeat message. This “initializes” the mavlink communication system.
Sending heartbeat message
from pymavlink import mavutil
import time
# Create a connection to the MAVLink device
# For USB, use '/dev/ttyUSB0' (Linux) or 'comX' (Windows).
connection = mavutil.mavlink_connection('/dev/ttyUSB0', baud=115200)
# Function to send a heartbeat
def send_heartbeat():
# Create the heartbeat message
connection.mav.heartbeat_send(
type=mavutil.mavlink.MAV_TYPE_GCS, # MAV_TYPE_GCS for Ground Control Station
autopilot=mavutil.mavlink.MAV_AUTOPILOT_INVALID,
base_mode=0,
custom_mode=0,
system_status=mavutil.mavlink.MAV_STATE_STANDBY
)
# Send a heartbeat every second
while True:
send_heartbeat()
print("Heartbeat sent")
time.sleep(1)
Receiving a Heartbeat
from pymavlink import mavutil
# Create a connection to the MAVLink device
connection = mavutil.mavlink_connection('/dev/ttyUSB0', baud=115200)
# Wait for a heartbeat from the MAVLink device
print("Waiting for heartbeat...")
heartbeat = connection.wait_heartbeat(timeout=5)
if heartbeat:
print(f"Heartbeat received from system {heartbeat.get_srcSystem()}, component {heartbeat.get_srcComponent()}")
else:
print("No heartbeat received within the timeout period.")