Skip to content

[T-031a] perturbation: lidar Gaussian noise & dropout, command-delay FIFO #45

Closed

Description

@CodewithJha

Task T-031a · Milestone M2 — Scenario + kinematic2d · Size S · Priority P0 · Epic #2

Implements FR-SIM-001 · NFR-REP-001

Branch feat/t-031a-perturbation-lidar-gaussian-noise-dropout — one task = one branch = one PR (doc 32 §6)

Summary

Implement roboprobe.perturbation.lidar (P4 noise, P8 dropout, doc 06 §3.4) and perturbation.delay (P6 FIFO, doc 06 §3.6) as pure, seeded functions shared with the ROS nodes.

Context / motivation

Identical perturbation formulas in both simulators make kinematic2d a faithful test double (doc 10 §7.1).

Scope

In scope

  • apply_lidar_noise(ranges, std, rng, r_min, r_max), apply_dropout(ranges, p, rng) (→ +inf).
  • CommandDelayBuffer(delay_s) time-indexed FIFO (push(t, cmd), pop_due(t)), zero-delay passthrough.

Implementation guidance

  • RNG streams come from core.seeding (sensor stream). Keep modules dependency-free except NumPy so they can be vendored.
  • 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

  • Formula tests vs doc 06 §3.4/§3.6.
  • Same seed ⇒ identical outputs; dropout fraction within binomial CI.
  • 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/perturbation/test_lidar.py, test_delay.py.

Dependencies

Blocked by: #15 (T-002a), #17 (T-002c)

Blocks: #51 (T-033a), #193 (T-093b), #195 (T-093d)

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/lidar.py
  • backend/src/roboprobe/perturbation/delay.py

Parallel with T-031b.

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-031a (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.4 · doc 06 §3.6 · doc 21 §3

Requirements: FR-SIM-001 · NFR-REP-001 (traceability: doc 28)

Activity

  1. added
    area:simulatorSimulator backends (kinematic2d, Gazebo adapter)
    priority:P0Critical path / blocks others
    milestone:M2M2 — Scenario + kinematic2d
    taskChild task of a milestone epic
    on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:simulatorSimulator backends (kinematic2d, Gazebo adapter)good first issueGood for newcomersmilestone:M2M2 — Scenario + kinematic2dpriority: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