The Runtime: the sole owner of ROS2 access for one Machine.
This is the only module in the package that imports rclpy. One Runtime owns one rclpy Context on its own Domain ID, one Node and one executor thread. There is no registry and no process global, so two Machines on two Domain IDs run in one process without discovering each other.
No rclpy type crosses this interface. Every operation is async and must be awaited on the
loop Runtime.start ran on (otherwise it raises LoopAffinityError). Callbacks that
rclpy invokes on the executor thread only hop to the loop with call_soon_threadsafe;
decoding and buffering happen there. Blocking rclpy calls run through asyncio.to_thread.
QoS adaptation lives here too (see opensmi.ros2.runtime.qos).
| Class | |
All ROS2 access for one Machine, which is the unit of one Domain ID. |
| Class | _ |
One topic's QoS negotiation, and the rclpy subscription it is currently expressed as. |
| Function | _by |
Return one of rclpy's name-and-types lists as the mapping a snapshot holds. |
| Function | _duration |
Return a number of seconds as the rclpy duration a QoS policy takes. |
| Function | _faults |
Run one teardown step, returning a fault line instead of raising, so a failed step cannot keep the Context up. |
| Function | _our |
Return what one endpoint offers; anything not modelled reads as the most permissive value. |
| Function | _own |
Return the type hash of this node's own subscription on a topic (what the dataclass was built against). |
| Function | _policy |
Return the policy an incompatibility event named; an unmodelled kind is Policy.INVALID, not an exception. |
| Function | _rclpy |
Return one of our profiles as the rclpy object an endpoint is created with, joined with its depth. |
| Function | _refuse |
Refuse a goal for a path no action server answers on. |
| Function | _refuse |
Refuse a call on a path no service server answers on. |
| Function | _require |
Refuse a payload that is not the message dataclass its ROS2 path takes. |
| Async Function | _resolved |
Await an rclpy future (not awaitable, completes on the executor thread) on the Runtime's loop. |
| Function | _seconds |
Return an rclpy duration as seconds, with both spellings of no duration as FOREVER. |
| Function | _snapshot |
Return every topic, service and action on the graph, with the types on each name. |
| Constant | _DURABILITY |
Undocumented |
| Constant | _DURABILITY |
Undocumented |
| Constant | _INFINITE |
How a live Jazzy graph reports an infinite duration (INT64_MAX); a fresh profile says zero. Both mean FOREVER. |
| Constant | _LIVELINESS |
This package's policy values in rclpy's vocabulary (SYSTEM_DEFAULT is never requested). |
| Constant | _LIVELINESS |
The same read backwards, by the integer a publisher reports. |
| Constant | _LOGGER |
Undocumented |
| Constant | _RELIABILITY |
Undocumented |
| Constant | _RELIABILITY |
Undocumented |
| Constant | _UNKNOWN |
Undocumented |
Run one teardown step, returning a fault line instead of raising, so a failed step cannot keep the Context up.
Return the type hash of this node's own subscription on a topic (what the dataclass was built against).
Return the policy an incompatibility event named; an unmodelled kind is Policy.INVALID, not an exception.
str, path: str, payload: Message, expected: type[ Message], type_name: str):
¶
Refuse a payload that is not the message dataclass its ROS2 path takes.
| Raises | |
TypeError | When the payload is not an instance of the expected dataclass. |
Return every topic, service and action on the graph, with the types on each name.
A topic only this node subscribes to is included; match events, not this poll, say whether anything publishes on it.
Undocumented
| Value |
|
How a live Jazzy graph reports an infinite duration (INT64_MAX); a fresh profile says zero. Both mean FOREVER.
| Value |
|
This package's policy values in rclpy's vocabulary (SYSTEM_DEFAULT is never requested).
| Value |
|
The same read backwards, by the integer a publisher reports.
SYSTEM_DEFAULT, UNKNOWN and BEST_AVAILABLE are absent and fall through to the most permissive value, so an offer we cannot interpret never makes us ask for more than it.
| Value |
|
Undocumented
| Value |
|