Skip to content

[T-093c] Node perception_degrader: illumination-dependent depth point degradation #194

Closed

Description

@CodewithJha

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

Implements FR-SIM-003

Branch feat/t-093c-node-illumination-dependent-depth-point — one task = one branch = one PR (doc 32 §6)

Summary

Implement the node applying doc 06 §3.3 depth degradation (drop/noise as a function of P3 illuminance) to the depth PointCloud2 …/points_raw → …/points.

Context / motivation

Low light is a key interaction factor in the ground-truth failure designs.

Scope

In scope

  • Efficient PointCloud2 ↔ numpy via sensor_msgs_py.point_cloud2.

Implementation guidance

  • perception_degrader.py: subscribe topics.depth_points_raw (PointCloud2), publish topics.depth_points; convert with sensor_msgs_py.point_cloud2.read_points_numpy(msg, field_names=('x','y','z')).
  • Apply the doc 06 §3.3 model via vendored perturbation.depth.degrade(points, illuminance_lux, model, rng); model constants come from backends.gazebo_nav2.perception_model_file (configs/perception/oakd_lowlight_v1.yaml) passed through perturb_params.yaml — never inline constants.
  • Rebuild with create_cloud_xyz32(header, points), keeping frame and stamp.
  • Keep up with the camera rate: QoS depth 1 so stale clouds are dropped rather than queued; log per-cloud processing time.
  • 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

  • Statistical test of degradation at 3 illuminance levels; deterministic with seed.
  • Retained point fraction at 5/50/500 lux matches the model within tolerance.
  • Per-cloud processing time < camera period on the reference laptop (logged).
  • 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_perception_degrader.py.

Dependencies

Blocked by: #192 (T-093a), #46 (T-031b)

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/perception_degrader.py
  • ros_ws/src/roboprobe_ros/test/test_perception_degrader.py

Parallel.

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-093c (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 §4 · doc 06 §3.3

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

External:

Activity

  1. added
    area:rosROS 2 nodes and packages
    priority:P0Critical path / blocks others
    taskChild task of a milestone epic
    on Nov 19, 2026
  2. added a commit that references this issue on Nov 22, 2026
    7588bc9
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: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