Update to Bridges
This commit is contained in:
101
README.md
101
README.md
@@ -4,51 +4,83 @@ A GPS-denied drone landing simulation using relative sensors (IMU, altimeter, ca
|
||||
|
||||
## Quick Start
|
||||
|
||||
```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)
|
||||
### Standalone Mode (Any Platform)
|
||||
|
||||
# Activate and run
|
||||
source activate.sh # Linux/macOS
|
||||
. .\activate.ps1 # Windows
|
||||
```bash
|
||||
source activate.sh # Linux/macOS
|
||||
. .\activate.ps1 # Windows
|
||||
|
||||
python standalone_simulation.py --pattern circular --speed 0.3
|
||||
```
|
||||
|
||||
### Two-Terminal Mode - PyBullet (with ROS 2)
|
||||
|
||||
**Terminal 1 - Simulator:**
|
||||
```bash
|
||||
python simulation_host.py
|
||||
```
|
||||
|
||||
**Terminal 2 - Bridge + Controllers:**
|
||||
```bash
|
||||
python run_bridge.py --pattern circular --speed 0.3
|
||||
```
|
||||
|
||||
### Two-Terminal Mode - Gazebo (Linux only)
|
||||
|
||||
**Terminal 1 - Gazebo:**
|
||||
```bash
|
||||
gz sim gazebo/worlds/drone_landing.sdf
|
||||
```
|
||||
|
||||
**Terminal 2 - Bridge + Controllers:**
|
||||
```bash
|
||||
python run_gazebo.py --pattern circular --speed 0.3
|
||||
```
|
||||
|
||||
That's it! Only 2 terminals needed.
|
||||
|
||||
## Installation
|
||||
|
||||
| Platform | Command |
|
||||
|----------|---------|
|
||||
| Ubuntu/Debian | `./setup/install_ubuntu.sh` |
|
||||
| Arch Linux | `./setup/install_arch.sh` |
|
||||
| macOS | `./setup/install_macos.sh` |
|
||||
| Windows | `.\setup\install_windows.ps1` |
|
||||
|
||||
## Platform Compatibility
|
||||
|
||||
| Feature | Ubuntu | Arch | macOS | Windows |
|
||||
|---------|--------|------|-------|---------|
|
||||
| Standalone | ✅ | ✅ | ✅ | ✅ |
|
||||
| ROS 2 | ✅ | ⚠️ | ❌ | ❌ |
|
||||
| Gazebo | ✅ | ⚠️ | ❌ | ❌ |
|
||||
|
||||
**All platforms support standalone mode** - no ROS 2 required!
|
||||
| Feature | Ubuntu | Arch | macOS | Windows | WSL2 |
|
||||
|---------|--------|------|-------|---------|------|
|
||||
| Standalone | ✅ | ✅ | ✅ | ✅ | ✅ |
|
||||
| ROS 2 Mode | ✅ | ⚠️ | ❌ | ❌ | ✅ |
|
||||
| Gazebo | ✅ | ⚠️ | ❌ | ❌ | ✅ |
|
||||
|
||||
## Files
|
||||
|
||||
| File | Description |
|
||||
|------|-------------|
|
||||
| `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 |
|
||||
| `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** |
|
||||
| `drone_controller.py` | Drone landing logic (edit this) |
|
||||
| `rover_controller.py` | Moving landing pad |
|
||||
|
||||
## Controller Options
|
||||
## Options
|
||||
|
||||
```bash
|
||||
python standalone_simulation.py --help
|
||||
# Standalone
|
||||
python standalone_simulation.py --pattern circular --speed 0.3
|
||||
|
||||
# ROS 2 mode
|
||||
python run_bridge.py --pattern circular --speed 0.3 --host <SIMULATOR_IP>
|
||||
|
||||
Options:
|
||||
--pattern, -p stationary, linear, circular, square
|
||||
--pattern, -p stationary, linear, circular, square, random
|
||||
--speed, -s Speed in m/s (default: 0.5)
|
||||
--amplitude, -a Amplitude in meters (default: 2.0)
|
||||
--host, -H Simulator IP (default: 0.0.0.0)
|
||||
```
|
||||
|
||||
## GPS-Denied Sensors
|
||||
@@ -65,16 +97,21 @@ Options:
|
||||
|
||||
| Document | Description |
|
||||
|----------|-------------|
|
||||
| [Installation](docs/installation.md) | All platform setup guides |
|
||||
| [Installation](docs/installation.md) | Platform setup guides + WSL2 |
|
||||
| [Architecture](docs/architecture.md) | System components |
|
||||
| [Protocol](docs/protocol.md) | Sensor data formats |
|
||||
| [Drone Guide](docs/drone_guide.md) | Landing algorithm guide |
|
||||
| [PyBullet](docs/pybullet.md) | PyBullet setup |
|
||||
| [Gazebo](docs/gazebo.md) | Gazebo setup (Linux) |
|
||||
|
||||
## Getting Started
|
||||
## Network Setup (Remote Simulator)
|
||||
|
||||
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`
|
||||
Run simulator on one machine, controllers on another:
|
||||
|
||||
**Machine 1 (with display):**
|
||||
```bash
|
||||
python simulation_host.py # Listens on 0.0.0.0:5555
|
||||
```
|
||||
|
||||
**Machine 2 (headless):**
|
||||
```bash
|
||||
python run_bridge.py --host 192.168.1.100 # Connect to Machine 1
|
||||
```
|
||||
Reference in New Issue
Block a user