Skip to content

RFC: ROS 2 lifecycle guard — real-world bridge integration demo #2

@pshkv

Description

@pshkv

Problem

The @sint/bridge-ros2 package covers the wire format — translating ROS 2 topic/service messages to SINT requests and policy decisions. But it doesn't show how to hook into a real ROS 2 system.

Real-world ROS 2 robotics teams need to know: where in the ROS 2 stack does PolicyGateway.intercept() actually get called?

Proposed integration point

ROS 2 has a Managed Lifecycle (rclpy.lifecycle). The on_activate() transition is the natural SINT gate point:

# In a Python ROS 2 lifecycle node
async def on_activate(self, state):
    decision = await sint_gateway.intercept({
        "requestId": generate_uuid_v7(),
        "agentId": self.agent_public_key,
        "tokenId": self.token_id,
        "resource": f"ros2://{self.get_name()}",
        "action": "activate",
        "params": {},
    })
    if decision["action"] != "allow":
        self.get_logger().error(f"SINT denied activation: {decision}")
        return TransitionCallbackReturn.FAILURE
    return TransitionCallbackReturn.SUCCESS

For /cmd_vel publishing specifically, it would sit in the publish() call via a middleware-style wrapper.

What we'd need

  1. A sint_ros2 Python package (wraps the HTTP gateway client)
  2. A demo warehouse_robot lifecycle node showing the pattern
  3. A docker-compose with a ros:humble container + SINT gateway

Scope

This is a demo/reference implementation, not production code. The goal is to give robotics teams a concrete starting point.

Related

  • @sint/bridge-ros2 — TypeScript bridge (wire format)
  • sdks/typescript/ and sdks/python/ — existing gateway client SDKs
  • Phase 6 roadmap: hardware-level emergency-stop integration

Are you a ROS 2 developer who wants to test this? Comment below — we can coordinate on the docker-compose setup.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions