Repository navigation
Description
Task
T-093d· Milestone M9 — Gazebo backend · Size S · Priority P0 · Epic #9Implements FR-SIM-003
Branch
feat/t-093d-node-fifo-command-latency-twist— one task = one branch = one PR (doc 32 §6)
Summary
Implement P6 delay node using sim time (/clock), supporting both Twist and TwistStamped per topics.yaml, publishing measured delay for the recorder.
Context / motivation
Command delay model identical to k2d.
Scope
In scope
- Timer driven by sim time; zero delay passthrough.
Implementation guidance
cmd_delay.py: subscribetopics.cmd_vel_nav, publishtopics.cmd_vel; message typeTwistStampediftopics.stamped_cmd_velelseTwist(doc 10 §3 note).- Use the vendored FIFO
perturbation.delay.CommandDelay(delay_s=P6); a timer at the controller rate (paramrate_hzfromperturb_params.yaml) on sim time (use_sim_time: true) releases commands whose enqueue time ≤ now − delay. - Publish measured latency on
/roboprobe/cmd_delay_actual(Float64) for the recorder and oracle diagnostics. - Zero delay ⇒ forward immediately in the subscription callback (no timer quantisation).
- 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
- Measured latency within one control period of target (launch_testing with fake clock).
- Latency error ≤ one control period with a fake
/clock. - Both message types supported (parametrised test).
- 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
test/test_cmd_delay.py.
Dependencies
Blocked by: #192 (T-093a), #45 (T-031a)
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/cmd_delay.pyros_ws/src/roboprobe_ros/test/test_cmd_delay.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-093d (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.6
Requirements: FR-SIM-003 (traceability: doc 28)
External:
Metadata
Metadata
Assignees
Labels
Projects
- StatusShow more project fieldsBacklog
Activity
roboprobe_rosament_python package skeleton: package.xml, setup, params loading fromtopics.yaml, vendored geometry #192episode.launch.py: gz sim headless + bridge + Nav2 bringup + RoboProbe nodes from workdir files #199feat(ros): relay velocity commands on simulation time (T-093d) (#345)