Optimized for Typhoon H480 with Gimbal Support
UAV Console is a Python-based drone control system built on MAVSDK, specifically tested and optimized for the Typhoon H480 model in PX4 SITL. The system provides comprehensive control including advanced gimbal operations, telemetry monitoring, and mission planning capabilities.
- Asynchronous drone control using MAVSDK
- Real-time telemetry monitoring
- Mission planning with waypoint navigation
- Manual flight control capabilities
- Gimbal control system
- Return-to-Home functionality
- Orbital movement patterns
- Support for both SITL and hardware testing
- For physical testing: Pixhawk Flight Controller
- Companion computer running Ubuntu 20.04
- 3-axis gimbal system compatible with Typhoon H480
- Ubuntu 20.04 Focal Fossa
- Python 3.8+
- MAVSDK-Python
- PX4 Firmware (v1.13.0 or later)
- Gazebo 11
- Typhoon H480 model package
- Clone the repository:
git clone https://github.com/yourusername/uav-console.git
cd uav-console
- Install MAVSDK and PX4:
pip3 install mavsdk
# Clone PX4 Firmware
git clone https://github.com/PX4/PX4-Autopilot.git
cd PX4-Autopilot
git checkout v1.13.0
- Setup Typhoon H480 SITL:
# Install Typhoon H480 model
sudo apt-get install ros-noetic-typhoon-h480
# Build PX4 SITL with Typhoon H480
DONT_RUN=1 make px4_sitl_default gazebo_typhoon_h480
- Launch Typhoon H480 simulation:
cd PX4-Autopilot
make px4_sitl gazebo_typhoon_h480
- In a new terminal, initialize the console:
from uav_console import Console
console = Console("udp://:14540")
The Typhoon H480 comes with a 3-axis gimbal. Use the following commands for gimbal control:
- Initialize Gimbal:
# Set gimbal mode
console.run(10, {})
- Control Gimbal:
# Control gimbal movement
# Input integers for gimbal control:
# 1: Tilt up
# 2: Tilt down
# 3: Pan left
# 4: Pan right
console.run(11, {})
- Release Gimbal Control:
console.run(12, {})
# Initialize drone and gimbal
console.run(0, {}) # Initialize drone
console.run(10, {}) # Set gimbal mode
# Define mission with camera positioning
mission_data = {
"lat": 47.397742,
"long": 8.545594,
"alt": 30,
"speed": 5
}
console.run(2, mission_data)
# Control gimbal during flight
console.run(11, {}) # Manually input control command
# Complete mission and release gimbal
console.run(12, {})
- Gimbal response may have slight delay in SITL
- Pan limits need calibration in simulation
- Height considerations for gimbal clearance during takeoff
# Initialize with specific Typhoon H480 parameters
console = Console("udp://:14540")
console.run(0, {})
# Verify gimbal functionality
console.run(10, {}) # Set gimbal mode
orbit_data = {
"radius": 10,
"speed": 2,
"lat": 47.397742,
"long": 8.545594,
"alt": 30 # Maintain safe altitude for Typhoon H480
}
console.run(5, orbit_data)
- Default takeoff height: 2.5m
- Safe operating radius: 5-50m
- Recommended cruise speed: 5 m/s
- Gimbal tilt range: -90° to +30°
- Gimbal pan range: ±170°
- If gimbal doesn't respond:
# Restart gimbal plugin
gz model -m typhoon_h480 -p "gimbal::control=true"
- For visual issues:
# Reset model visibility
gz model -m typhoon_h480 -v true
- Pre-flight system checks
- Connection state monitoring
- Mission termination capability
- Return-to-Home functionality
- Telemetry monitoring
- Connection stability varies with different MAVSDK versions
- Telemetry delays possible during complex operations
- Manual control requires careful mode transitions
- Enhanced error handling
- Additional mission patterns
- Extended gimbal control features
- Improved telemetry visualization
- Mission planning GUI
MIT License (See LICENSE file for details)
For issues and support, please create an issue in the GitHub repository.