Skip to content

[T-094a] Node ground_truth_monitor: footprint min-distance (map EDT + analytic pallet), roll/pitch #196

Closed

Description

@CodewithJha

Task T-094a · Milestone M9 — Gazebo backend · Size S · Priority P0 · Epic #9

Implements FR-SIM-003 · FR-ORC-001

Branch feat/t-094a-node-footprint-min-distance-map — one task = one branch = one PR (doc 32 §6)

Summary

Implement per doc 10 §6: compute d(t) from the TB4 footprint at the ground-truth pose against the map distance transform and the pallet rectangle (vendored geometry), plus roll/pitch.

Context / motivation

Backend-independent oracles require the same geometry as k2d.

Scope

In scope

  • Publish a compact custom-free message (e.g. std_msgs/Float64MultiArray documented) or keep in-process with recorder.

Implementation guidance

  • ground_truth_monitor.py: subscribe topics.ground_truth_pose (bridged from the Gazebo pose publisher); load the map (configs/maps/warehouse_v1.yaml) into an EDT via vendored geometry.occupancy; pallet rectangle from episode.yaml.
  • Per sample: footprint polygon at the pose, d_map = min distance to the grid, d_pallet = polygon-to-rectangle distance, d = min(d_map, d_pallet); roll/pitch from the quaternion.
  • Design: a library class GroundTruthMonitor used in-process by the recorder (T-094b), plus a thin node for debugging — no custom messages or extra topic latency (document in the package README).
  • 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

  • Known pose fixtures → expected distances.
  • Distances equal the k2d backend's for identical poses (cross-backend test with shared fixtures).
  • Roll/pitch conversion tested at ±90° edge cases.
  • 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

  • test/test_ground_truth_monitor.py.

Dependencies

Blocked by: #192 (T-093a), #191 (T-092)

Blocks: #199 (T-094d)

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:

  • ros_ws/src/roboprobe_ros/roboprobe_ros/ground_truth_monitor.py
  • ros_ws/src/roboprobe_ros/test/test_ground_truth_monitor.py

Parallel with T-094b.

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-094a (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 §6 · doc 07 §1

Requirements: FR-SIM-003 · FR-ORC-001 (traceability: doc 28)

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:oracleVerdict oracles / safety propertiesarea:rosROS 2 nodes and packagesmilestone:M9M9 — Gazebo backendpriority:P0Critical path / blocks otherssize:S<= 1 daytaskChild task of a milestone epictype:featureNew functionality

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions