Docs Update
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# Architecture Overview
|
||||
|
||||
## Operation Modes
|
||||
## Modes
|
||||
|
||||
### 1. Standalone (Any Platform, 1 Terminal)
|
||||
### 1. Standalone (1 Terminal)
|
||||
|
||||
```bash
|
||||
python standalone_simulation.py --pattern circular
|
||||
@@ -11,79 +11,68 @@ python standalone_simulation.py --pattern circular
|
||||
```
|
||||
┌────────────────────────────────────────┐
|
||||
│ standalone_simulation.py │
|
||||
│ PyBullet Physics + Camera + Controllers│
|
||||
│ PyBullet + Controllers + Camera │
|
||||
└────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### 2. Gazebo + ROS 2 (2 Terminals)
|
||||
|
||||
**Terminal 1:**
|
||||
```bash
|
||||
ros2 launch gazebo/launch/drone_landing.launch.py
|
||||
```
|
||||
|
||||
**Terminal 2:**
|
||||
```bash
|
||||
python run_gazebo.py --pattern circular
|
||||
```
|
||||
|
||||
```
|
||||
Terminal 1 Terminal 2
|
||||
┌───────────────────┐ ┌───────────────────┐
|
||||
│ Gazebo + Bridge │◄──────►│ run_gazebo.py │
|
||||
│ (Physics) │ ROS │ + Controllers │
|
||||
└───────────────────┘ └───────────────────┘
|
||||
└───────────────────┘ ROS └───────────────────┘
|
||||
```
|
||||
|
||||
### 3. ArduPilot SITL + Gazebo (2 Terminals)
|
||||
|
||||
**Terminal 1:**
|
||||
```bash
|
||||
gz sim -v4 -r ~/ardupilot_gazebo/worlds/iris_runway.sdf
|
||||
```
|
||||
|
||||
**Terminal 2:**
|
||||
```bash
|
||||
sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console
|
||||
```
|
||||
### 3. ArduPilot GPS-Denied (2 Terminals)
|
||||
|
||||
```
|
||||
Terminal 1 Terminal 2
|
||||
┌───────────────────┐ ┌───────────────────┐
|
||||
│ Gazebo + │◄──────►│ ArduPilot SITL │
|
||||
│ ArduPilot Plugin │ JSON │ + MAVProxy │
|
||||
└───────────────────┘ UDP └───────────────────┘
|
||||
└───────────────────┘ └───────────────────┘
|
||||
```
|
||||
|
||||
**Key features:**
|
||||
- Full ArduPilot flight controller
|
||||
- EKF, stabilization, failsafes
|
||||
- MAVLink protocol
|
||||
- Compatible with QGroundControl, Mission Planner
|
||||
## Data Flow
|
||||
|
||||
## Key Components
|
||||
### Standalone
|
||||
```
|
||||
Controller → PyBullet → Telemetry → Controller
|
||||
```
|
||||
|
||||
| Component | Description |
|
||||
|-----------|-------------|
|
||||
| `standalone_simulation.py` | All-in-one PyBullet simulation |
|
||||
| `run_gazebo.py` | Gazebo bridge + controllers |
|
||||
### Gazebo
|
||||
```
|
||||
Controller → /cmd_vel → Gazebo → /odometry → Controller
|
||||
```
|
||||
|
||||
### ArduPilot
|
||||
```
|
||||
Gazebo ◄─── JSON/UDP ───► SITL ◄─── MAVLink ───► MAVProxy
|
||||
```
|
||||
|
||||
## Key Files
|
||||
|
||||
| File | Purpose |
|
||||
|------|---------|
|
||||
| `drone_controller.py` | Your landing algorithm |
|
||||
| `camera_viewer.py` | Camera display window |
|
||||
| `gazebo_bridge.py` | Gazebo ↔ ROS bridge |
|
||||
| `camera_viewer.py` | Camera display |
|
||||
| `config.py` | Configuration |
|
||||
|
||||
## ROS 2 Topics (Gazebo Mode)
|
||||
|
||||
| Topic | Direction | Description |
|
||||
|-------|-----------|-------------|
|
||||
| `/drone/telemetry` | ← | Sensor data (JSON) |
|
||||
| `/cmd_vel` | → | Velocity commands |
|
||||
| `/drone/camera` | ← | Camera images |
|
||||
|
||||
## Sensors
|
||||
## GPS-Denied Sensors
|
||||
|
||||
| Sensor | Data |
|
||||
|--------|------|
|
||||
| IMU | orientation, angular_velocity |
|
||||
| Altimeter | altitude, vertical_velocity |
|
||||
| Velocity | x, y, z (m/s) |
|
||||
| Camera | 320x240 image |
|
||||
| Landing Pad | relative_x, relative_y (when visible) |
|
||||
| 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 |
|
||||
|
||||
Reference in New Issue
Block a user