Skip to content

feat(ros): define Gazebo episode inputs and exit codes (T-094c) - #346

Merged
Reet24-del merged 3 commits into
mainfrom
feat/T-094c-episode-contract
Nov 22, 2026
Merged

Reet24-del merged 3 commits into
mainfrom
feat/T-094c-episode-contract

Conversation

@Reet24-del

@Reet24-del Reet24-del commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Define the Gazebo episode input, result, and exit-code contract for the ROS manager and worker. The ROS package installs the shared YAML classifications and publishes the episode result atomically. The topic catalog supplies the initial-pose topic and map frame.

Refs #198

Verification

  • ROS 2 Jazzy colcon build and colcon test passed all 10 tests in the simulator image, including the lidar launch regression.
  • Verified pose and deadline validation, the installed exit classifications, atomic result publication and elapsed clocks, and the installed pose topic and frame.
  • Ruff lint, formatting, and git diff --check passed.

Checklist

  • Configuration, result, and ROS resource tests
  • Simulator and configuration documentation
  • Owner commit identity

@Reet24-del
Reet24-del merged commit 87b54b3 into main Nov 22, 2026
20 checks passed
@Reet24-del
Reet24-del deleted the feat/T-094c-episode-contract branch November 22, 2026 21:23
cursor Bot pushed a commit that referenced this pull request Nov 22, 2026
## Summary

Add the Jazzy episode manager and use the materialized episode contract
from #346. Wait for AMCL, publish and verify the configured start pose,
and wait for the BT navigator before starting the recorder and sending
NavigateToPose. The startup deadline uses monotonic time. Navigation
uses simulated time with a separate wall-clock safety deadline.

The manager sends trace completeness to the recorder, waits for the
flush, and publishes the shared result file and process exit
classification.

Closes #198

## Verification

- Built and tested the full installed ROS 2 Jazzy package with colcon.
- Seven real DDS tests use mock Nav2 lifecycle, action, and recorder
endpoints. They cover success, abort, simulated timeout, paused-clock
wall timeout, startup timeout, spawn mismatch, and invalid input.
- Manager coverage measured 93.2% of lines and 75.0% of branches.
- Ruff lint, formatting, strict mypy for the changed production modules,
and the vendoring check passed.

## Checklist

- [x] Simulated and wall deadline regressions
- [x] Shared result and exit-code contract, simulator docs, and
CHANGELOG
- [x] Owner commit identity

Co-authored-by: CodewithJha <155089480+CodewithJha@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Nov 22, 2026
…-091) (#340)

## Summary

Follow up on #335 and #190 with the measured Jazzy contract. Make scan
and command paths distinct, use the Gazebo PointCloudPacked stream
through the ROS PointCloud2 bridge, and record the model-scoped pose
topic that produced an actual PoseStamped message. The velocity delay
input comes after collision monitoring.

The settled lidar plane is 0.188 m above the floor. Spawned a 0.135 m
collision box for the dropped pallet, leaving 53 mm of nominal clearance
below the beam plane. The checked-in capture documents the installed
packages, frames, QoS, Nav2 parameters, actual point and pose messages,
and a real TwistStamped bridge conversion.

## Test evidence

- Captured live ROS and Gazebo warehouse output on the pinned T-090
image and spawned the corrected pallet at z=0.0675 m.
- 166 focused schema, task, and profile tests passed. The contract
asserts distinct topics, type-matched velocity endpoints, point-cloud
types and the same pallet box in SDF and the task file.
- Regenerated the actual 60-run and three-mode seed dataset on
PostgreSQL, restored its SQL and artifacts into a second database, and
exported all seven current API responses. The original seeded campaign,
experiment and representative run IDs survived. The measured demo space
version `2b4d5a96d21a` pins its archived task and nominal CSV.
- Restored deterministic seed ID generation after #327 moved the SQL
experiment writer. Ruff and strict mypy pass for that script.

## Package integration

The installed ROS package includes the pallet model and accepts the
measured transient-local AMCL pose QoS. The Jazzy package passed 16
tests after integrating the initial pose topic and map frame from #346.
The materializer consumes this contract in #350.

---------

Co-authored-by: CodewithJha <155089480+CodewithJha@users.noreply.github.com>
Co-authored-by: CodewithJha <CodewithJha+CodewithJha@users.noreply.github.com>
cursor Bot pushed a commit that referenced this pull request Nov 22, 2026
#350)

## Summary

Generate deterministic Gazebo episode inputs from the validated
scenario, SUT profile and task. The generated workdir carries the SDF
world, Nav2 parameters, perturbations, bridge bindings and files
required by the ROS launch and recorder.

Closes #201

## Links

- Task T-096a
- Requirements FR-SIM-003 and FR-SCN-005
- Depends on #340 for the measured default topic catalog and installed
pallet model. The verified warehouse task came from #342.

## Changes

- Apply P1–P8 to their individual SDF, Nav2 and perturbation fields.
Initialize ROS components with independently derived seeds.
- Add the stable episode configuration and workdir-local topic catalog,
occupancy map and perception model.
- Disable XML entity expansion, DTD loading and parser network access.
Reject declarations before using the world.
- Document the workdir inputs consumed by the launch, recorder and
subprocess worker.

## Test evidence

- 27 materializer tests passed, including golden files and
field-by-field P1–P8 coverage. Targeted branch-inclusive coverage was
above 85%. Ruff and strict mypy passed.
- Real Jazzy Nav2 configuration and Harmonic warehouse SDF generated a
loadable warehouse with the dropped pallet. Jazzy accepted all nine
generated bridge routes.
- The current catalog includes the measured AMCL QoS, initial pose topic
and map frame from #340 and #346.

## Checklist

- [x] Added and ran focused materialization and invalid-input tests.
- [x] Updated design docs, traceability and Unreleased changelog.
- [x] Kept commit authorship to the repository owner.
- [ ] GitHub checks complete and #340 merged.

## Risk and rollback

The episode format is new. The runtime manifest remains the
responsibility of the subprocess worker that has the run identity and
environment metadata.

---------

Co-authored-by: CodewithJha <155089480+CodewithJha@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants