class documentation

class ROS2Config:

Constructor: ROS2Config.from_toml(path)

View In Hierarchy

The ROS2 settings of one Machine, which is the unit of one Domain ID.

The first four fields are the Runtime's constructor keywords, so a Runtime can be built from a loaded config field by field. The Machine mixin takes the whole object.

Class Method from_toml Read these settings from a TOML file; a key the file omits keeps its default.
Method __post_init__ Refuse an introspection level below the Skill level.
Instance Variable debug_goal_outcome_booleans Whether an action Skill also exposes succeeded, aborted and canceled booleans in its FinalResultData. A debugging aid, off by default: the goal outcome drives the Skill's state machine, and the booleans beside ...
Instance Variable domain_id The ROS2 Domain ID this Machine's Runtime is confined to.
Instance Variable introspection_access_level Access level the introspection mutators (BindTopic, CallService) require, on top of the Lock. Default ~opensmi.ros2.server.access.MUTATOR_ACCESS_LEVEL. All three defaults follow opensmi's default user table; a site with a different table sets its own.
Instance Variable listing_access_level Access level the introspection Component's read-only listings require. They answer without the Lock whatever this is. Default ~opensmi.ros2.server.access.LISTING_ACCESS_LEVEL.
Instance Variable namespace The ROS2 namespace for that node, or None for the root.
Instance Variable node_name The name of the single rclpy Node the Runtime owns.
Instance Variable skill_access_level Access level a Skill requires, on top of the Lock. Default ~opensmi.ros2.server.access.SKILL_ACCESS_LEVEL.
Instance Variable startup_timeout Seconds a required Binding has to become satisfied before its StartupSkill gives up on it. A declaration can override it with its own startup_timeout; a Binding that is not required has no deadline. A Machine's StartupSkill also allows each Component this much slack beyond that Component's own deadlines.
Instance Variable stop_timeout How long, in seconds, stopping waits for the executor thread.
Instance Variable transforms Where the TF Bindings read the frame network from and how often it is polled; the [transforms] table in the settings file. See TransformConfig.
@classmethod
def from_toml(cls, path: str | Path) -> ROS2Config:

Read these settings from a TOML file; a key the file omits keeps its default.

Raises
ValueErrorWhen the file carries a key this class does not declare.
DeclarationErrorWhen the access levels contradict each other.
def __post_init__(self):

Refuse an introspection level below the Skill level.

Raises
DeclarationErrorWhen introspection_access_level is below skill_access_level. A mutator changes a live robot, so it asks at least as much as starting a Skill.
debug_goal_outcome_booleans: bool =

Whether an action Skill also exposes succeeded, aborted and canceled booleans in its FinalResultData. A debugging aid, off by default: the goal outcome drives the Skill's state machine, and the booleans beside CurrentState can disagree with it.

domain_id: int =

The ROS2 Domain ID this Machine's Runtime is confined to.

introspection_access_level: int =

Access level the introspection mutators (BindTopic, CallService) require, on top of the Lock. Default ~opensmi.ros2.server.access.MUTATOR_ACCESS_LEVEL. All three defaults follow opensmi's default user table; a site with a different table sets its own.

listing_access_level: int =

Access level the introspection Component's read-only listings require. They answer without the Lock whatever this is. Default ~opensmi.ros2.server.access.LISTING_ACCESS_LEVEL.

namespace: str | None =

The ROS2 namespace for that node, or None for the root.

node_name: str =

The name of the single rclpy Node the Runtime owns.

skill_access_level: int =

Access level a Skill requires, on top of the Lock. Default ~opensmi.ros2.server.access.SKILL_ACCESS_LEVEL.

startup_timeout: float =

Seconds a required Binding has to become satisfied before its StartupSkill gives up on it. A declaration can override it with its own startup_timeout; a Binding that is not required has no deadline. A Machine's StartupSkill also allows each Component this much slack beyond that Component's own deadlines.

stop_timeout: float =

How long, in seconds, stopping waits for the executor thread.

transforms: TransformConfig =

Where the TF Bindings read the frame network from and how often it is polled; the [transforms] table in the settings file. See TransformConfig.