Files
RDC_Simulation/docs/architecture.md
2026-01-04 01:42:01 +00:00

2.3 KiB

Architecture Overview

Modes

1. Standalone (1 Terminal)

python standalone_simulation.py --pattern circular
┌────────────────────────────────────────┐
│      standalone_simulation.py          │
│  PyBullet + Controllers + Camera       │
└────────────────────────────────────────┘

2. Gazebo + ROS 2 (2 Terminals)

Terminal 1                    Terminal 2
┌───────────────────┐        ┌───────────────────┐
│ Gazebo + Bridge   │◄──────►│ run_gazebo.py     │
└───────────────────┘  ROS   └───────────────────┘

3. ArduPilot GPS-Denied (2 Terminals)

Terminal 1                    Terminal 2
┌───────────────────┐        ┌───────────────────┐
│ Gazebo +          │◄──────►│ ArduPilot SITL    │
│ ArduPilot Plugin  │  JSON  │ + MAVProxy        │
└───────────────────┘        └───────────────────┘

Data Flow

Standalone

Controller → PyBullet → Telemetry → Controller

Gazebo

Controller → /cmd_vel → Gazebo → /odometry → Controller

ArduPilot

Gazebo ◄─── JSON/UDP ───► SITL ◄─── MAVLink ───► MAVProxy

Key Files

File Purpose
drone_controller.py Your landing algorithm
gazebo_bridge.py Gazebo ↔ ROS bridge
camera_viewer.py Camera display
config.py Configuration

GPS-Denied Sensors

Sensor Data
IMU Orientation, angular velocity
Altimeter Altitude, vertical velocity
Camera Downward image
Landing Pad Relative position

Topics

Topic Direction
/cmd_vel → Drone commands
/drone/telemetry ← Sensor data
/drone/camera ← Camera images