Simulation of Martian Arena in Webots for Autonomous Drone Testing
Introduction
To develop and evaluate autonomous drone navigation algorithms in a Mars-like environment, we replicated a Martian surface arena within the Webots simulation platform. This virtual testbed allows us to rigorously test and fine-tune our system before deploying it on physical hardware.
Arena Setup
The simulated environment emulates the example arena shared in competition resources:
Gravity: Set to Mars gravity (
3.73 m/s²
).Surface: Designed to mimic a rugged Martian terrain by placing uneven textures and multiple rock objects as obstacles.
Arena Dimensions: Scaled as accurately as possible according to the rulebook specifications.
Drone Control:
- Manual control was implemented using teleoperation (teleop) mode.
- For demonstration purposes, all recorded videos showcase the drone in autonomous mode for cleaner and smoother behavior.
Manual Controls
W
– AscendS
– DescendQ
– Rotate Counter-ClockwiseE
– Rotate Clockwise- Arrow keys – Move in respective directions at current altitude
Motor Tuning
All motor PID controllers were carefully tuned to match the Mars environment simulation, providing stable and responsive drone dynamics.
Demonstration Videos
STABLE VERTICAL TAKEOFF
This video demonstrates a stable vertical takeoff. The drone targets an altitude of 4 meters
and stabilizes at 4.01 meters
, accurately replicating realistic flight conditions with PID tuning. This test validates reliable altitude hold capability under Martian gravity.
SAFE SPOT DETECTION
Objective: Detect and identify flat landing zones.
- Home position: 1.2 m x 1.2 m (4 ft x 4 ft)
- Additional safe spots: Three 1.5 m x 1.5 m flat zones
Detection Logic:
- The drone uses an onboard camera to scan terrain.
- Flat areas (
<15°
slope) are marked as safe. - Upon detection, the drone shifts laterally (left/right) in
90°
increments to continue scanning. - Coordinates of detected spots are logged in the console.
Visual Aids:
Red Box: Potential safe spot in RGB view
Green Dot: Optimal landing spot in grayscale view
Two displays are provided:
- RGB camera view
- Grayscale (for topography-based, color-neutral analysis)
Safe spot count is updated dynamically from 1 to 4 as detection progresses.
STEREO DEPTH ESTIMATION
Configuration:
- Stereo camera setup modeled after Intel RealSense D435i.
- Due to simulation performance constraints, monocular cameras were used in other tests; stereo was used here for depth accuracy.
Window Layout:
- Top Left/Right: Left camera – RGB and Grayscale
- Bottom Left/Right: Right camera – RGB and Grayscale
- Main Window: Displays a depth map generated using OpenCV’s Stereo Block Matching (BGM) algorithm.
Enhancements:
- Webots lacks built-in stereo cameras; we manually configured a stereo pair and improved depth estimation by fusing outputs from stereo vision and a rangefinder sensor.
RETURN TO HOME (LOW BATTERY FALLBACK)
Scenario:
- Battery was preset to 15% before mission start.
- Simulated rapid depletion, triggering return-to-home at 10% threshold.
Behavior:
- LED blink (visual alert) when battery is low (sound alert not captured in the video).
- Motors reduce power gradually.
- Drone uses logged movement history to autonomously return and land at the home position.
This demonstrates the safety fallback protocol in critical battery conditions.
Conclusion
The Martian arena simulation in Webots has been successfully built and used to demonstrate critical mission functionalities. The autonomous drone showcases reliable behavior across multiple tasks, including:
- Stable altitude control
- Safe landing zone detection
- Accurate stereo-based depth mapping
- Emergency return-to-home logic
Manual and autonomous modes are both fully supported, and further testing in hardware will validate real-world performance.