Loading…

Simulation of Martian Arena in Webots for Autonomous Drone Testing

Introduction

To develop and test autonomous drone navigation algorithms in a Mars-like environment, we built a Martian surface arena inside the Webots simulator. This virtual testbed was used to tune flight control and perception algorithms prior to hardware testing.


Arena Setup

The simulated environment replicates the example arena provided in competition resources:

  • Gravity: Set to Mars gravity (3.73 m/s²)

  • Surface: Rugged Martian-like terrain with uneven textures and multiple rock obstacles

  • Arena Dimensions: Scaled according to rulebook specifications

  • Drone Control:

    • Manual control implemented using teleoperation (teleop) mode
    • All recorded demonstrations showcase the drone in autonomous mode for clarity and smooth operation

Manual Controls

  • W – Ascend
  • S – Descend
  • Q – Rotate counter-clockwise
  • E – Rotate clockwise
  • Arrow Keys – Move in respective directions at current altitude

Motor Tuning

Motor PID controllers were tuned for Martian gravity (3.73 m/s²) to maintain altitude and attitude stability.


Demonstration Videos


STABLE VERTICAL TAKEOFF

This demonstration shows a stable vertical takeoff.

  • Target altitude: 4 meters
  • Stabilized altitude: 4.01 meters

The drone holds altitude near the target setpoint under simulated Martian gravity.


SAFE SPOT DETECTION

Objective

Detect and identify flat landing zones.

  • Home position: 1.2 m × 1.2 m (4 ft × 4 ft)
  • Additional safe spots: Three 1.5 m × 1.5 m flat zones

Detection Logic

  • Onboard camera scans terrain
  • Flat areas (< 15° slope) marked as safe
  • Drone shifts laterally in 90° increments after detection
  • Coordinates logged to console

Visual Aids

  • Red Box: Potential safe spot (RGB view)
  • Green Dot: Optimal landing point (grayscale view)

Display outputs include:

  • RGB camera feed
  • Grayscale feed (topography-focused, color-neutral analysis)

Safe spot counter updates dynamically from 1 to 4.


STEREO DEPTH ESTIMATION

Configuration

  • Stereo camera setup modeled after Intel RealSense D435i
  • Monocular cameras used in other tests for performance efficiency
  • Stereo used here for improved depth accuracy

Window Layout

  • Top Left / Right: Left camera – RGB and Grayscale
  • Bottom Left / Right: Right camera – RGB and Grayscale
  • Main Window: Depth map generated using OpenCV Stereo Block Matching (BGM)

Enhancements

Because Webots provides monocular camera nodes, a custom stereo camera pair was configured and fused with a rangefinder sensor to refine depth estimates.


RETURN TO HOME (LOW BATTERY FALLBACK)

Scenario

  • Battery preset to 15% at mission start
  • Rapid simulated depletion
  • Return-to-home triggered at 10% threshold

Behavior

  • LED blink alert (audio alert not captured)
  • Gradual motor power reduction
  • Autonomous return using logged movement history
  • Landing at home position

Demonstrates the low-battery return-to-home fallback sequence.


Conclusion

The Webots Martian arena simulation covers four test modes:

  • Vertical takeoff and altitude hold
  • Flat landing zone detection
  • Stereo block-matching depth estimation
  • Low-battery return-to-home trajectory replay

Manual teleoperation and autonomous control modes were both tested in simulation ahead of hardware integration.