package documentation
The OPC UA half: a thin layer on opensmi.server that renders a Runtime as a Machine.
UA-facing classes inherit from opensmi's base classes with this project's mixins in front. The Runtime is injected through the Machine's constructor. Everything exported here is what a server author touches when declaring or starting a server; anything else is importable from its module but not part of the public surface (see CONTRIBUTING.md).
Public names:
- Binding declarations and the callback types their fields take, the Machine and Component mixins.
- ROS2Config and TransformConfig.
- The TOML loader: load_bindings, resolve_bindings, TOML_KINDS, load_machine.
- The Projection engine with its plan types. The recipes that curate a Component's types are the namespace recipes (recipes.Enum), since Enum would shadow enum.Enum.
- The three access-level constants, Severity and SmartFactoryROS2NodeIds.
- The lifecycle drivers with LifecycleNodeState and LifecycleNodeTransition. A custom driver subclasses LifecycleDriver and is given as a Binding's driver.
Errors raised for a bad declaration are in opensmi.ros2.server.errors. The command line is
public as a command (opensmi-ros2 serve, --server-config, the exit status), not as a module.
load_toml and from_dict share names with opensmi.core.config but behave differently and
are internal.
What a client sees:
- A write to a ROS2 parameter is answered by the owning node. A refused write comes back as a Bad status code and the variable keeps the node's value.
- Skills and Methods need the Lock, which times out after ten minutes without activity, as in opensmi. Introspection listings do not need it.
- A message is a complex variable with one child variable per field, named from the ROS2 field in PascalCase (Odom/Pose/Pose/Position/X). A repeated field is one array variable whose element is a structure type named after the ROS2 type.
- The address space grows but never shrinks while the server runs.
| Module | access |
Access control for this half: three levels and two overrides. |
| Package | bindings |
Binding declarations: what a Component exposes, written down rather than assembled. |
| Module | browse |
Turning names from ROS2 into browse names. |
| Module | component |
The Component side of the declarative API: a list of Bindings, and nothing overridden. |
| Module | config |
Configuration: a generic dataclass loader, and the ROS2 settings an application injects. |
| Module | containers |
The variable containers a Skill and a Method both fill from a Projection plan. |
| Module | drivers |
Drivers: which service, which encoding, which topic, and no state machine. |
| Module | errors |
Errors for declarations the server half refuses to boot with. |
| Module | events |
The project's namespace, and the one event it raises about itself. |
| Module | introspection |
One Component per Machine that answers what is on the ROS2 graph and what this adapter is bound to. |
| Module | keyed |
The Keyed Binding: one ROS2 path, many OPC UA objects, membership taken from the messages. |
| Module | lifecycle |
The correspondence between lifecycle nodes and Skill states, written down as data. |
| Module | limits |
The byte-string ceiling: one number, published once and applied once. |
| Module | loader |
Start a Machine from one TOML file, with no code of the deployer's. |
| Module | machine |
The Machine side: one injected Runtime, started at init and stopped at shutdown. |
| Module | method |
A service is a Method: a client writes the request, calls, and reads what came back. |
| Module | mirror |
The inward mirror: ROS2 messages arrive, and a container's variables follow. |
| Module | mutation |
The mutation chokepoint: the one place a Binding's nodes are made. |
| Package | nodesets |
The nodeset XML this project ships, and the NodeId class generated from it. |
| Module | parameters |
A ROS2 parameter is a Parameter: an operator tunes a value, and the node decides the write. |
| Module | projection |
The Projection engine: how one ROS2 type is rendered in OPC UA. |
| Package | projections |
The shipped catalogue: the curation this package brings, as data. |
| Module | provenance |
The per-Binding provenance entry: what one endpoint asked for, and why it is asking that. |
| Module | publisher |
A published topic is a Skill: a client writes the fields, then starts the publishing. |
| Module | recipes |
The recipes: curating a ROS2 type is writing data, not code. |
| Module | required |
Required Bindings: the StartupSkill's contract, and what a client sees at startup. |
| Module | skill |
An action is a finite Skill: a client starts it, watches it, and reads what it produced. |
| Module | spatial |
Which frame belongs to which object, which folder it lands in, and what its Base points at. |
| Module | startup |
The StartupSkill a lifecycle node drives, and that drives the lifecycle node back. |
| Module | status |
Satisfied, as a status code: telling a robot being off from this server being wrong. |
| Module | structures |
The ROS2 side of the Structure DataTypes: a message level as a dataclass. |
| Package | transforms |
The TF Binding, live and both ways: SpatialObjects at init, Locations on a poll, frames out. |