class documentation
class RuntimeInterface(Protocol):
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 |
Call one ROS2 service and return the response it answered with. |
| Method | default |
Return a message of a type as its generated ROS2 class constructs it, with no arguments. |
| Method | describe |
Return the goal, feedback and result message dataclasses of a ROS2 action type. |
| Method | describe |
Return the message dataclass of a ROS2 message type. |
| Method | describe |
Return the request and response message dataclasses of a ROS2 service type. |
| Method | publishers |
Return what every publisher on a topic offers, as the QoS resolver takes it. |
| Async Method | send |
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 |
Return the ROS2 Domain ID this Runtime is confined to. |
| Property | graph |
Return the facet answering what is on the ROS2 graph. |
| Property | node |
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.
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 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.