s6.schema.robotic¶

Robotic configuration models (stepper axes and waypoints).

These Pydantic models capture the configuration for the external stepper axes controller used by Sense Core’s robotic utilities. The schema is intended to match the structure of configs/robotic.config.json and provide attribute access, validation, and documentation for fields.

Key concepts¶

  • Each axis is configured with motor/drive parameters and an initial position in controller units.

  • Waypoints store named sets of target positions per axis.

class s6.schema.robotic.AxisParams(*, address: int, distance_per_revolution: float, step_per_revolution: int, nominal_speed: int, nominal_acceleration: int, persist: bool)

Bases: BaseModel

Parameters for initializing a motorized axis.

address

Controller/bus address for the axis.

Type:

int

distance_per_revolution

Linear travel per full motor revolution, in your mechanism’s linear units (e.g., millimetres per revolution).

Type:

float

step_per_revolution

Microsteps per motor revolution as configured on the driver.

Type:

int

nominal_speed

Nominal move speed in controller units.

Type:

int

nominal_acceleration

Nominal acceleration in controller units.

Type:

int

persist

If True, persist parameters to the controller’s storage when supported.

Type:

bool

address: int
distance_per_revolution: float
step_per_revolution: int
nominal_speed: int
nominal_acceleration: int
persist: bool
class s6.schema.robotic.AxisConfig(*, Axis: AxisParams, current_position: int)

Bases: BaseModel

Configuration for a single axis.

Axis

Motor/driver parameters and defaults for the axis.

Type:

AxisParams

current_position

Initial position in controller units (e.g., steps).

Type:

int

Axis: AxisParams
current_position: int
class s6.schema.robotic.Waypoint(*, name: str, positions: Dict[str, int])

Bases: BaseModel

Named set of axis target positions.

name

Waypoint name (used for selection in the UI/service).

Type:

str

positions

Mapping from axis name to target position in controller units.

Type:

dict[str, int]

name: str
positions: Dict[str, int]
class s6.schema.robotic.RoboticConfig(*, Axes: Dict[str, AxisConfig], waypoints: List[Waypoint] = None)

Bases: BaseModel

Root configuration for robotic stepper axes and waypoints.

Axes

Axis configurations keyed by axis name.

Type:

dict[str, AxisConfig]

waypoints

Named sets of target positions for coordinated moves.

Type:

list[Waypoint]

Axes: Dict[str, AxisConfig]
waypoints: List[Waypoint]
get_axes() Dict[str, AxisConfig]

Return the axis configurations keyed by name.

Returns:

Mapping of axis name to configuration.

Return type:

dict[str, AxisConfig]

get_waypoints() List[Waypoint]

Return the list of named waypoints.

Returns:

Configured waypoints in the order provided.

Return type:

list[Waypoint]

static load_default() RoboticConfig

Load configuration from configs/robotic.config.json.

Returns:

Parsed configuration object.

Return type:

RoboticConfig

save_default(*, indent: int = 4) None

Write configuration to configs/robotic.config.json.

Parameters:

indent (int, optional) – Indentation level for pretty‑printed JSON (default 4).