run script Fixes 2

This commit is contained in:
2026-01-04 01:59:30 +00:00
parent 0ce6ed7e4a
commit 4b514f1dd9
3 changed files with 59 additions and 46 deletions

View File

@@ -6,7 +6,7 @@ Realistic flight controller simulation without GPS.
**Terminal 1:**
```bash
./scripts/run_ardupilot_sim.sh camera
./scripts/run_ardupilot_sim.sh runway
```
**Terminal 2:**
@@ -26,56 +26,40 @@ arm throttle force
source ~/.bashrc
```
Installs: ArduPilot SITL, Gazebo, ardupilot_gazebo plugin, MAVProxy
## World Options
```bash
./scripts/run_ardupilot_sim.sh runway # Iris on runway (default)
./scripts/run_ardupilot_sim.sh warehouse # Iris in warehouse
./scripts/run_ardupilot_sim.sh zephyr # Zephyr plane
./scripts/run_ardupilot_sim.sh gimbal # Gimbal test
./scripts/run_ardupilot_sim.sh parachute # Parachute test
```
## GPS-Denied Configuration
In MAVProxy console:
```bash
# Disable all pre-arm checks
param set ARMING_CHECK 0
# GPS-free flight modes
mode stabilize # Manual with stabilization
mode alt_hold # Altitude hold
mode guided_nogps # Guided without GPS
param set ARMING_CHECK 0 # Disable pre-arm checks
mode stabilize # Manual with stabilization
arm throttle force # Force arm
```
## GPU Support
The launcher auto-detects your GPU:
Auto-detects: NVIDIA > Intel > AMD > Software
| GPU | Status |
|-----|--------|
| NVIDIA | Best performance |
| Intel integrated | Good for laptops |
| AMD | Good performance |
| Software | Works but slow |
## Camera Feed
### In Gazebo GUI
Click camera icon → Select drone camera
### Using camera_viewer
Check your GPU:
```bash
ros2 run ros_gz_bridge parameter_bridge /drone/camera@sensor_msgs/msg/Image[gz.msgs.Image
python camera_viewer.py --topic /drone/camera
```
## World Options
```bash
./scripts/run_ardupilot_sim.sh runway # Default
./scripts/run_ardupilot_sim.sh camera # With camera
glxinfo | grep "OpenGL renderer"
```
## MAVProxy Commands
```bash
mode stabilize # Manual mode
mode guided_nogps # Autonomous (no GPS)
mode alt_hold # Altitude hold
arm throttle force # Arm motors
takeoff 5 # Takeoff 5m
mode land # Land
@@ -83,17 +67,26 @@ mode land # Land
## Troubleshooting
### "No JSON sensor message"
Gazebo isn't sending data to SITL. Check:
1. Start Gazebo FIRST, then SITL
2. Plugin path is set:
```bash
echo $GZ_SIM_SYSTEM_PLUGIN_PATH | grep ardupilot
```
### Simulation laggy
Check GPU is being used (not software):
```bash
glxinfo | grep "OpenGL renderer"
# Should show GPU, not "llvmpipe"
# Should NOT show "llvmpipe"
```
### Can't arm
```bash
param set ARMING_CHECK 0
arm throttle force
```
### No camera
Use `./scripts/run_ardupilot_sim.sh camera` for camera world.