Skip to content

feat(protocol): define core ROS interfaces - #2

Merged
Staaaaaaaaar merged 1 commit into
mainfrom
feat/core-ros-interfaces
Aug 17, 2026
Merged

feat(protocol): define core ROS interfaces#2
Staaaaaaaaar merged 1 commit into
mainfrom
feat/core-ros-interfaces

Conversation

@Staaaaaaaaar

Copy link
Copy Markdown
Owner

Motivation

Implements roadmap PR 02 — Core ROS Interfaces from
docs/architecture-and-development-plan.md.

Environment, Agent, and Experiment components need one implementation-independent
ROS 2 wire contract before their runtime behavior can be developed independently.

Scope

  • Add the ament_cmake rh_interfaces package.
  • Define four messages: ComponentStatus, EpisodeState, PointNavTask, and
    EpisodeResult.
  • Define four services: ResetEnv, ResetAgent, StartEpisode, and
    AbortEpisode.
  • Freeze lifecycle and termination-reason numeric values.
  • Document topic/service ownership, units, frame semantics, idempotency keys,
    opaque text fields, and compatibility rules.
  • Add cross-language interface contract tests under tests/contracts.
  • Include top-level contract packages and Python tests in the standard
    make dev-check path.

Out of scope

  • Publishers, subscribers, service servers/clients, or runtime nodes.
  • QoS profiles, deadlines, heartbeat handling, reset deduplication, and sequence
    guards; these belong to PR 04.
  • Core models, configuration validation, and state-machine behavior; these
    belong to PR 03 and later orchestration PRs.
  • A shared error-code catalog, generic Observation message, or long-running
    Episode Action.
  • Isaac Sim, Go2, Agent, Task, or Evaluator implementations.

Architecture changes

This follows the existing architecture baseline: rh_interfaces is a leaf ROS
interface package shared by all three runtime containers. It depends only on
ROS interface-generation/runtime packages plus builtin_interfaces and
geometry_msgs; it has no dependency on a RoboHarness implementation package.

The default generated states are deliberately non-operational:
ComponentStatus.STARTING=0 and EpisodeState.PREPARING=0. READY and RUNNING
therefore require explicit assignment. EpisodeState.NONE=0 represents the
absence of a committed termination reason.

Existing numeric values are stable wire values. Future values may be appended,
but existing values must not be reordered or reused.

Implementation

  • Configure all eight interfaces with rosidl_generate_interfaces and export
    rosidl_default_runtime.
  • Keep Episode lifecycle state orthogonal to its termination reason.
  • Carry reset request_id values as opaque idempotency keys without embedding
    runtime deduplication policy in the message package.
  • Keep EpisodeResult compact and refer to the durable JSON result through an
    opaque result_uri.
  • Treat detail, abort reason, and result_uri as opaque strings that must
    never be parsed for control decisions.
  • Use package version 0.0.0 and license value NOASSERTION until release and
    licensing metadata are finalized by roadmap PR 18.

Testing

Validated in the pinned Ubuntu 22.04 / ROS 2 Humble development container:

$ make dev-check
Summary: 2 packages finished
Summary: 4 tests, 0 errors, 0 failures, 0 skipped

Coverage includes:

  • rosidl C/C++/Python generation;
  • linked C++ message and service typesupport;
  • Python serialization/deserialization round trips for every request, response,
    and message type;
  • exact field names, order, and ROS types;
  • stable lifecycle and termination numeric values;
  • package dependency-boundary enforcement;
  • CMake, XML, repository, Markdown/YAML, and Ruff checks.

The contract suite contains 3 C++ cases and 26 Python cases.

Acceptance criteria

  • Scope and out-of-scope match the implementation.
  • Build, lint, and relevant tests pass.
  • Documentation is updated.
  • Acceptance evidence is included.
  • C++ and Python typesupport are generated and usable.
  • The interface package has no implementation-package dependencies.
  • Example messages and service payloads round-trip successfully.

Known limitations

  • Interface classes do not validate identifiers, finite numeric values, frames,
    radii, or timeouts; PR 03 owns domain validation.
  • Non-zero reset/status error codes remain component-specific until repeated
    implementation needs justify a shared catalog.
  • QoS and runtime idempotency semantics are documented but not implemented in
    this interface-only PR.
  • Project release version and license metadata are intentionally not finalized.

Follow-up

Roadmap PR 03 will add ROS-independent Experiment/Episode/PointNav models,
configuration loading, validation, and state-transition guards, with conversion
tests against these interfaces.

@Staaaaaaaaar
Staaaaaaaaar merged commit b0d76db into main Aug 17, 2026
1 check passed
@Staaaaaaaaar
Staaaaaaaaar deleted the feat/core-ros-interfaces branch August 17, 2026 06:42
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.

1 participant