class documentation

class RuntimeInterface(Protocol):

View In Hierarchy

All ROS2 access for one Machine, as the rest of the package sees it.

The docstrings of ~opensmi.ros2.runtime.runtime.Runtime describe the behaviour.

Async Method advertise Advertise a ROS2 topic, and return the handle that owns the publisher.
Async Method call_service Call one ROS2 service and return the response it answered with.
Method default_message Return a message of a type as its generated ROS2 class constructs it, with no arguments.
Method describe_action Return the goal, feedback and result message dataclasses of a ROS2 action type.
Method describe_message Return the message dataclass of a ROS2 message type.
Method describe_service Return the request and response message dataclasses of a ROS2 service type.
Method publishers_on Return what every publisher on a topic offers, as the QoS resolver takes it.
Async Method send_goal Send one goal to a ROS2 action server, and return the handle that owns it.
Async Method start Bring up the Context, the Node and the executor thread.
Async Method stop Close every open subscription, then tear the ROS2 objects down.
Async Method subscribe Subscribe to a ROS2 topic, and return the handle that owns the subscription.
Property domain_id Return the ROS2 Domain ID this Runtime is confined to.
Property graph Return the facet answering what is on the ROS2 graph.
Property node_name Return the name of the single rclpy Node this Runtime owns.
Property parameters Return the facet answering what a ROS2 node's parameters are, and writing them.
Property started Return whether the Context, Node and executor thread are up.
Property tf Return the facet answering what the TF frame network looks like, and where a frame sits.
async def advertise(self, *, topic: str, message_type: str | type[Message], depth: int = 10, qos: QoSProfile | None = None) -> Publisher:

Advertise a ROS2 topic, and return the handle that owns the publisher.

async def call_service(self, *, service: str, service_type: str | ServiceTypes, request: Message, server_timeout: float = 10.0, call_timeout: float = 30.0) -> Message:

Call one ROS2 service and return the response it answered with.

def default_message(self, message_type: type[Message]) -> Message:

Return a message of a type as its generated ROS2 class constructs it, with no arguments.

def describe_action(self, action_type: str) -> ActionTypes:

Return the goal, feedback and result message dataclasses of a ROS2 action type.

def describe_message(self, message_type: str) -> type[Message]:

Return the message dataclass of a ROS2 message type.

def describe_service(self, service_type: str) -> ServiceTypes:

Return the request and response message dataclasses of a ROS2 service type.

def publishers_on(self, topic: str) -> tuple[EndpointInfo, ...]:

Return what every publisher on a topic offers, as the QoS resolver takes it.

async def send_goal(self, *, action: str, action_type: str | ActionTypes, goal: Message, depth: int = 10, server_timeout: float = 10.0) -> Goal:

Send one goal to a ROS2 action server, and return the handle that owns it.

async def start(self):

Bring up the Context, the Node and the executor thread.

async def stop(self) -> StopOutcome:

Close every open subscription, then tear the ROS2 objects down.

async def subscribe(self, *, topic: str, message_type: str | type[Message], depth: int = 10, qos: QoSProfile | None = None) -> Subscription:

Subscribe to a ROS2 topic, and return the handle that owns the subscription.

@property
domain_id: int =

Return the ROS2 Domain ID this Runtime is confined to.

@property
graph: GraphFacet =

Return the facet answering what is on the ROS2 graph.

@property
node_name: str =

Return the name of the single rclpy Node this Runtime owns.

@property
parameters: ParameterFacet =

Return the facet answering what a ROS2 node's parameters are, and writing them.

@property
started: bool =

Return whether the Context, Node and executor thread are up.

@property
tf: TFFacet =

Return the facet answering what the TF frame network looks like, and where a frame sits.