Repository navigation
Description
Task
T-031b· Milestone M2 — Scenario + kinematic2d · Size S · Priority P0 · Epic #2Implements FR-SIM-001
Branch
feat/t-031b-perturbation-illumination-dependent-depth-degradation— one task = one branch = one PR (doc 32 §6)
Summary
Implement perturbation.perception (P3 lighting model: η, p_valid, σ_d, r_max, doc 06 §3.3) with constants in configs/perception/oakd_lowlight_v1.yaml, and perturbation.friction (P5 traction/slip, doc 06 §3.5).
Context / motivation
These two models give P3 and P5 their physically motivated, documented effect — the basis of designed failure modes GT-A and GT-B.
Scope
In scope
PerceptionModel.from_yaml(path);degrade(ranges, illuminance, rng) -> ranges.traction(friction, accel_required),apply_slip(v_cmd, w_cmd, tau) -> (v_real, w_real)withω_real = ω_cmd·τ^1.5.configs/perception/oakd_lowlight_v1.yamlwithL_ref=300,L_min=5,0.85,0.005,0.01,4,3.0,0.6constants (versioned).
Implementation guidance
- Constants are domain configuration loaded from YAML (path from
backends.gazebo_nav2.perception_model_file/ k2d equivalent) — never literals in code. - 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.
Configuration keys
From the configuration reference (doc 27). Keys marked (new) must be added to the typed settings models and appear in the generated reference (T-003c).
backends.gazebo_nav2.perception_model_file
Acceptance criteria
- η = 0 at 300 lux, 1 at 5 lux;
p_valid,σ_d,r_maxmatch doc formulas (tests at 5, 32, 300, 1000 lux). - Traction/slip match doc 06 §3.5 examples.
- Tests listed below added and green in CI; coverage of new code meets the gate in doc 18 §3.
- Docs, config reference and CHANGELOG
Unreleasedupdated where behaviour, keys or interfaces changed. - Definition of Done (doc 32 §3) satisfied.
Tests required
tests/unit/perturbation/test_perception.py,test_friction.py.
Dependencies
Blocked by: #15 (T-002a), #17 (T-002c), #19 (T-003a)
Blocks: #51 (T-033a), #194 (T-093c)
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/perturbation/perception.pybackend/src/roboprobe/perturbation/friction.pyconfigs/perception/oakd_lowlight_v1.yaml
Parallel with T-031a.
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-031b (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 06 §3.3 · doc 06 §3.5 · doc 10 §7.1
Requirements: FR-SIM-001 (traceability: doc 28)
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsReady
Activity
perception_degrader: illumination-dependent depth point degradation #194