Skip to content

Navigation Menu

Sign in
Sign up

Latest commit

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

LunaNav-Core

A lunar rover navigation system that finds safe driving paths across real NASA moon terrain data.

What it does

Given a map of the Moon's surface (a Digital Elevation Model, or DEM), LunaNav:

  1. Reads the terrain data (real NASA files or a built-in synthetic demo)
  2. Calculates which areas are safe to drive based on slope steepness
  3. Finds the shortest safe path between two points using the A* algorithm
  4. Saves a visualisation of the path as a PNG image

Quick start

# Install dependencies
pip install -r requirements.txt
# Run the built-in demo (no data file needed)
python main.py

This generates lunanav_path.png showing a rover path on a synthetic lunar surface.

Using real NASA data

Download a LOLA or SLDEM .img file from the NASA PDS Geosciences Node and run:

python main.py --img data/ldem_4.img

Load only a sub-region to save memory (useful for large files):

python main.py --img data/ldem_4.img --patch 0,1024,0,1024

Options

Flag Default Description
--img (none) Path to NASA PDS .img file
--lbl (auto) Path to .lbl label file
--start (auto) Start pixel as row,col
--goal (auto) Goal pixel as row,col
--patch (none) Sub-region to load: r0,r1,c0,c1
--max-pixels 1024 Max DEM dimension after downsampling
--max-slope 20.0 Rover max safe slope in degrees
--pixel-scale (auto) Metres per pixel override
--output lunanav_path.png Output image filename
--no-show Skip interactive plot window
--no-smooth Skip path smoothing

Supported data formats

  • LOLA (ldem_*) — 16-bit integer, PDS3 label
  • SLDEM (sldem2015_*_float) — 32-bit float, PDS4 XML label
  • Auto-detects label file; falls back to filename-based parameter inference

Project structure

lunanav/
 dem_reader.py — reads NASA terrain files and generates synthetic DEMs
 cost_map.py — computes per-pixel traversal cost from slope
 pathfinder.py — A* search, path smoothing, and statistics
 visualizer.py — plots the elevation map and rover path
main.py — command-line entry point

Requirements

  • Python 3.9+
  • numpy, scipy, matplotlib (see requirements.txt)

About

A lunar rover navigation system that finds safe driving paths across real NASA moon terrain data.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /