Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ The PR evidence check fails when STATE.md exists and a PR neither updates it nor
|---|---|---|---|
| C10 dataset quality gate | PR #25 | draft / synthetic evidence only | Work-package owner reviews placement and supplies real-episode evidence |
| Shared rules v2 (rollout step a, pilot) | PR #26 | in review | merge, then step (b) pin the harness |
| StopState.msg for the stop-gate contract (platform-sw#119) | PR #35 | changes requested (panthera-momagdii) - rebased on main `14912e1`, hosted CI/DCO/CLA green at head `025ee28caf7e72b31e9b134d09e5fa3a8606aac0` | push, Mohamed approves same day; then platform-sw#90 repins nav-status-tests.yml from the fork pin to the merge SHA |
| StopState.msg for the stop-gate contract (platform-sw#119) | PR #35 | merged (50ed777, 15 Nov 2026); platform-sw#90/#142 repinned off the fork pin to this SHA | none |
| SiteConfigStatus + MapIdentity.msg for the N2 site-config producer (interfaces#27, platform-sw#36/#73, platform-sw#34) | PR #28 | changes requested (panthera-momagdii) - CONTRACT_VERSION bumped to 3 (1->2 StopState.msg, 2->3 this PR's site_config field), compatibility/jazzy.json regenerated and PASSing against base `50ed777`; DCO fixed (missing sign-off on `1f46b295`, rebased) | Kunal: push; Mohamed re-review; platform-sw#73's MapLoaderNode boot-retry P1 and first-live-map identity findings stay open on that PR |

## Decisions this repository implements

Expand Down
77 changes: 75 additions & 2 deletions compatibility/jazzy.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@
},
"type_hash": "RIHS01_f5a05b28ee0b7c650fd5ede3f8d0f9397fb7e8010888b5ab7b54b52152806b2b"
},
"msg/MapIdentity": {
"constants": {},
"type_hash": "RIHS01_0cbe17d0f2b337c6295c945c8f2570c596d6628ac475bd6c4ae0495969a2ad17"
},
"msg/MotionSourceCoverage": {
"constants": {
"msg/COVERAGE_PARTIAL": {
Expand Down Expand Up @@ -259,9 +263,13 @@
"type": "uint16",
"value": 6001
},
"msg/CONFIG_ID_MISMATCH": {
"type": "uint16",
"value": 10004
},
"msg/CONTRACT_VERSION": {
"type": "uint16",
"value": 2
"value": 3
},
"msg/CONTROLLER_TIMEOUT": {
"type": "uint16",
Expand Down Expand Up @@ -295,6 +303,14 @@
"type": "uint16",
"value": 9003
},
"msg/FLOOR_COVERAGE_INSUFFICIENT": {
"type": "uint16",
"value": 10005
},
"msg/FLOOR_COVERAGE_OPTIONAL_GAP": {
"type": "uint16",
"value": 10007
},
"msg/GOAL_BLOCKED": {
"type": "uint16",
"value": 4002
Expand Down Expand Up @@ -339,6 +355,14 @@
"type": "uint16",
"value": 4008
},
"msg/MAP_ID_MISMATCH": {
"type": "uint16",
"value": 10002
},
"msg/MAP_STALE": {
"type": "uint16",
"value": 10003
},
"msg/MOTION_SOURCE_PARTIALLY_PROTECTED": {
"type": "uint16",
"value": 6007
Expand Down Expand Up @@ -443,6 +467,14 @@
"type": "uint16",
"value": 2005
},
"msg/SITE_CONFIG_NOT_LOADED": {
"type": "uint16",
"value": 10001
},
"msg/SITE_CONFIG_UNKNOWN": {
"type": "uint16",
"value": 10006
},
"msg/SPEED_LIMIT_ACTIVE": {
"type": "uint16",
"value": 6005
Expand All @@ -468,7 +500,7 @@
"value": 7006
}
},
"type_hash": "RIHS01_7137c1af27b948f92166db373d12b1930fba5742b56245450882454ca79af105"
"type_hash": "RIHS01_890db179ce478038c2c60cfd7007b050415131adca5039f8b0fb3059858e792c"
},
"msg/ParkingStatus": {
"constants": {
Expand Down Expand Up @@ -606,6 +638,47 @@
},
"type_hash": "RIHS01_22dd3f90ae89de88458a37d3e6fcef83fac8c0c4f6f5b764642a5ddc7de76c61"
},
"msg/SiteConfigStatus": {
"constants": {
"msg/COVERAGE_FULL": {
"type": "uint8",
"value": 3
},
"msg/COVERAGE_INSUFFICIENT": {
"type": "uint8",
"value": 1
},
"msg/COVERAGE_PARTIAL": {
"type": "uint8",
"value": 2
},
"msg/COVERAGE_UNKNOWN": {
"type": "uint8",
"value": 0
},
"msg/STATE_MATCHED": {
"type": "uint8",
"value": 1
},
"msg/STATE_MISMATCHED": {
"type": "uint8",
"value": 2
},
"msg/STATE_MISSING": {
"type": "uint8",
"value": 4
},
"msg/STATE_STALE": {
"type": "uint8",
"value": 3
},
"msg/STATE_UNKNOWN": {
"type": "uint8",
"value": 0
}
},
"type_hash": "RIHS01_f267da6162efc701bfb4fa698ed335eef407875ba8e3b4476ac32b71eaedff00"
},
"msg/StopState": {
"constants": {
"msg/STATE_LOCKED": {
Expand Down
2 changes: 2 additions & 0 deletions ros2/openamr_nav_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ find_package(std_msgs REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
"msg/NavigationStatus.msg"
"msg/SiteConfigStatus.msg"
"msg/MapIdentity.msg"
"msg/NavStackStatus.msg"
"msg/LocalizationStatus.msg"
"msg/SensorStatus.msg"
Expand Down
8 changes: 7 additions & 1 deletion ros2/openamr_nav_msgs/CONTRACT.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ producer has gone silent from staleness alone.
## Versioning

`NavigationStatus.contract_version` is set by the producer to
`NavigationStatus.CONTRACT_VERSION` (currently `1`).
`NavigationStatus.CONTRACT_VERSION` (currently `2` — bumped from `1` for the
`site_config` field addition, platform-sw#36 / interfaces#27).

- Adding a reason code or enum constant does not require a version bump.
- Adding, removing, renaming, reordering, or retyping a message field
Expand All @@ -49,6 +50,11 @@ should not be read as a real value.
- `DockingStatus`: `phase`, `lateral_error_m`, `yaw_error_rad`, and
`visible_tag_count` are only meaningful while `activity` is `ACTIVITY_DOCKING`
or `ACTIVITY_UNDOCKING`.
- `SiteConfigStatus`: `map_id`, `map_version`, `config_id`, and `config_version`
are `""` when `state` is `STATE_UNKNOWN` or `STATE_MISSING`. `floor_coverage`
is only meaningful when `state == STATE_MATCHED` — every other state leaves
it `COVERAGE_UNKNOWN`, since coverage isn't evaluated until identity has
already been confirmed.
- Any `reason` field is `NONE` exactly when its associated state/enum is in
its "nothing wrong" value (e.g. `coverage == COVERAGE_PROTECTED`,
`health == HEALTH_OK`); otherwise it should be non-`NONE`.
Expand Down
20 changes: 20 additions & 0 deletions ros2/openamr_nav_msgs/msg/MapIdentity.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# The single map loader's own record of the artifact it most recently
# loaded successfully (openamrobot-interfaces#34, platform-sw#73/#36).
#
# Published transient-local so a late or restarted observer reads the
# retained sample directly, rather than inferring identity from timing or
# from a live /map message it cannot attribute to a specific load_map call.
# A failed load never publishes a new sample - the previous one (if any)
# stays retained and valid until the next successful load.

string artifact_hash # map_identity_hash() of the map.yaml + image file actually
# requested, matching SiteConfigStatus.map_version's definition

uint32 load_generation # increments by 1 on every successful load since this loader
# process started; lets a consumer notice a reload even when
# the new artifact's hash happens to equal the previous one

string grid_fingerprint # fingerprint of the OccupancyGrid nav2_map_server's own
# ~/load_map response returned for this load - not a later,
# separately-observed /map message, which could have been
# produced by any caller, not necessarily this loader
19 changes: 18 additions & 1 deletion ros2/openamr_nav_msgs/msg/NavigationStatus.msg
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

std_msgs/Header header

uint16 CONTRACT_VERSION=2 # bumped for StopState.msg (platform-sw#119/#90)
uint16 CONTRACT_VERSION=3 # current version of this interface — 1->2 bumped for
# StopState.msg (platform-sw#119/#90, merged main
# 50ed777); 2->3 bumped here for site_config (field
# addition, see CONTRACT.md)
uint16 contract_version # producer sets this to CONTRACT_VERSION

string profile_id
Expand All @@ -31,6 +34,10 @@ NavTaskStatus task
RecoveryStatus recovery
ProtectionStatus protection
ActiveConstraint[] constraints
SiteConfigStatus site_config # added in CONTRACT_VERSION 3 (platform-sw#36,
# interfaces#27) - map/site-config identity and
# floor-coverage. UNKNOWN until the producer has
# loaded a site profile and compared it.
# base/I8 controller has no dedicated status yet - see reason codes below

# reason codes: 0=NONE everywhere, groups start at x001, append-only
Expand Down Expand Up @@ -104,3 +111,13 @@ uint16 ESTOP_ACTIVE=9003 # only on fresh I8 telemetry reporting E-stop
# active; stale/missing telemetry is
# BASE_LINK_LOST/BASE_NOT_READY, not this
uint16 BATTERY_LOW=9004

# site configuration (CONTRACT_VERSION 3, platform-sw#36 / interfaces#27)
uint16 SITE_CONFIG_NOT_LOADED=10001
uint16 MAP_ID_MISMATCH=10002
uint16 MAP_STALE=10003
uint16 CONFIG_ID_MISMATCH=10004
uint16 FLOOR_COVERAGE_INSUFFICIENT=10005 # a required zone is missing - blocks readiness
uint16 SITE_CONFIG_UNKNOWN=10006
uint16 FLOOR_COVERAGE_OPTIONAL_GAP=10007 # only an optional zone is missing - degrades
# health, does not block readiness
22 changes: 22 additions & 0 deletions ros2/openamr_nav_msgs/msg/SiteConfigStatus.msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
uint8 STATE_UNKNOWN=0
uint8 STATE_MATCHED=1
uint8 STATE_MISMATCHED=2
uint8 STATE_STALE=3
uint8 STATE_MISSING=4
uint8 state

uint8 COVERAGE_UNKNOWN=0
uint8 COVERAGE_INSUFFICIENT=1
uint8 COVERAGE_PARTIAL=2
uint8 COVERAGE_FULL=3
uint8 floor_coverage # meaningful only when state==STATE_MATCHED; UNKNOWN otherwise

uint16 reason # see NavigationStatus.msg; NONE only when
# state==STATE_MATCHED and floor_coverage==COVERAGE_FULL

string map_id
string map_version # SHA-256 over canonicalized map YAML fields + raw image
# bytes; "" when state==STATE_UNKNOWN or STATE_MISSING
string config_id
string config_version # SHA-256 over canonicalized site-config file content;
# same validity rule as map_version
11 changes: 10 additions & 1 deletion tests/install_consumer/src/consumer.cpp
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
#include <iostream>

#include "openamr_nav_msgs/msg/navigation_status.hpp"
#include "openamr_nav_msgs/msg/site_config_status.hpp"
#include "openamr_ui_msgs/action/move_base.hpp"
#include "openamr_ui_msgs/msg/array_pose_stamped_with_covariance.hpp"
#include "rosidl_typesupport_cpp/message_type_support.hpp"

int main()
{
using NavigationStatus = openamr_nav_msgs::msg::NavigationStatus;
using SiteConfigStatus = openamr_nav_msgs::msg::SiteConfigStatus;
using Poses = openamr_ui_msgs::msg::ArrayPoseStampedWithCovariance;
using Goal = openamr_ui_msgs::action::MoveBase::Goal;

NavigationStatus status;
status.contract_version = NavigationStatus::CONTRACT_VERSION;
// CONTRACT_VERSION 2: site_config is part of NavigationStatus itself, not just
// independently constructible — exercise it through the parent field, the way a
// real consumer would actually read it off a received message.
status.site_config.state = SiteConfigStatus::STATE_UNKNOWN;
status.site_config.floor_coverage = SiteConfigStatus::COVERAGE_UNKNOWN;
Poses poses;
poses.poses.resize(1);
Goal goal;
goal.target.header.frame_id = "map";

// Calling exported functions verifies headers, linking, and runtime loading.
if (!rosidl_typesupport_cpp::get_message_type_support_handle<NavigationStatus>() ||
!rosidl_typesupport_cpp::get_message_type_support_handle<SiteConfigStatus>() ||
!rosidl_typesupport_cpp::get_message_type_support_handle<Poses>() ||
!rosidl_typesupport_cpp::get_message_type_support_handle<Goal>())
{
std::cerr << "FAIL: installed C++ type support unavailable\n";
return 1;
}
std::cout << "PASS: installed navigation and UI interfaces; contract version "
<< status.contract_version << '\n';
<< status.contract_version << ", site_config.state "
<< static_cast<int>(status.site_config.state) << '\n';
return 0;
}
29 changes: 29 additions & 0 deletions tests/navigation_exchange.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,15 @@ def publish(topic, ready):
message.navigation_readiness = NavigationStatus.NAVIGATION_READINESS_NOT_READY
message.not_ready_reasons = [NavigationStatus.BASE_LINK_LOST]
message.active_reasons = [NavigationStatus.BASE_LINK_LOST]
# CONTRACT_VERSION 3: site_config round-trips as a nested field, same as the
# existing sensors[] / stack / localization sub-messages below.
message.site_config.state = message.site_config.STATE_MATCHED
message.site_config.floor_coverage = message.site_config.COVERAGE_FULL
message.site_config.reason = NavigationStatus.NONE
message.site_config.map_id = "verification-map"
message.site_config.map_version = "a" * 64
message.site_config.config_id = "verification-config"
message.site_config.config_version = "b" * 64
sensor = SensorStatus()
sensor.id = "test-lidar"
sensor.kind = SensorStatus.KIND_LIDAR
Expand Down Expand Up @@ -80,6 +89,17 @@ def check_values(message):
"test-lidar", SensorStatus.KIND_LIDAR, SensorStatus.STATE_OK, 10.0, True
):
raise RuntimeError("FAIL: nested sensor values did not round-trip")
site_config = message.site_config
if (
site_config.state != site_config.STATE_MATCHED
or site_config.floor_coverage != site_config.COVERAGE_FULL
or site_config.reason != NavigationStatus.NONE
or site_config.map_id != "verification-map"
or site_config.map_version != "a" * 64
or site_config.config_id != "verification-config"
or site_config.config_version != "b" * 64
):
raise RuntimeError("FAIL: site_config (CONTRACT_VERSION 3) did not round-trip")


def consume():
Expand All @@ -88,6 +108,15 @@ def consume():
if NavigationStatus.get_fields_and_field_types().get("thresholds_id") != "string":
print("CONTRACT_MISMATCH: NavigationStatus.thresholds_id expected string", flush=True)
return 42
site_config_type = NavigationStatus.get_fields_and_field_types().get("site_config")
if site_config_type != "openamr_nav_msgs/SiteConfigStatus":
print(
"CONTRACT_MISMATCH: NavigationStatus.site_config missing or wrong type "
f"(CONTRACT_VERSION 3 expected, got {site_config_type!r}) - this exit code "
"is also what a deliberately-reverted install should produce",
flush=True,
)
return 42
print(f"RMW loaded: {rclpy.utilities.get_rmw_implementation_identifier()}", flush=True)
topic = f"/interface_verification/navigation_{uuid.uuid4().hex}"
with tempfile.TemporaryDirectory(prefix="navigation-exchange-") as temporary:
Expand Down
Loading