Docs and Controllers Update

This commit is contained in:
2026-01-02 07:53:44 +00:00
parent 72f85c37a5
commit 61c47f82fc
8 changed files with 289 additions and 208 deletions

View File

@@ -4,7 +4,7 @@ A GPS-denied drone landing simulation using relative sensors (IMU, altimeter, ca
## Quick Start
### Standalone Mode (Any Platform)
### Standalone Mode (Any Platform - No ROS 2 Required)
```bash
source activate.sh # Linux/macOS
@@ -13,7 +13,7 @@ source activate.sh # Linux/macOS
python standalone_simulation.py --pattern circular --speed 0.3
```
### Two-Terminal Mode - PyBullet (with ROS 2)
### PyBullet + ROS 2 (Two Terminals)
**Terminal 1 - Simulator:**
```bash
@@ -25,20 +25,18 @@ python simulation_host.py
python run_bridge.py --pattern circular --speed 0.3
```
### Two-Terminal Mode - Gazebo (Linux only)
### Gazebo + ROS 2 (Two Terminals - Linux/WSL2)
**Terminal 1 - Gazebo:**
**Terminal 1 - Launch Gazebo + Bridge:**
```bash
gz sim gazebo/worlds/drone_landing.sdf
ros2 launch gazebo/launch/drone_landing.launch.py
```
**Terminal 2 - Bridge + Controllers:**
**Terminal 2 - Run Controllers:**
```bash
python run_gazebo.py --pattern circular --speed 0.3
```
That's it! Only 2 terminals needed.
## Installation
| Platform | Command |
@@ -53,8 +51,8 @@ That's it! Only 2 terminals needed.
| Feature | Ubuntu | Arch | macOS | Windows | WSL2 |
|---------|--------|------|-------|---------|------|
| Standalone | ✅ | ✅ | ✅ | ✅ | ✅ |
| ROS 2 Mode | ✅ | ⚠️ | ❌ | ❌ | ✅ |
| Gazebo | ✅ | ⚠️ | ❌ | ❌ | ✅ |
| PyBullet + ROS 2 | ✅ | ⚠️ | ❌ | ❌ | ✅ |
| Gazebo + ROS 2 | ✅ | ⚠️ | ❌ | ❌ | ✅ |
## Files
@@ -62,21 +60,32 @@ That's it! Only 2 terminals needed.
|------|-------------|
| `standalone_simulation.py` | All-in-one (no ROS 2 required) |
| `simulation_host.py` | PyBullet simulator server |
| `run_bridge.py` | **PyBullet bridge + Controllers** |
| `run_gazebo.py` | **Gazebo bridge + Controllers** |
| `run_bridge.py` | PyBullet bridge + Controllers |
| `run_gazebo.py` | Gazebo bridge + Controllers |
| `config.py` | **Configuration file** (edit to customize) |
| `drone_controller.py` | Drone landing logic (edit this) |
| `rover_controller.py` | Moving landing pad |
| `drone_controller.py` | **Your landing algorithm** (edit this!) |
| `rover_controller.py` | Moving landing pad controller |
## Options
## Configuration
Edit `config.py` to customize:
- Drone/rover starting positions
- Physical properties (mass, size)
- Controller gains (Kp, Kd)
- Landing detection thresholds
## Command Line Options
```bash
# Standalone
# Standalone (no ROS 2)
python standalone_simulation.py --pattern circular --speed 0.3
# ROS 2 mode
# PyBullet + ROS 2
python run_bridge.py --pattern circular --speed 0.3 --host <SIMULATOR_IP>
# Gazebo + ROS 2
python run_gazebo.py --pattern circular --speed 0.3
Options:
--pattern, -p stationary, linear, circular, square, random
--speed, -s Speed in m/s (default: 0.5)
@@ -88,18 +97,20 @@ Options:
| Sensor | Data |
|--------|------|
| **IMU** | Orientation, angular velocity |
| **IMU** | Orientation (roll, pitch, yaw), angular velocity |
| **Altimeter** | Altitude, vertical velocity |
| **Velocity** | Estimated horizontal velocity |
| **Camera** | 320x240 downward-facing image |
| **Landing Pad** | Relative position when visible |
| **Velocity** | Estimated horizontal velocity (x, y, z) |
| **Camera** | 320x240 downward-facing JPEG image |
| **Landing Pad** | Relative position when visible in camera FOV |
## Documentation
| Document | Description |
|----------|-------------|
| [Installation](docs/installation.md) | Platform setup guides + WSL2 |
| [Architecture](docs/architecture.md) | System components |
| [Architecture](docs/architecture.md) | System components diagram |
| [Gazebo Guide](docs/gazebo.md) | Gazebo-specific instructions |
| [PyBullet Guide](docs/pybullet.md) | PyBullet-specific instructions |
| [Protocol](docs/protocol.md) | Sensor data formats |
| [Drone Guide](docs/drone_guide.md) | Landing algorithm guide |