Skip to content

Waypoint pathfinding and navigational re-routing system with a virtual Rust & WASM / Yew interface demonstrating functionality using D*-Lite, A*, and Field D* as optional pathfinding algorithms.

License

Notifications You must be signed in to change notification settings

CartesianXR7/scout-navigator

Repository files navigation

scout-navigator

A live-rerouting path-finding visualiser in Rust + WASM

CI License: GPL-3.0-or-later

Scout shows how A*, D*-Lite, and Field-D* continually (re)compute optimal routes while new obstacles appear mid-journey.


Features

Area Highlights
Algorithms A*, D*-Lite (default), Field-D*
Dynamic obstacles User-placed DOBs autoconvert to static blocks when the rover is ≤ 2 cells away (Chebyshev)
UI Canvas grid with pan/zoom, dark mode, FPS limiter
Build Pure Rust → wasm-bindgen → tiny JS wrapper
Dev server src/bin/serve.rs (≈ 80 LOC) – no Node required

Quick start

# once per machine
rustup target add wasm32-unknown-unknown
cargo install wasm-pack

# development (watch mode)
wasm-pack build --target web --out-dir pkg --dev --watch &
cargo run --bin serve        # → http://localhost:8000

Production build

wasm-pack build --target web --out-dir pkg --release

High-level architecture

Grid Map 4-Layer Architecture
┌─────────────────┐
│ Layer 1 · DOB   │  Dynamic Obstacle Map (amber → blue)
└────┬────────────┘
     ↓
┌─────────────────┐
│ Layer 2 · UI    │  Grid visualisation / user input
└────┬────────────┘
     ↓
┌─────────────────┐
│ Layer 3 · Rover │  Rover state + path planner
└────┬────────────┘
     ↓
┌─────────────────┐
│ Layer 4 · FOM   │  Fixed Obstacle Map (authoritative)
└─────────────────┘

(A deep dive lives in docs/ARCHITECTURE.md)


Directory layout

Directory Overview:
ScoutNav/
├── src/
│   ├── bin/serve.rs            # dev HTTP server (localhost:8000)
│   ├── components/             # Yew UI widgets
│   │   ├── canvas.rs           # WebGL/2-D drawing surface
│   │   ├── controls.rs         # play/pause/algorithm selectors
│   │   ├── help_bubble.rs      # inline docs
│   │   └── main_app.rs         # root <App/>
│   ├── pathfinding/
│   │   ├── astar.rs
│   │   ├── dstar_lite.rs
│   │   ├── field_dstar.rs
│   │   └── pathfinder_trait.rs # common interface
│   ├── rover.rs                # agent FSM: move → scan → update map
│   └── lib.rs                  # wasm-bindgen glue
├── index.html / styles.css     # SPA shell + theming
├── Cargo.toml / Cargo.lock
├── package.json / package-lock.json
├── docs/                       # (demo.gif, architecture.svg etc.)
└── .github/workflows/ci.yml    # GitHub Actions

Tests & CI

  • Run cargo test locally.
  • GitHub Actions: check → test → wasm-pack build.

Contributing

  1. git switch -c feat/my-change
  2. cargo fmt && cargo clippy -- -D warnings
  3. Conventional-commit message (e.g. feat: add theta*)
  4. Open a PR – details in CONTRIBUTING.md.

License

GPL-3.0-or-later – see LICENSE.

About

Waypoint pathfinding and navigational re-routing system with a virtual Rust & WASM / Yew interface demonstrating functionality using D*-Lite, A*, and Field D* as optional pathfinding algorithms.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published