ArduPilot SITL Update
This commit is contained in:
@@ -4,97 +4,58 @@ The RoverController creates a moving landing pad target.
|
||||
|
||||
## Usage
|
||||
|
||||
The rover controller is automatically included when running `controllers.py`:
|
||||
|
||||
```bash
|
||||
# Stationary rover (default)
|
||||
python controllers.py
|
||||
# Stationary (default)
|
||||
python standalone_simulation.py --pattern stationary
|
||||
|
||||
# Moving rover
|
||||
python controllers.py --pattern circular --speed 0.3
|
||||
# Moving
|
||||
python standalone_simulation.py --pattern circular --speed 0.3
|
||||
```
|
||||
|
||||
### Options
|
||||
## Options
|
||||
|
||||
| Option | Short | Default | Description |
|
||||
|--------|-------|---------|-------------|
|
||||
| `--pattern` | `-p` | stationary | Movement pattern |
|
||||
| `--speed` | `-s` | 0.5 | Speed in m/s |
|
||||
| `--amplitude` | `-a` | 2.0 | Amplitude in meters |
|
||||
| Option | Default | Description |
|
||||
|--------|---------|-------------|
|
||||
| `--pattern, -p` | stationary | Movement pattern |
|
||||
| `--speed, -s` | 0.5 | Speed in m/s |
|
||||
| `--amplitude, -a` | 2.0 | Radius in meters |
|
||||
|
||||
## Movement Patterns
|
||||
## Patterns
|
||||
|
||||
### Stationary
|
||||
```bash
|
||||
python controllers.py --pattern stationary
|
||||
```
|
||||
Rover stays at origin. Best for initial testing.
|
||||
|
||||
### Linear
|
||||
```bash
|
||||
python controllers.py --pattern linear --speed 0.3 --amplitude 2.0
|
||||
```
|
||||
Oscillates along X-axis.
|
||||
|
||||
### Circular
|
||||
```bash
|
||||
python controllers.py --pattern circular --speed 0.5 --amplitude 2.0
|
||||
```
|
||||
Follows circular path of radius `amplitude`.
|
||||
|
||||
### Random
|
||||
```bash
|
||||
python controllers.py --pattern random --speed 0.3 --amplitude 2.0
|
||||
```
|
||||
Moves to random positions. Changes target every 3 seconds.
|
||||
|
||||
### Square
|
||||
```bash
|
||||
python controllers.py --pattern square --speed 0.5 --amplitude 2.0
|
||||
```
|
||||
Square pattern with corners at `(±amplitude, ±amplitude)`.
|
||||
| Pattern | Description |
|
||||
|---------|-------------|
|
||||
| stationary | Stays at origin |
|
||||
| linear | Oscillates along X-axis |
|
||||
| circular | Circular path |
|
||||
| square | Square with sharp turns |
|
||||
| random | Random positions |
|
||||
|
||||
## Difficulty Levels
|
||||
|
||||
| Level | Pattern | Speed | Description |
|
||||
|-------|---------|-------|-------------|
|
||||
| Beginner | stationary | 0.0 | Static target |
|
||||
| Easy | linear | 0.2 | Predictable 1D |
|
||||
| Medium | circular | 0.3 | Smooth 2D |
|
||||
| Hard | random | 0.3 | Unpredictable |
|
||||
| Expert | square | 0.5 | Sharp turns |
|
||||
| Level | Pattern | Speed |
|
||||
|-------|---------|-------|
|
||||
| Beginner | stationary | 0.0 |
|
||||
| Easy | linear | 0.2 |
|
||||
| Medium | circular | 0.3 |
|
||||
| Hard | random | 0.3 |
|
||||
| Expert | square | 0.5 |
|
||||
|
||||
## Progressive Testing
|
||||
|
||||
Start easy and increase difficulty:
|
||||
|
||||
```bash
|
||||
# Step 1: Static target
|
||||
python controllers.py --pattern stationary
|
||||
# 1. Static target
|
||||
python standalone_simulation.py --pattern stationary
|
||||
|
||||
# Step 2: Slow linear motion
|
||||
python controllers.py --pattern linear --speed 0.2
|
||||
# 2. Slow circular
|
||||
python standalone_simulation.py --pattern circular --speed 0.2
|
||||
|
||||
# Step 3: Slow circular motion
|
||||
python controllers.py --pattern circular --speed 0.2
|
||||
# 3. Faster circular
|
||||
python standalone_simulation.py --pattern circular --speed 0.4
|
||||
|
||||
# Step 4: Faster circular
|
||||
python controllers.py --pattern circular --speed 0.4
|
||||
|
||||
# Step 5: Random
|
||||
python controllers.py --pattern random --speed 0.3
|
||||
# 4. Random
|
||||
python standalone_simulation.py --pattern random --speed 0.3
|
||||
```
|
||||
|
||||
## Published Topics
|
||||
## Note
|
||||
|
||||
| Topic | Type | Description |
|
||||
|-------|------|-------------|
|
||||
| `/rover/cmd_vel` | `Twist` | Velocity commands |
|
||||
| `/rover/position` | `Point` | Current position |
|
||||
| `/rover/telemetry` | `String` | Full state (JSON) |
|
||||
|
||||
## GPS-Denied Note
|
||||
|
||||
In GPS-denied mode, the drone cannot directly access rover position. Instead, it must detect the landing pad visually via `landing_pad` sensor data.
|
||||
|
||||
The `/rover/telemetry` topic is used internally by the RoverController but the DroneController should primarily rely on vision-based `landing_pad` detection in the drone telemetry.
|
||||
The drone cannot access rover position directly (GPS-denied). It must detect the landing pad visually via the camera.
|
||||
|
||||
Reference in New Issue
Block a user