WSL Support

This commit is contained in:
2026-01-01 00:59:44 +00:00
parent 7a1c4ba227
commit 2b01f636fe
4 changed files with 509 additions and 271 deletions

View File

@@ -4,55 +4,36 @@ A GPS-denied drone landing simulation using relative sensors (IMU, altimeter, ca
## Quick Start
### Windows (Standalone - No ROS 2 Required)
```bash
# Install (choose your platform)
./setup/install_ubuntu.sh # Ubuntu/Debian
./setup/install_arch.sh # Arch Linux
./setup/install_macos.sh # macOS
.\setup\install_windows.ps1 # Windows (PowerShell)
```powershell
. .\activate.ps1
python standalone_simulation.py
# Activate and run
source activate.sh # Linux/macOS
. .\activate.ps1 # Windows
# With moving rover
python standalone_simulation.py --pattern circular --speed 0.3
```
### Linux (Full ROS 2 Setup)
## Platform Compatibility
```bash
source activate.sh
| Feature | Ubuntu | Arch | macOS | Windows |
|---------|--------|------|-------|---------|
| Standalone | ✅ | ✅ | ✅ | ✅ |
| ROS 2 | ✅ | ⚠️ | ❌ | ❌ |
| Gazebo | ✅ | ⚠️ | ❌ | ❌ |
# Terminal 1: Simulator
python simulation_host.py
# Terminal 2: ROS bridge
python ros_bridge.py
# Terminal 3: Controllers
python controllers.py --pattern circular --speed 0.3
```
## Architecture
```
┌─────────────────────────────────────────────────────────────────────────┐
│ STANDALONE MODE (Windows) FULL MODE (Linux + ROS 2) │
│ ───────────────────────── ────────────────────────── │
│ │
│ ┌──────────────────────┐ ┌───────────────┐ ┌───────────────┐ │
│ │standalone_simulation │ │simulation_host│◄──►│ ros_bridge │ │
│ │ (All-in-one) │ └───────────────┘ └───────┬───────┘ │
│ └──────────────────────┘ │ │
│ ┌─────────▼─────────┐ │
│ │ controllers.py │ │
│ │ (Drone + Rover) │ │
│ └───────────────────┘ │
└─────────────────────────────────────────────────────────────────────────┘
```
**All platforms support standalone mode** - no ROS 2 required!
## Files
| File | Description |
|------|-------------|
| `standalone_simulation.py` | **Windows: All-in-one simulation (no ROS 2)** |
| `simulation_host.py` | PyBullet physics simulator |
| `standalone_simulation.py` | **All-in-one simulation (no ROS 2)** |
| `simulation_host.py` | PyBullet simulator (ROS 2 mode) |
| `ros_bridge.py` | UDP ↔ ROS 2 bridge |
| `gazebo_bridge.py` | Gazebo ↔ ROS 2 bridge |
| `controllers.py` | Runs drone + rover controllers |
@@ -62,22 +43,16 @@ python controllers.py --pattern circular --speed 0.3
## Controller Options
```bash
# Standalone (Windows)
python standalone_simulation.py --pattern circular --speed 0.3
# Full mode (Linux)
python controllers.py --pattern circular --speed 0.3
python standalone_simulation.py --help
Options:
--pattern, -p Rover pattern: stationary, linear, circular, square
--speed, -s Rover speed in m/s (default: 0.5)
--amplitude, -a Rover amplitude in meters (default: 2.0)
--pattern, -p stationary, linear, circular, square
--speed, -s Speed in m/s (default: 0.5)
--amplitude, -a Amplitude in meters (default: 2.0)
```
## GPS-Denied Sensors
The drone has no GPS. Available sensors:
| Sensor | Data |
|--------|------|
| **IMU** | Orientation, angular velocity |
@@ -90,25 +65,16 @@ The drone has no GPS. Available sensors:
| Document | Description |
|----------|-------------|
| [Installation](docs/installation.md) | Setup for Ubuntu, macOS, Windows |
| [Architecture](docs/architecture.md) | System components and data flow |
| [Installation](docs/installation.md) | All platform setup guides |
| [Architecture](docs/architecture.md) | System components |
| [Protocol](docs/protocol.md) | Sensor data formats |
| [Drone Guide](docs/drone_guide.md) | How to implement landing logic |
| [Rover Controller](docs/rover_controller.md) | Movement patterns |
| [PyBullet](docs/pybullet.md) | PyBullet-specific setup |
| [Gazebo](docs/gazebo.md) | Gazebo-specific setup (Linux only) |
## Platform Support
| Platform | Standalone | Full (ROS 2) | Gazebo |
|----------|------------|--------------|--------|
| Windows | ✅ | ⚠️ Complex | ❌ |
| Linux | ✅ | ✅ | ✅ |
| macOS | ✅ | ⚠️ Limited | ❌ |
| [Drone Guide](docs/drone_guide.md) | Landing algorithm guide |
| [PyBullet](docs/pybullet.md) | PyBullet setup |
| [Gazebo](docs/gazebo.md) | Gazebo setup (Linux) |
## Getting Started
1. **Windows**: Run `python standalone_simulation.py`
2. **Linux**: Read [docs/drone_guide.md](docs/drone_guide.md)
3. Edit `drone_controller.py` to implement your algorithm
4. Test with different rover patterns
1. Run `python standalone_simulation.py`
2. Watch the drone land automatically
3. Edit `drone_controller.py` to implement your own algorithm
4. Test: `python standalone_simulation.py --pattern circular`