# ArduPilot GPS-Denied Simulation Realistic flight controller simulation without GPS. ## Quick Start (2 Terminals) **Terminal 1:** ```bash ./scripts/run_ardupilot_sim.sh camera ``` **Terminal 2:** ```bash sim_vehicle.py -v ArduCopter -f gazebo-iris --model JSON --console # GPS-denied mode: param set ARMING_CHECK 0 mode stabilize arm throttle force ``` ## Installation ```bash ./setup/install_ardupilot.sh source ~/.bashrc ``` Installs: ArduPilot SITL, Gazebo, ardupilot_gazebo plugin, MAVProxy ## 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 ``` ## GPU Support The launcher auto-detects your GPU: | 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 ```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 ``` ## MAVProxy Commands ```bash mode stabilize # Manual mode mode guided_nogps # Autonomous (no GPS) arm throttle force # Arm motors takeoff 5 # Takeoff 5m mode land # Land ``` ## Troubleshooting ### Simulation laggy ```bash glxinfo | grep "OpenGL renderer" # Should show GPU, not "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.