
A rover on another planet cannot brake for a pothole. Path planning there is not a tidy grid problem — it is a continuous-control problem on rough, rocky ground where the "cost" of a path is measured in tilt, slip, and the chance of getting stuck. This project simulates an improved motion-primitive A* planner and an arc-based tracking controller for exactly that setting.
Problem
Classical grid-based A* works for indoor robots on flat floors. Planetary rovers face continuous terrain: slopes, rocks, loose regolith. A grid planner either misses narrow passages (coarse grid) or explodes in computation (fine grid). Motion-primitive A* expands constant-curvature arcs in space — a better fit for non-holonomic vehicles — but the literature lacks accessible, runnable implementations with terrain-aware costs. This simulator provides that, with a head-to-head baseline and a reactive tracker.
Constraints
- Real-time-ish: Planner must return a path in seconds, not minutes, for a 100×100 DEM
- Terrain-aware cost: Slope, roughness, rock proximity must feed a single traversability metric
- Non-holonomic motion: Rover cannot strafe; motion primitives are constant-curvature arcs
- Reactive tracking: Global plan may be invalidated by local obstacles; local controller must react
- Reproducible experiments: Fixed seeds, synthetic DEM generation, automated trial runs
- Visualization: Pygame renderer showing terrain, rover, planned path, HUD — all interactive
- Dependencies: Python 3.8+, Pygame, NumPy, Matplotlib (plotting only)
Architecture & Design Decisions
Three Components, One Simulator
The codebase implements three distinct planners/controllers in one framework:
- Improved A with motion primitives* (
rover_control_sim_fast.py) — global planner expanding constant-curvature arcs in using a terrain-aware cost model (Zhang et al. 2025) - Grid-based A baseline* (
rover_control_sim_astar.py) — 8-connected grid planner with per-cell terrain costs - Arc-based local controller — reactive controller sampling short circular arcs, scored by multi-objective criteria (progress, alignment, safety)
Decision: Keep all three in one repo with shared terrain generation and visualization. Enables fair comparison and reduces duplication.
Terrain Generation
Decision: Procedural DEM from Gaussian bumps + Perlin-style noise + scattered procedural rocks. Parameters (bump count, amplitude, noise scale, rock density) are configurable at top of script.
Why: No real planetary DEMs are public at the resolution needed. Synthetic terrain lets us control difficulty and run hundreds of trials.
Traversability Cost Model
Decision: Per-cell cost = , normalized to , then exponentiated to penalize high-cost cells.
Tradeoff: Linear combination is simple but may not capture interaction effects (e.g., steep + rocky = exponentially worse). The paper uses a similar formulation; we match it for validation.
Motion Primitives
Decision: Constant-curvature arcs parameterized by — linear and angular velocity. Discretize , . Each primitive = arc of fixed length.
Why: Matches the paper’s “improved A*” exactly. Alternative: Dubins paths (more accurate for car-like) but heavier to compute.
Heuristic for Motion-Primitive A*
Decision: Weighted Euclidean heuristic: , with to bias toward goal.
Tradeoff: makes search faster but suboptimal. Paper uses ; we expose as tunable.
Arc-Based Local Controller
Decision: At each control step, sample arcs from current neighborhood, simulate seconds forward, score by: Execute best arc.
Why: Reactive, no global replan needed for small deviations. Complements the global planner.
Evaluation
| Metric | Target | Actual | Method |
|---|---|---|---|
| Planning time (improved vs. grid A*) | >25% reduction | ~30% reduction | 40 trials, synthetic DEMs, fixed seeds |
| Path success rate (reach goal) | >90% | TODO(aditya): measure across terrain difficulty levels | 100 trials per difficulty tier |
| Tracking error (local controller) | <0.5m lateral | TODO(aditya): measure | RMS lateral deviation from global plan |
| Replan frequency | <5% of steps | TODO(aditya): measure | Count local controller interventions |
Limitations
- 2D simulation only: No dynamics, no wheel slip model, no 3D body orientation. Pure kinematic.
- Synthetic terrain only: No validation on real Mars DEMs (HiRISE, MOLA) — would need preprocessing pipeline.
- Single rover: No multi-agent coordination, no communication delays.
- Pygame rendering: Not headless-friendly; CI cannot run visual tests easily.
- Fixed motion primitive set: No online adaptation of primitive library to terrain.
What’s Next
- Add headless mode — run planner/controller without Pygame for CI benchmarks
- Integrate real DEM data — HiRISE DTM loader with resolution matching
- Implement Dubins/RRT baselines* — broader comparison for paper
- Add dynamics model — simple bicycle model with slip
- Package as pip-installable —
pip install mars-rover-planner
Repository
Citation
If you use this code or its results, please cite the project and the underlying paper:
@article{zhang2025improved,
title={An improved path planning and tracking control method for planetary exploration rovers with traversable tolerance},
author={Zhang, Haojie and Jiang, Feng and Li, Qing},
journal={Biomimetic Intelligence and Robotics},
volume={5},
number={2},
pages={100219},
year={2025},
doi={10.1016/j.birob.2025.100219}
}Further Reading
- Zhang et al. (2025) — the paper this simulator validates: DOI
- Motion Planning for Non-Holonomic Robots (LaValle) — foundational reference
- The Rasch Model — another case where mathematical structure makes an intractable problem measurable