Skip to content

[T-033c] kinematic2d navigation: A* global planner (1 Hz replanning) and regulated pure-pursuit controller #53

Closed

Description

@CodewithJha

Task T-033c · Milestone M2 — Scenario + kinematic2d · Size M · Priority P0 · Epic #2

Implements FR-SIM-001

Branch feat/t-033c-kinematic2d-navigation-a-global-planner — one task = one branch = one PR (doc 32 §6)

Summary

Implement planner.py (A* on the inflated grid, replanning at 1 Hz, no path ⇒ nav_status=ABORTED) and controller.py (regulated pure pursuit: lookahead 0.6 m, speed scaled by curvature and obstacle proximity < 1 m, max speed P1).

Context / motivation

Mirrors the Nav2 planner/controller roles so failure classes F-PLAN, F-TIMEOUT and corner-cutting collisions (GT-C) appear naturally.

Scope

In scope

  • astar(grid, start_cell, goal_cell) -> Path | None (8-connected, octile heuristic).
  • RegulatedPurePursuit.command(pose, path, costmap, v_max) -> (v, w).

Implementation guidance

  • Planner performance matters (≤ 2 s/episode total): cache the inflated static grid; replan only every 1/replan_hz s.
  • Standards: respect the layering contracts (doc 16 §2) and conventions in doc 34; no hard-coded tunables — thresholds/defaults come from typed settings (doc 27); no magic numbers (ruff PLR2004); public APIs typed (mypy strict) and documented.

Acceptance criteria

  • Planner finds optimal paths on test mazes; returns None when blocked.
  • Controller tracks a straight/curved path with bounded cross-track error.
  • Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
  • Docs, config reference and CHANGELOG Unreleased updated where behaviour, keys or interfaces changed.
  • Definition of Done (doc 32 §3) satisfied.

Tests required

  • tests/unit/backends/kinematic2d/test_planner.py, test_controller.py.

Dependencies

Blocked by: #49 (T-029), #43 (T-030a)

Blocks: #54 (T-033d)

Parallelization notes

Files / paths owned by this task — avoid editing other paths; shared files (pyproject.toml entry points, cli/main.py, api/routers/__init__.py, router.tsx, docker/compose.yaml, ci.yml) are append-only:

  • backend/src/roboprobe/backends/kinematic2d/planner.py
  • backend/src/roboprobe/backends/kinematic2d/controller.py

Parallel with T-033a/T-033b.

Definition of Done

Per doc 32 §3 and AGENTS.md §5: lint, format, mypy strict and import-linter green; tests added and passing; docs updated; PR template completed with Closes #<this issue>; Conventional Commit messages referencing T-033c (doc 16 §6); commits authored only by the repository owner identity (AGENTS.md §4); CI green; reviewer checklist (doc 32 §5.1) satisfied.

References

Design docs: doc 10 §7.1

Requirements: FR-SIM-001 (traceability: doc 28)

External:

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:simulatorSimulator backends (kinematic2d, Gazebo adapter)milestone:M2M2 — Scenario + kinematic2dpriority:P0Critical path / blocks otherssize:M1-3 daystaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions