Skip to content

Actuation API reference

soromox.actuation

Actuator

Bases: Module


              flowchart TD
              soromox.actuation.Actuator[Actuator]

              

              click soromox.actuation.Actuator href "" "soromox.actuation.Actuator"
            

A transmission paired with an effort law and ordered channel metadata.

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts

efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_structure_for_robot

validate_structure_for_robot(robot: SoftRobot) -> None

Validate tracer-safe component compatibility with robot.

validate_values_for_robot

validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

ActuatorMetadata

ActuatorMetadata(*, labels: tuple[str, ...], units: str | tuple[str, ...], kind: ActuatorKind = 'generic', lower_bounds: Array | None = None, upper_bounds: Array | None = None)

Bases: Module


              flowchart TD
              soromox.actuation.ActuatorMetadata[ActuatorMetadata]

              

              click soromox.actuation.ActuatorMetadata href "" "soromox.actuation.ActuatorMetadata"
            

Ordered labels, units, limits, and semantics for input channels.

DirectEffort

Bases: EffortModel


              flowchart TD
              soromox.actuation.DirectEffort[DirectEffort]
              soromox.actuation.core.EffortModel[EffortModel]

                              soromox.actuation.core.EffortModel --> soromox.actuation.DirectEffort
                


              click soromox.actuation.DirectEffort href "" "soromox.actuation.DirectEffort"
              click soromox.actuation.core.EffortModel href "" "soromox.actuation.core.EffortModel"
            

Stateless effort model for which effort is exactly the user control.

EffortModel

Bases: Module


              flowchart TD
              soromox.actuation.EffortModel[EffortModel]

              

              click soromox.actuation.EffortModel href "" "soromox.actuation.EffortModel"
            

Map controls to efforts work-conjugate to transmission coordinates.

effort abstractmethod

effort(control: Array, coordinate: Array | None, velocity: Array | None) -> Array

Return actuator effort for the current control and transmission state.

IdentityActuator

IdentityActuator(num_channels: int)

Bases: Actuator


              flowchart TD
              soromox.actuation.IdentityActuator[IdentityActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.IdentityActuator
                


              click soromox.actuation.IdentityActuator href "" "soromox.actuation.IdentityActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Direct generalized-coordinate actuation used by default.

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts

efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_values_for_robot

validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

IdentityActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.IdentityActuatorParams[IdentityActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.IdentityActuatorParams
                


              click soromox.actuation.IdentityActuatorParams href "" "soromox.actuation.IdentityActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Empty immutable parameter object for identity actuation.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure

validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values

validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

IdentityTransmission

IdentityTransmission(num_channels: int)

Bases: Transmission


              flowchart TD
              soromox.actuation.IdentityTransmission[IdentityTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.IdentityTransmission
                


              click soromox.actuation.IdentityTransmission href "" "soromox.actuation.IdentityTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Identity generalized-coordinate transmission.

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

coordinate_jacobian

coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the identity coordinate Jacobian.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Identity map from generalized to actuator-coordinate velocities with shape (self.num_channels, self.num_channels).

actuation_matrix

actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the identity effort-to-generalized-force map.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Identity actuation matrix with shape (self.num_channels, self.num_channels).

PassiveElement

Bases: Module


              flowchart TD
              soromox.actuation.PassiveElement[PassiveElement]

              

              click soromox.actuation.PassiveElement href "" "soromox.actuation.PassiveElement"
            

Independent passive contribution to robot mechanics.

validate_structure_for_robot

validate_structure_for_robot(robot: SoftRobot) -> None

Validate tracer-safe component compatibility with robot.

validate_values_for_robot

validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

passive_force

passive_force(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this element's elastic and damping effort.

Parameters:

Name Type Description Default
robot SoftRobot

Robot on which the passive element is installed.

required
q Array

Configuration, shape (robot.num_coordinates,).

required
qd Array

Generalized velocity, shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Required passive effort, shape (robot.num_velocities,). Its

Array

negative is the force applied by the element to the robot.

Transmission

Bases: Module


              flowchart TD
              soromox.actuation.Transmission[Transmission]

              

              click soromox.actuation.Transmission href "" "soromox.actuation.Transmission"
            

Map robot configuration to work-conjugate actuator coordinates.

num_channels abstractmethod property

num_channels: int

Number of scalar transmission coordinates.

coordinates abstractmethod

coordinates(robot: SoftRobot, q: Array) -> Array

Return transmission coordinates y_a(q).

coordinate_jacobian abstractmethod

coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the transmission-coordinate Jacobian.

The Jacobian J_a(q) maps generalized velocity to transmission- coordinate velocity as yd_a = J_a(q) @ qd.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

actuation_matrix abstractmethod

actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the effort-to-generalized-force map.

The actuation matrix A(q) maps transmission efforts to generalized force as tau_u = A(q) @ effort.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

BaseThreadlikeFrictionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.BaseThreadlikeFrictionParams[BaseThreadlikeFrictionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.BaseThreadlikeFrictionParams
                


              click soromox.actuation.BaseThreadlikeFrictionParams href "" "soromox.actuation.BaseThreadlikeFrictionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Base PyTree contract for threadlike friction parameters.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure

validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values

validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_structure_compatibility

validate_structure_compatibility(num_paths: int) -> None

Validate parameter shapes against the number of routed paths.

Parameters:

Name Type Description Default
num_paths int

Number of paths in the routing family.

required

CapstanFrictionParams

Bases: BaseThreadlikeFrictionParams


              flowchart TD
              soromox.actuation.CapstanFrictionParams[CapstanFrictionParams]
              soromox.actuation.friction.BaseThreadlikeFrictionParams[BaseThreadlikeFrictionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.actuation.friction.BaseThreadlikeFrictionParams --> soromox.actuation.CapstanFrictionParams
                                soromox.systems.params.BaseSystemParams --> soromox.actuation.friction.BaseThreadlikeFrictionParams
                



              click soromox.actuation.CapstanFrictionParams href "" "soromox.actuation.CapstanFrictionParams"
              click soromox.actuation.friction.BaseThreadlikeFrictionParams href "" "soromox.actuation.friction.BaseThreadlikeFrictionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Coulomb coefficient of the continuum Capstan model.

Attributes:

Name Type Description
coefficient Array

Nonnegative friction coefficient, either scalar or one value per routed path.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure

validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__

__check_init__() -> None

Validate newly constructed Capstan parameters.

validate_structure_compatibility

validate_structure_compatibility(num_paths: int) -> None

Validate the coefficient shape against the path count.

Parameters:

Name Type Description Default
num_paths int

Number of paths in the routing family.

required

validate_values

validate_values() -> None

Validate concrete Capstan coefficient values.

FrictionlessParams

Bases: BaseThreadlikeFrictionParams


              flowchart TD
              soromox.actuation.FrictionlessParams[FrictionlessParams]
              soromox.actuation.friction.BaseThreadlikeFrictionParams[BaseThreadlikeFrictionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.actuation.friction.BaseThreadlikeFrictionParams --> soromox.actuation.FrictionlessParams
                                soromox.systems.params.BaseSystemParams --> soromox.actuation.friction.BaseThreadlikeFrictionParams
                



              click soromox.actuation.FrictionlessParams href "" "soromox.actuation.FrictionlessParams"
              click soromox.actuation.friction.BaseThreadlikeFrictionParams href "" "soromox.actuation.friction.BaseThreadlikeFrictionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Parameter-free ideal threadlike transmission.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure

validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values

validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(num_paths: int) -> None

Validate parameter shapes against the number of routed paths.

Parameters:

Name Type Description Default
num_paths int

Number of paths in the routing family.

required

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ThreadlikeFriction

Bases: Module


              flowchart TD
              soromox.actuation.ThreadlikeFriction[ThreadlikeFriction]

              

              click soromox.actuation.ThreadlikeFriction href "" "soromox.actuation.ThreadlikeFriction"
            

Runtime effort-loss law for a routed-path family.

The effort supplied by the actuator is defined at each path anchor. The model returns the fraction that remains after the path has accumulated a given unsigned turn while moving along increasing backbone abscissa.

Attributes:

Name Type Description
params BaseThreadlikeFrictionParams

Dynamic friction parameters.

effort_ratio_fn Callable

Function of (params, accumulated_turn).

is_frictionless bool

Whether the ratio is identically one.

__check_init__

__check_init__() -> None

Validate consistency between the law and frictionless marker.

frictionless classmethod

frictionless() -> ThreadlikeFriction

Construct the ideal threadlike transmission.

capstan classmethod

capstan(*, coefficient: Any = 0.0) -> ThreadlikeFriction

Construct the continuum Capstan effort-loss model.

Parameters:

Name Type Description Default
coefficient Any

Nonnegative scalar or one value per routed path.

0.0

Returns:

Type Description
ThreadlikeFriction

A Capstan friction model.

effort_ratio

effort_ratio(accumulated_turn: Array) -> Array

Return the surviving effort fraction after accumulated turn.

Parameters:

Name Type Description Default
accumulated_turn Array

Unsigned turn from each path anchor in radians.

required

Returns:

Type Description
Array

One effort ratio per routed path.

with_params

Return a copy carrying replacement friction parameters.

Parameters:

Name Type Description Default
params BaseThreadlikeFrictionParams

Replacement parameters of the installed model type.

required

Returns:

Type Description
ThreadlikeFriction

A friction model with updated dynamic leaves.

Raises:

Type Description
TypeError

If the parameter type changes.

update_params

update_params(**updates: Any) -> ThreadlikeFriction

Return a copy with replaced friction-parameter leaves.

Parameters:

Name Type Description Default
**updates Any

Named parameter-leaf replacements.

{}

Returns:

Type Description
ThreadlikeFriction

A friction model with updated parameter leaves.

AffineGeneralizedCoordinateActuator

AffineGeneralizedCoordinateActuator(*, params: AffineGeneralizedCoordinateActuatorParams, labels: tuple[str, ...] | None = None, units: str | tuple[str, ...] = 'generalized effort', name: str = 'affine_generalized_coordinate_actuator')

Bases: Actuator


              flowchart TD
              soromox.actuation.AffineGeneralizedCoordinateActuator[AffineGeneralizedCoordinateActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.AffineGeneralizedCoordinateActuator
                


              click soromox.actuation.AffineGeneralizedCoordinateActuator href "" "soromox.actuation.AffineGeneralizedCoordinateActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Apply signed controls through a constant affine coordinate map.

The actuator combines :class:AffineGeneralizedCoordinateTransmission with :class:DirectEffort. For a routing matrix R, reference configuration q_ref, and coordinate offset y_a0, its work-conjugate actuator coordinates and velocities are

y_a = R @ (q - q_ref) + y_a0 and yd_a = R @ qd.

A user control is interpreted directly as the signed effort conjugate to y_a. The generalized force is therefore tau = R.T @ control and satisfies the power identity qd.T @ tau = yd_a.T @ control. This makes the class suitable for direct joint torques, prismatic forces, selected generalized-coordinate efforts, or fixed linear combinations of them. It imposes no tendon-specific positivity, serial-routing, or host restrictions.

Input bounds are exposed through :attr:metadata for downstream consumers. They are intentionally not enforced inside :meth:efforts; controls outside those bounds still produce the corresponding linear generalized force.

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts

efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_values_for_robot

validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

from_routing classmethod

from_routing(routing_matrix: Array, *, reference_configuration: Array | None = None, coordinate_offset: Array | float = 0.0, lower_bounds: Array | float | None = None, upper_bounds: Array | float | None = None, labels: tuple[str, ...] | None = None, units: str | tuple[str, ...] = 'generalized effort', name: str = 'affine_generalized_coordinate_actuator') -> AffineGeneralizedCoordinateActuator

Construct signed direct actuation from an affine routing matrix.

Bounds are exposed through :class:ActuatorMetadata and are not enforced by clipping. Omitting either bound makes it infinite.

AffineGeneralizedCoordinateActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.AffineGeneralizedCoordinateActuatorParams[AffineGeneralizedCoordinateActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.AffineGeneralizedCoordinateActuatorParams
                


              click soromox.actuation.AffineGeneralizedCoordinateActuatorParams href "" "soromox.actuation.AffineGeneralizedCoordinateActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Parameters for signed direct effort through an affine coordinate map.

transmission defines actuator work coordinates y_a = R @ (q - q_ref) + y_a0. The corresponding moment matrix is A = R.T. lower_bounds and upper_bounds are ordered channel metadata for controllers, trajectory optimization, and user interfaces; they do not modify or clip controls passed to the actuator.

Attributes:

Name Type Description
transmission AffineGeneralizedCoordinateTransmissionParams

Affine generalized-coordinate transmission with one row per actuator channel and one column per robot coordinate.

lower_bounds Array

Descriptive lower control bound for every channel.

upper_bounds Array

Descriptive upper control bound for every channel.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

AffineGeneralizedCoordinateTransmission

AffineGeneralizedCoordinateTransmission(params: AffineGeneralizedCoordinateTransmissionParams)

Bases: Transmission


              flowchart TD
              soromox.actuation.AffineGeneralizedCoordinateTransmission[AffineGeneralizedCoordinateTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.AffineGeneralizedCoordinateTransmission
                


              click soromox.actuation.AffineGeneralizedCoordinateTransmission href "" "soromox.actuation.AffineGeneralizedCoordinateTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Affine actuator coordinates R @ (q - q_ref) + y_a0.

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

coordinate_jacobian

coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the constant actuator-coordinate Jacobian.

Parameters:

Name Type Description Default
robot SoftRobot

Robot hosting the generalized-coordinate transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Matrix mapping generalized velocities to actuator-coordinate velocities, with shape (self.num_channels, robot.num_velocities).

actuation_matrix

actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the ideal effort-to-generalized-force map.

Parameters:

Name Type Description Default
robot SoftRobot

Robot hosting the generalized-coordinate transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

AffineGeneralizedCoordinateTransmissionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.AffineGeneralizedCoordinateTransmissionParams[AffineGeneralizedCoordinateTransmissionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.AffineGeneralizedCoordinateTransmissionParams
                


              click soromox.actuation.AffineGeneralizedCoordinateTransmissionParams href "" "soromox.actuation.AffineGeneralizedCoordinateTransmissionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Parameters for an affine mapping to actuator coordinates.

Attributes:

Name Type Description
routing_matrix Array

Matrix R with shape (num_channels, num_dofs). Each row is the derivative of one actuator coordinate with respect to the generalized coordinates.

reference_configuration Array

Generalized configuration q_ref at which the affine displacement term is zero.

coordinate_offset Array

Per-channel actuator coordinate y_a0 at q_ref, in the same units as the actuator coordinate. Thus y_a(q_ref) = y_a0 and the differential map is dy_a/dq = R. For passive tendon impedance, y_a0 specifies the deformation and corresponding preload at q_ref.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_values

validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ArticulatedTendonActuator

ArticulatedTendonActuator(*, params: ArticulatedTendonActuatorParams, labels: tuple[str, ...] | None = None, name: str = 'articulated_tendons')

Bases: Actuator


              flowchart TD
              soromox.actuation.ArticulatedTendonActuator[ArticulatedTendonActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.ArticulatedTendonActuator
                


              click soromox.actuation.ArticulatedTendonActuator href "" "soromox.actuation.ArticulatedTendonActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Positive-tension actuation through fixed signed joint routing.

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts

efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

from_routing classmethod

from_routing(routing_matrix: Array, *, reference_configuration: Array | None = None, coordinate_offset: Array | float = 0.0, lower_bounds: Array | float = 0.0, upper_bounds: Array | float = inf, labels: tuple[str, ...] | None = None, name: str = 'articulated_tendons') -> ArticulatedTendonActuator

Construct direct-tension actuation from signed joint routing.

The resulting actuator coordinate is routing_matrix @ (q - reference_configuration) + coordinate_offset. Each routing row is the signed contraction Jacobian of one tendon.

Parameters:

Name Type Description Default
routing_matrix Array

Signed tendon routing with one row per tendon and one column per generalized coordinate.

required
reference_configuration Array | None

Configuration q_ref used as the origin of the routing displacement. Defaults to zero.

None
coordinate_offset Array | float

Actuator coordinate y_a0 at q_ref, as a scalar shared by all tendons or one value per tendon. Under DirectEffort, the generalized force is R.T @ control.

0.0
lower_bounds Array | float

Lower tension bounds, shared or per tendon.

0.0
upper_bounds Array | float

Upper tension bounds, shared or per tendon.

inf
labels tuple[str, ...] | None

Optional input label for each tendon.

None
name str

Component name used for identification and rendering.

'articulated_tendons'

Returns:

Type Description
ArticulatedTendonActuator

An articulated tendon actuator with direct tension effort.

ArticulatedTendonActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ArticulatedTendonActuatorParams[ArticulatedTendonActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ArticulatedTendonActuatorParams
                


              click soromox.actuation.ArticulatedTendonActuatorParams href "" "soromox.actuation.ArticulatedTendonActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Physical parameters for direct-effort articulated tendons.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ArticulatedTendonImpedance

ArticulatedTendonImpedance(*, params: ArticulatedTendonImpedanceParams, name: str = 'passive_articulated_tendons')

Bases: PassiveElement


              flowchart TD
              soromox.actuation.ArticulatedTendonImpedance[ArticulatedTendonImpedance]
              soromox.actuation.core.PassiveElement[PassiveElement]

                              soromox.actuation.core.PassiveElement --> soromox.actuation.ArticulatedTendonImpedance
                


              click soromox.actuation.ArticulatedTendonImpedance href "" "soromox.actuation.ArticulatedTendonImpedance"
              click soromox.actuation.core.PassiveElement href "" "soromox.actuation.core.PassiveElement"
            

Passive spring-damper mechanics in affine tendon coordinates.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

passive_force

passive_force(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this element's elastic and damping effort.

Parameters:

Name Type Description Default
robot SoftRobot

Robot on which the passive element is installed.

required
q Array

Configuration, shape (robot.num_coordinates,).

required
qd Array

Generalized velocity, shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Required passive effort, shape (robot.num_velocities,). Its

Array

negative is the force applied by the element to the robot.

from_routing classmethod

from_routing(routing_matrix: Array, *, stiffness: Array, damping: Array, reference_configuration: Array | None = None, coordinate_offset: Array | float = 0.0, name: str = 'passive_articulated_tendons') -> ArticulatedTendonImpedance

Construct passive spring-damper mechanics in tendon coordinates.

Parameters:

Name Type Description Default
routing_matrix Array

Signed tendon routing with one row per passive tendon and one column per generalized coordinate.

required
stiffness Array

Actuator-space stiffness, one value per tendon.

required
damping Array

Actuator-space damping, one value per tendon.

required
reference_configuration Array | None

Configuration q_ref used as the origin of the routing displacement. Defaults to zero.

None
coordinate_offset Array | float

Tendon deformation y_a0 at q_ref, as a scalar shared by all tendons or one value per tendon. Zero makes q_ref unstrained; a nonzero value creates elastic preload R.T @ (stiffness * y_a0).

0.0
name str

Component name used for identification and rendering.

'passive_articulated_tendons'

Returns:

Type Description
ArticulatedTendonImpedance

A passive articulated tendon impedance component.

elastic_force

elastic_force(robot, q: Array) -> Array

Return generalized elastic force from the routed joint tendons.

damping_matrix

damping_matrix(robot, q: Array) -> Array

Return generalized viscous damping from the routed joint tendons.

ArticulatedTendonImpedanceParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ArticulatedTendonImpedanceParams[ArticulatedTendonImpedanceParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ArticulatedTendonImpedanceParams
                


              click soromox.actuation.ArticulatedTendonImpedanceParams href "" "soromox.actuation.ArticulatedTendonImpedanceParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Spring-damper parameters for articulated tendon coordinates.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ArticulatedMcKibbenActuator

ArticulatedMcKibbenActuator(*, params: ArticulatedMcKibbenActuatorParams, labels: tuple[str, ...] | None = None, name: str = 'mckibben_muscles')

Bases: Actuator


              flowchart TD
              soromox.actuation.ArticulatedMcKibbenActuator[ArticulatedMcKibbenActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.ArticulatedMcKibbenActuator
                


              click soromox.actuation.ArticulatedMcKibbenActuator href "" "soromox.actuation.ArticulatedMcKibbenActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Direct-pressure McKibben muscle actuator.

Controls are pressures in pascals. The transmission supplies equivalent volume coordinates, while diagnostic helpers expose effective lengths, endpoint segments, and signed axial forces. Installation requires a spatial articulated robot implementing the kinematic-frame contract; continuum hosts must use an appropriate continuum transmission instead.

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts

efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

empty classmethod

empty(actuators_per_group: int = 4) -> ArticulatedMcKibbenActuator

Construct a zero-channel actuator with fixed empty group topology.

ArticulatedMcKibbenActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ArticulatedMcKibbenActuatorParams[ArticulatedMcKibbenActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ArticulatedMcKibbenActuatorParams
                


              click soromox.actuation.ArticulatedMcKibbenActuatorParams href "" "soromox.actuation.ArticulatedMcKibbenActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

McKibben transmission and pressure bounds.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_structure

validate_structure() -> None

Validate McKibben actuator parameter structure.

validate_values

validate_values() -> None

Validate eager nested McKibben transmission values.

ArticulatedMcKibbenTransmission

ArticulatedMcKibbenTransmission(params: ArticulatedMcKibbenTransmissionParams)

Bases: Transmission


              flowchart TD
              soromox.actuation.ArticulatedMcKibbenTransmission[ArticulatedMcKibbenTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.ArticulatedMcKibbenTransmission
                


              click soromox.actuation.ArticulatedMcKibbenTransmission href "" "soromox.actuation.ArticulatedMcKibbenTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Pressure-work transmission using McKibben volume coordinates.

The transmission owns fixed and moving attachment geometry for grouped universal joints on a spatial articulated host. It computes effective muscle lengths, the volume-like coordinate work-conjugate to pressure, its analytic actuation matrix, and renderer-facing endpoint segments without embedding those mechanics in a particular articulated robot class.

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

local_segments

local_segments(q: Array) -> Array

Return group-local fixed/moving endpoint segments.

Returns:

Type Description
Array

Array with shape (num_groups, actuators_per_group, 2, 3).

Array

Endpoint axis 2 is ordered as [fixed, moving].

segments

segments(robot, q: Array) -> Array

Return world-space actuator endpoint segments for rendering.

Returns:

Type Description
Array

Array with shape (num_channels, 2, 3) whose endpoint axis is

Array

ordered as [fixed, moving].

effective_lengths

effective_lengths(q: Array) -> Array

Return effective McKibben muscle lengths.

For actuator i, the effective length is its current geometric endpoint distance minus reference_length[i] plus length_offset[i].

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return pressure-work coordinates for all McKibben muscles.

The coordinate is (B**2 - length**2) * length / (4*pi*N**2) and has volume units, making pressure its work-conjugate effort.

coordinate_jacobian

coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the pressure-work coordinate Jacobian.

The Jacobian maps generalized velocity to the rates of the volume-like coordinates work-conjugate to pressure.

Parameters:

Name Type Description Default
robot SoftRobot

Articulated robot hosting the transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

actuation_matrix

actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the analytical pressure-to-generalized-force matrix.

Parameters:

Name Type Description Default
robot SoftRobot

Articulated robot hosting the transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

axial_forces

axial_forces(q: Array, pressures: Array) -> Array

Return per-muscle axial forces for the supplied pressures.

The sign convention and constitutive equation match the cached UMArm model and its MuJoCo implementation.

ArticulatedMcKibbenTransmissionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ArticulatedMcKibbenTransmissionParams[ArticulatedMcKibbenTransmissionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ArticulatedMcKibbenTransmissionParams
                


              click soromox.actuation.ArticulatedMcKibbenTransmissionParams href "" "soromox.actuation.ArticulatedMcKibbenTransmissionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Attachment geometry and constitutive parameters for McKibben groups.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_values

validate_values() -> None

Validate eager McKibben topology values.

from_cached_npz classmethod

from_cached_npz(path: str | Path) -> ArticulatedMcKibbenTransmissionParams

Load McKibben transmission fields from an existing UMArm cache.

BaseThreadlikeRouting

Bases: Module


              flowchart TD
              soromox.actuation.BaseThreadlikeRouting[BaseThreadlikeRouting]

              

              click soromox.actuation.BaseThreadlikeRouting href "" "soromox.actuation.BaseThreadlikeRouting"
            

Supply physical path geometry independently of actuator sign and scale.

Transmissions delegate to this contract rather than robot-specific hooks. Path lengths are in metres. Velocity Jacobians include zero floating-base columns for internal paths. Each strategy retains its geometry, solver settings, and parameter type.

Attributes:

Name Type Description
params BaseSystemParams

Numerical geometry and static topology of the routing strategy.

num_paths abstractmethod property

num_paths: int

Return the number of physical filaments in the routing family.

Returns:

Type Description
int

Number of paths, each corresponding to one actuator channel.

path_lengths abstractmethod

path_lengths(robot: SoftRobot, q: Array) -> Array

Evaluate the physical length of every routed path.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the strategy's required kinematics.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Physical lengths in metres with shape (self.num_paths,), before

Array

applying actuator coordinate signs or scales.

path_velocity_jacobian abstractmethod

path_velocity_jacobian(robot: SoftRobot, q: Array) -> Array

Map generalized velocities to physical path-length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the strategy's required kinematics.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Jacobian with shape (self.num_paths, robot.num_velocities).

Array

Multiplication by generalized velocity gives length rates in metres

Array

per second. Internal paths have zero floating-base columns.

path_positions abstractmethod

path_positions(robot: SoftRobot, q: Array, s: Array) -> Array

Sample each path at a reference backbone station.

Guided strategies parameterize each span by its backbone interval. At a moving joint, the station selects the upstream guide; use the strategy's span sampling API to represent both guides and their cable connection explicitly.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host defining world-frame path positions.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
s Array

Scalar reference backbone station in metres, clamped to each path's endpoints.

required

Returns:

Type Description
Array

World positions in metres with shape (self.num_paths, 2) for

Array

planar hosts or (self.num_paths, 3) for spatial hosts.

validate_friction

validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix

path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

with_params abstractmethod

with_params(params: BaseSystemParams) -> BaseThreadlikeRouting

Replace numerical geometry while preserving topology and settings.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement parameters of the strategy's existing type, with the same path count and connectivity.

required

Returns:

Type Description
BaseThreadlikeRouting

Routing with updated parameter leaves and preserved runtime

BaseThreadlikeRouting

callbacks, discretization, and solver settings where applicable.

Raises:

Type Description
TypeError

The replacement parameter type is incompatible.

ValueError

Parameters are invalid or change routing topology.

update_params

update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot abstractmethod

validate_structure_for_robot(robot: SoftRobot) -> None

Check host compatibility without reading traced parameter values.

Parameters:

Name Type Description Default
robot SoftRobot

Host whose kinematic interface and segment topology must support this routing strategy.

required

Raises:

Type Description
TypeError

The host lacks a required interface.

ValueError

Routing shapes or connectivity are incompatible with the host.

validate_values_for_robot abstractmethod

validate_values_for_robot(robot: SoftRobot) -> None

Check concrete routing geometry against the host.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying physical geometry. Call this check with concrete numerical values, after structure validation.

required

Raises:

Type Description
ValueError

Numerical geometry violates a strategy or host restriction, such as nonplanar offsets on a planar robot.

BaseThreadlikeRoutingParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.BaseThreadlikeRoutingParams[BaseThreadlikeRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.BaseThreadlikeRoutingParams
                


              click soromox.actuation.BaseThreadlikeRoutingParams href "" "soromox.actuation.BaseThreadlikeRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Base PyTree contract for vectorized threadlike routing parameters.

num_paths property

num_paths: int

Return the number of routed paths represented by the parameters.

start_segment_index_array property

start_segment_index_array: Array

Return the first active segment of every routed path.

Returns:

Type Description
Array

Start indices with shape (self.num_paths,).

end_segment_index_array property

end_segment_index_array: Array

Return the last active segment of every routed path.

Returns:

Type Description
Array

End indices with shape (self.num_paths,).

validate_structure

validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values

validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_structure_for_robot

validate_structure_for_robot(num_segments: int) -> None

Validate path spans against a host robot's segment count.

Parameters:

Name Type Description Default
num_segments int

Number of continuum body segments in the host robot.

required

Raises:

Type Description
ValueError

If a path span falls outside the host robot or its start index follows its end index.

assert_same_topology

assert_same_topology(other: BaseThreadlikeRoutingParams) -> None

Reject a replacement that changes routing type, count, or spans.

Parameters:

Name Type Description Default
other BaseThreadlikeRoutingParams

Candidate replacement routing parameters.

required

Raises:

Type Description
ValueError

If other changes the parameter type, number of paths, or segment spans.

replace

replace(**updates: Any) -> BaseThreadlikeRoutingParams

Replace numeric fields while keeping routing topology immutable.

CircularLumenParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.CircularLumenParams[CircularLumenParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.CircularLumenParams
                


              click soromox.actuation.CircularLumenParams href "" "soromox.actuation.CircularLumenParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Circular hollow interiors available to the routed filament.

The lumen is the empty passage inside a hollow section, bounded by its inner wall. It is centered on the backbone in every material cross section.

Attributes:

Name Type Description
inner_radius Array

Positive inner radii in metres, shape (num_segments,). Radii are constant within each segment and exclude the wall thickness.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__

__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

constant classmethod

constant(radius, num_segments: int)

Broadcast one radius to an explicitly sized segment array.

Parameters:

Name Type Description Default
radius float | Array

Positive inner radius in metres.

required
num_segments int

Number of host segments to receive the radius.

required

Returns:

Name Type Description
result CircularLumenParams

CircularLumenParams with radius array shaped (num_segments,).

validate_structure

validate_structure()

Validate parameter shapes and connectivity.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values

validate_values()

Validate concrete parameter values.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

ConfigurationDependentThreadlikeRouting

Bases: BaseThreadlikeRouting


              flowchart TD
              soromox.actuation.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.ConfigurationDependentThreadlikeRouting
                


              click soromox.actuation.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Interface for configuration-dependent filament routing.

A path represents one physical filament; a span is a portion between prescribed guides. Strategies return resolved geometry; optimizers also return their state explicitly for warm starts.

Attributes:

Name Type Description
params BaseSystemParams

Strategy parameters containing numerical geometry and static topology.

spans RoutingSpanParams

Shared guide geometry and mapping of spans to physical paths.

num_paths property

num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

spans abstractmethod property

Return shared endpoints and connectivity.

Returns:

Name Type Description
result RoutingSpanParams

RoutingSpanParams containing guide offsets and span-to-path connectivity.

validate_friction

validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix

path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

update_params

update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

path_lengths

path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_length_jacobian abstractmethod

path_length_jacobian(robot, configuration, solution=None)

Evaluate the analytical length derivative at a resolved route.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying guide and material kinematics.

required
configuration Array

Host configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution for this routing and configuration; omission resolves the route once.

None

Returns:

Name Type Description
result Array

Length Jacobian, shape (num_paths, num_coordinates).

path_velocity_jacobian

path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions

path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

span_positions abstractmethod

span_positions(robot, configuration, solution, span_index, fractions)

Sample a resolved span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying forward kinematics.

required
configuration Array

Host configuration, shape (num_coordinates,).

required
solution RoutingSolution

Solution at this configuration.

required
span_index int

Static span index.

required
fractions Array

One-dimensional sample fractions in [0, 1].

required

Returns:

Name Type Description
result Array

World positions, shape (num_samples, 3), in metres. Fractions parameterize the backbone interval for optimized routes and the straight line for straight spans.

with_params

with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

validate_structure_for_robot

validate_structure_for_robot(robot) -> None

Validate segment bounds and prescribed guides at moving joints.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with static segment topology.

required

Raises:

Type Description
ValueError

Span connectivity is incompatible with the host.

validate_values_for_robot

validate_values_for_robot(robot) -> None

Validate guide geometry and positive finite segment lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with material frame conventions.

required

Raises:

Type Description
ValueError

Host lengths or guide offsets are invalid.

solve_routing abstractmethod

solve_routing(robot, configuration, *, initial_guess=None) -> RoutingSolution

Resolve all physical paths for a robot configuration.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required
configuration Array

Generalized configuration, shape (robot.num_coordinates,).

required
initial_guess RoutingSolution | None

Previous RoutingSolution with matching span topology, or None.

None

Returns:

Name Type Description
result RoutingSolution

RoutingSolution with resolved spans, guide connections, and total path lengths.

LinearThreadlikeRoutingParams

Bases: BaseThreadlikeRoutingParams


              flowchart TD
              soromox.actuation.LinearThreadlikeRoutingParams[LinearThreadlikeRoutingParams]
              soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams[BaseThreadlikeRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams --> soromox.actuation.LinearThreadlikeRoutingParams
                                soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams
                



              click soromox.actuation.LinearThreadlikeRoutingParams href "" "soromox.actuation.LinearThreadlikeRoutingParams"
              click soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams href "" "soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Batched linear material-frame routing and contiguous segment spans.

intercept and slope have shape (num_paths, 3) in the local material frame. Because SoRoMoX aligns the backbone with the local x-axis, their x-components must be zero; the remaining components describe the path within each material-frame cross-section.

start_segment_index_array property

start_segment_index_array: Array

Return the first active segment of every routed path.

Returns:

Type Description
Array

Start indices with shape (self.num_paths,).

end_segment_index_array property

end_segment_index_array: Array

Return the last active segment of every routed path.

Returns:

Type Description
Array

End indices with shape (self.num_paths,).

num_paths property

num_paths: int

Return the number of linear paths.

replace

replace(**updates: Any) -> BaseThreadlikeRoutingParams

Replace numeric fields while keeping routing topology immutable.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_structure_for_robot

validate_structure_for_robot(num_segments: int) -> None

Validate path spans against a host robot's segment count.

Parameters:

Name Type Description Default
num_segments int

Number of continuum body segments in the host robot.

required

Raises:

Type Description
ValueError

If a path span falls outside the host robot or its start index follows its end index.

assert_same_topology

assert_same_topology(other: BaseThreadlikeRoutingParams) -> None

Reject a replacement that changes routing type, count, or spans.

Parameters:

Name Type Description Default
other BaseThreadlikeRoutingParams

Candidate replacement routing parameters.

required

Raises:

Type Description
ValueError

If other changes the parameter type, number of paths, or segment spans.

__check_init__

__check_init__() -> None

Validate newly constructed linear-routing parameters.

empty classmethod

Construct an empty linear-routing parameter batch.

validate_structure

validate_structure() -> None

Validate linear-routing array shapes and segment-span topology.

validate_values

validate_values() -> None

Validate eager linear-routing values.

PiecewiseLinearRoutingDiscretization

Bases: Module


              flowchart TD
              soromox.actuation.PiecewiseLinearRoutingDiscretization[PiecewiseLinearRoutingDiscretization]

              

              click soromox.actuation.PiecewiseLinearRoutingDiscretization href "" "soromox.actuation.PiecewiseLinearRoutingDiscretization"
            

Piecewise linear slope basis, independent of the host strain basis.

Nodal values describe transverse offset derivatives along the backbone. Integrating this basis gives piecewise quadratic offsets.

Attributes:

Name Type Description
elements_per_segment int

Number of uniform slope elements in each segment.

quadrature_order int

Gauss points per element for length integration.

constraint_samples_per_element int

Gauss points per element for wall constraints.

validation_samples_per_element int

Uniform checking intervals per element; both endpoints are included, giving one more point than intervals.

__check_init__

__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

RoutingGuideSolution

Bases: Module


              flowchart TD
              soromox.actuation.RoutingGuideSolution[RoutingGuideSolution]

              

              click soromox.actuation.RoutingGuideSolution href "" "soromox.actuation.RoutingGuideSolution"
            

Straight connection between prescribed guides on adjacent spans.

Attributes:

Name Type Description
downstream_span int

Index of the span entered after this connection.

length Array

Cable length in metres, including separation due to joint motion.

displacement Array

Downstream guide minus upstream guide in the upstream material frame, shape (3,).

differentiable Array

Whether the connection has a configuration derivative. Always coincident guides have zero length and derivative. A moving connection collapsing to zero length has an undefined derivative.

RoutingSolution

Bases: Module


              flowchart TD
              soromox.actuation.RoutingSolution[RoutingSolution]

              

              click soromox.actuation.RoutingSolution href "" "soromox.actuation.RoutingSolution"
            

Solved spans and connecting guides, grouped into physical filament paths.

Attributes:

Name Type Description
spans tuple[RoutingSpanSolution | StraightSpanSolution, ...]

Resolved portions between prescribed guides, in input span order.

path_lengths Array

Total lengths in metres, shape (num_paths,), including straight connections between adjacent spans of the same path.

guides tuple[RoutingGuideSolution, ...]

Straight connections in downstream span order. An empty tuple means every physical path consists of a single span.

length_jacobian Array | None

Optional cached path derivatives in configuration coordinates, including connecting guides. Straight routing supplies this during its shared geometry evaluation.

converged property

converged

Check the independent convergence diagnostics.

Returns:

Name Type Description
result Array

Scalar boolean indicating that every span satisfies the solve and physical clearance checks and guide lengths are finite.

RoutingSolverOptions

Bases: Module


              flowchart TD
              soromox.actuation.RoutingSolverOptions[RoutingSolverOptions]

              

              click soromox.actuation.RoutingSolverOptions href "" "soromox.actuation.RoutingSolverOptions"
            

Separate numerical termination, physical feasibility, and sensitivity checks.

Attributes:

Name Type Description
max_steps int

Positive upper bound on SLSQP iterations.

tolerance float

Dimensionless SLSQP termination tolerance.

endpoint_tolerance float

Maximum endpoint position residual in metres.

wall_tolerance float

Maximum radial wall penetration in metres, also applied to the continuous-span clearance bound by the routing strategy.

optimality_tolerance float

Maximum normalized stationarity residual for forward routing and its analytical envelope force evaluation.

complementarity_tolerance float

Maximum normalized multiplier/residual product.

dual_tolerance float

Maximum allowed negative wall multiplier magnitude.

sensitivity_tolerance float

Stricter normalized KKT residual limit for derivatives through the optimized coefficients. Forward acceptance alone does not certify these derivatives.

active_tolerance float

Wall residual threshold used to identify active constraints; also the strict complementarity margin for derivatives.

regularization float

Positive diagonal addition to the primal KKT Hessian during sensitivity solves, after checking the original matrix rank.

__check_init__

__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

RoutingSpanParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.RoutingSpanParams[RoutingSpanParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.RoutingSpanParams
                


              click soromox.actuation.RoutingSpanParams href "" "soromox.actuation.RoutingSpanParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Shared endpoints and topology, with one row per guided span.

Offsets have shape (num_spans, 3) in metres and local [0, y, z] order. A path is one physical filament, associated with one actuator channel. A span is the portion between prescribed guides inside one or more continuous sections. Segment indices are inclusive. Spans of each path must be ordered and contiguous; a numerical segment boundary inside a span does not add a guide. Adjacent spans are connected by a straight cable between their prescribed exit and entry guides.

Parameters live alongside their routing strategy, following the existing threadlike actuation API. This shared class also serves other strategies.

Attributes:

Name Type Description
start_offset Array

Entry guide offsets, shape (num_spans, 3), in metres in each entry segment's material frame. Longitudinal entries are zero.

end_offset Array

Exit guide offsets, shape (num_spans, 3), in metres in each exit segment's material frame.

span_path_index tuple[int, ...]

Physical path assigned to each span. Indices are contiguous from zero; multiple spans can belong to the same path.

start_segment_index tuple[int, ...]

Inclusive entry segment for each span.

end_segment_index tuple[int, ...]

Inclusive exit segment for each span.

num_spans property

num_spans: int

Return the number of spans.

Returns:

Name Type Description
result int

Number of guided portions represented by the topology.

num_paths property

num_paths: int

Return the number of physical paths.

Returns:

Name Type Description
result int

Number of physical filament paths represented by the topology.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__

__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

validate_structure

validate_structure()

Validate shapes and immutable connectivity without reading tracers.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values

validate_values()

Validate finite transverse guide offsets.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

validate_structure_for_robot

validate_structure_for_robot(robot)

Check span bounds against the host segment count.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid host topology or unsupported span crossings raise an exception.

validate_values_for_robot

validate_values_for_robot(robot)

Check transverse geometry in aligned continuum segment frames.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid concrete host or guide geometry raises ValueError.

assert_same_topology

assert_same_topology(other)

Reject changes in span connectivity or parameter type.

Parameters:

Name Type Description Default
other BaseSystemParams

Replacement parameters whose static topology must match this object.

required

Returns:

Name Type Description
result None

None. Changed parameter types, shapes, or connectivity raise ValueError.

replace

replace(**updates: Any)

Replace numeric geometry while retaining span topology.

Parameters:

Name Type Description Default
updates Any

Named parameter replacements; numeric geometry can change while topology is retained.

{}

Returns:

Name Type Description
result RoutingSpanParams

New parameter object with validated geometry and unchanged static topology.

RoutingSpanSolution

Bases: Module


              flowchart TD
              soromox.actuation.RoutingSpanSolution[RoutingSpanSolution]

              

              click soromox.actuation.RoutingSpanSolution href "" "soromox.actuation.RoutingSpanSolution"
            

One solved span and normalized KKT diagnostics.

Coefficients are nodal transverse slopes d(offset)/ds, shaped (nodes, 2) in space or (nodes, 1) in the plane. Multipliers use normalized objectives/constraints and the nonpositive wall convention. dense_wall_violation is measured in metres. Convergence also requires the continuous interpolation bound to meet the physical wall tolerance.

Attributes:

Name Type Description
coefficients Array

Physical transverse offset slopes, shape (nodes, 1 or 2).

knots Array

Global reference backbone coordinates in metres, shape (nodes,).

length Array

Integrated span length in metres.

equality_multipliers Array

Endpoint constraint multipliers, shape (1 or 2,).

inequality_multipliers Array

Wall multipliers, shape (wall_samples,).

active_mask Array

Active sampled wall constraints, shape (wall_samples,).

converged Array

Scalar boolean from independent optimality and feasibility checks.

iterations Array

Scalar SLSQP iteration count.

primal_residual Array

Maximum normalized endpoint or wall constraint violation.

stationarity_residual Array

Maximum absolute normalized Lagrangian gradient.

complementarity_residual Array

Maximum absolute wall residual times multiplier.

dense_wall_violation Array

Maximum sampled penetration in metres on the checking grid.

wall_violation_bound Array

Conservative upper bound on penetration between checking points, in metres, using the quadratic offset interpolation error on each element. Included in convergence acceptance.

ShortestPathRouting

Bases: ConfigurationDependentThreadlikeRouting


              flowchart TD
              soromox.actuation.ShortestPathRouting[ShortestPathRouting]
              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.ShortestPathRouting
                                soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
                



              click soromox.actuation.ShortestPathRouting href "" "soromox.actuation.ShortestPathRouting"
              click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Shortest feasible paths through hollow sections and prescribed guides.

A path represents one physical tendon or filament. A span is the portion between two prescribed guides, optimized inside one or more continuous hollow sections. Adjacent spans of a path are connected by a straight cable. A lumen is the hollow interior available to the filament.

The host supplies material strains, their basis, and joint guide kinematics. Floating bases and moving joints are supported. Spans must end at moving joints so the upstream and downstream guide offsets can be prescribed. Derivatives solve the converged KKT equations for a fixed active set. Slack, friction, joint obstacle geometry, and rod bending stiffness are excluded.

Attributes:

Name Type Description
params ShortestPathRoutingParams

Guide offsets, span topology, and circular lumen dimensions.

discretization PiecewiseLinearRoutingDiscretization

Piecewise linear slope mesh and sampling counts.

solver_options RoutingSolverOptions

Physical feasibility, solver, and sensitivity tolerances.

References

Mathew, A. T., Alkayas, A. Y., Alshehhi, A. A. S., Adamu, Y. A., Taha, T., & Renda, F. (2026). A Differentiable Framework for Hollow Tendon-Driven Continuum Robots With Implicit Internal Routing. IEEE Transactions on Robotics, 42, 3009-3027. doi:10.1109/TRO.2026.3714660.

num_paths property

num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

spans property

spans

Return the shared span parameters.

Returns:

Name Type Description
result RoutingSpanParams

RoutingSpanParams containing guide offsets and span-to-path connectivity.

path_lengths

path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_velocity_jacobian

path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions

path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

validate_friction

validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix

path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

with_params

with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

update_params

update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot

validate_structure_for_robot(robot)

Check host topology and span compatibility.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid host topology or unsupported span crossings raise an exception.

validate_values_for_robot

validate_values_for_robot(robot)

Validate concrete host and guide geometry.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid concrete host or guide geometry raises ValueError.

solve_routing

solve_routing(robot, configuration, *, initial_guess=None)

Solve all spans and return lengths, coefficients, and diagnostics.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host implementing the material routing interface.

required
configuration Array

Host generalized coordinates.

required
initial_guess RoutingSolution | None

Previous RoutingSolution with identical topology.

None

Returns:

Name Type Description
result RoutingSolution

A RoutingSolution. Inspect converged and dense wall violations before using a route. Invalid input geometry raises eagerly.

span_offsets

span_offsets(solution: RoutingSolution, span_index: int, points: Array)

Sample material-frame offsets at global backbone coordinates.

Parameters:

Name Type Description Default
solution RoutingSolution

RoutingSolution containing resolved spans and solver diagnostics.

required
span_index int

Zero-based index of the requested span.

required
points Array

Global reference backbone sample coordinates in metres, shape (points,).

required

Returns:

Name Type Description
result Array

Material-frame offsets in metres with shape (points, 3).

span_positions

span_positions(robot, configuration, solution, span_index, fractions)

Sample an optimized span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying forward kinematics.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution

Resolved routing at this configuration.

required
span_index int

Static span index.

required
fractions Array

One-dimensional fractions of the backbone interval.

required

Returns:

Name Type Description
result Array

World positions in metres, shape (num_samples, 3).

path_length_jacobian

path_length_jacobian(robot, configuration, solution: RoutingSolution | None = None)

Evaluate the optimal length gradient at an already solved route.

The envelope identity applies because the material-frame endpoint and wall constraints are independent of configuration. The caller must supply a converged solution for this robot, configuration, and routing. On a fixed base host, positive tensions produce -jacobian.T @ tension. Use the velocity Jacobian to compute forces on floating base hosts.

This computes a partial derivative holding routing coefficients fixed. Differentiating this method again requires the supplied solution to retain its dependence on configuration through solve_routing. This implements the paper's tangent derivative (B2) integrated against the unit tangent, equivalently the transpose of (B5), with the envelope identity (26). It does not invoke autodiff to evaluate this Jacobian.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host implementing the material routing interface.

required
configuration Array

Generalized coordinates, shape (num_coordinates,).

required
solution RoutingSolution | None

Converged routing for this geometry and configuration. Omission solves the route once.

None

Returns:

Name Type Description
result Array

Length Jacobian, shape (num_paths, num_coordinates). Floating base columns vanish. Failed span solves and collapsed moving guide connections produce NaNs in the affected path row. Spatial floating systems use quaternion configuration coordinates; to obtain forces in velocity coordinates, use :meth:path_velocity_jacobian.

ShortestPathRoutingParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ShortestPathRoutingParams[ShortestPathRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ShortestPathRoutingParams
                


              click soromox.actuation.ShortestPathRoutingParams href "" "soromox.actuation.ShortestPathRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Compose shared guide geometry with a circular containment domain.

Attributes:

Name Type Description
spans RoutingSpanParams

Guides and connectivity shared across routing strategies.

domain CircularLumenParams

Circular lumen radii, with one value per host segment.

num_paths property

num_paths: int

Return the number of physical filaments represented by the guides.

Returns:

Type Description
int

Number of paths, each corresponding to one actuator channel.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__

__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

validate_structure

validate_structure()

Validate parameter shapes and connectivity.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values

validate_values()

Validate concrete parameter values.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

assert_same_topology

assert_same_topology(other)

Check that a replacement preserves topology.

Parameters:

Name Type Description Default
other BaseSystemParams

Replacement parameters whose static topology must match this object.

required

Returns:

Name Type Description
result None

None. Changed parameter types, shapes, or connectivity raise ValueError.

replace

replace(**updates)

Replace numeric parameters while preserving topology.

Parameters:

Name Type Description Default
updates Any

Named parameter replacements; numeric geometry can change while topology is retained.

{}

Returns:

Name Type Description
result ShortestPathRoutingParams

New parameter object with validated geometry and unchanged static topology.

StraightSpanRouting

Bases: ConfigurationDependentThreadlikeRouting


              flowchart TD
              soromox.actuation.StraightSpanRouting[StraightSpanRouting]
              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.StraightSpanRouting
                                soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
                



              click soromox.actuation.StraightSpanRouting href "" "soromox.actuation.StraightSpanRouting"
              click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Straight filaments between guides that move with the robot.

A path is one physical filament. A span is the straight portion between two prescribed guides. Adjacent spans include their joint guide connection. The user must ensure that wall contact is irrelevant throughout operation. Guide kinematics determine the path directly. The model describes taut frictionless tendons and ideal straight axial members with negligible bending stiffness, operating below their buckling load.

Attributes:

Name Type Description
params RoutingSpanParams

Shared guide offsets and span connectivity.

num_paths property

num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

spans property

spans

Return the shared guide geometry and connectivity parameters.

Returns:

Name Type Description
result RoutingSpanParams

This strategy's guide geometry.

path_lengths

path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_velocity_jacobian

path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions

path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

validate_friction

validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

with_params

with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

update_params

update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot

validate_structure_for_robot(robot) -> None

Validate segment bounds and prescribed guides at moving joints.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with static segment topology.

required

Raises:

Type Description
ValueError

Span connectivity is incompatible with the host.

validate_values_for_robot

validate_values_for_robot(robot) -> None

Validate guide geometry and positive finite segment lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with material frame conventions.

required

Raises:

Type Description
ValueError

Host lengths or guide offsets are invalid.

solve_routing

solve_routing(robot, configuration, *, initial_guess=None, backend=None)

Resolve straight spans and their analytical length derivatives.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying local segment and joint guide kinematics.

required
configuration Array

Configuration, shape (num_coordinates,).

required
initial_guess RoutingSolution | None

Unused; accepted for the common routing interface.

None
backend str | None

Per-call override: "auto", "jax", or "warp". None inherits robot.backend; hosts without a preference use JAX. Automatic selection uses Warp on GPU and JAX on CPU. Warp uses the optional warp-lang package for native segment kinematics, span geometry, joint connections, and path derivatives. Differentiation through the solve uses JAX.

None

Returns:

Name Type Description
result RoutingSolution

StraightSpanSolution entries. Nonfinite or collapsed spans report failed convergence and NaN derivatives.

Raises:

Type Description
ValueError

If the backend, configuration shape, or routing parameters are invalid, or Warp is requested without JAX 64-bit mode.

ImportError

If Warp is requested and warp-lang is unavailable.

path_length_jacobian

path_length_jacobian(robot, configuration, solution=None)

Return the analytical derivative of a resolved path family.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying joint guide kinematics.

required
configuration Array

Configuration matching the solution.

required
solution RoutingSolution | None

Result returned by this strategy. Omission solves the route once.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_coordinates), with zero base columns. Invalid spans or collapsed moving connections yield NaNs.

actuation_matrix

actuation_matrix(robot, configuration, *, backend=None)

Evaluate -J_velocity.T without reconstructing world guide positions.

Parameters:

Name Type Description Default
robot SoftRobot

PlanarPCS, PCS, or GVS host.

required
configuration Array

Configuration, shape (num_coordinates,).

required
backend str | None

Execution override, following :meth:solve_routing.

None

Returns:

Name Type Description
result Array

Matrix of shape (num_velocities, num_paths). Invalid geometry produces NaN internal rows for the affected paths. Floating base rows are zero because routing is base-invariant.

path_force_matrix

path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Return the length-conjugate effort map using the selected backend.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Frictionless runtime transmission model.

required

Returns:

Name Type Description
result Array

Force map with shape (robot.num_velocities, num_paths) before applying actuator signs and scales.

Raises:

Type Description
ValueError

The supplied friction model is not frictionless.

actuation_force

actuation_force(robot, configuration, tensions, *, backend=None)

Evaluate tendon forces directly without reconstructing world geometry.

Parameters:

Name Type Description Default
robot SoftRobot

PlanarPCS, PCS, or GVS host.

required
configuration Array

Configuration, shape (num_coordinates,).

required
tensions Array

Signed filament loads, shape (num_paths,); positive is tension and negative is ideal axial compression below buckling.

required
backend str | None

Execution override, following :meth:solve_routing.

None

Returns:

Name Type Description
result Array

Generalized force, shape (num_velocities,). Warp skips world geometry and does not materialize an actuation matrix.

span_positions

span_positions(robot, configuration, solution, span_index, fractions)

Interpolate a straight span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Unused host for the common sampling interface.

required
configuration Array

Unused configuration associated with the solution.

required
solution RoutingSolution

Routing containing world endpoint positions.

required
span_index int

Static span index.

required
fractions Array

One-dimensional interpolation fractions in [0, 1].

required

Returns:

Name Type Description
result Array

World positions in metres, shape (num_samples, 3).

StraightSpanSolution

Bases: Module


              flowchart TD
              soromox.actuation.StraightSpanSolution[StraightSpanSolution]

              

              click soromox.actuation.StraightSpanSolution href "" "soromox.actuation.StraightSpanSolution"
            

A straight span between prescribed guides, with no optimization state.

Attributes:

Name Type Description
start_position Array

World entry guide, shape (3,), in metres.

end_position Array

World exit guide, shape (3,), in metres.

length Array

Distance between guides in metres.

length_jacobian Array

Analytical configuration derivative, shape (num_coordinates,), with zero base columns.

converged Array

Whether endpoints are finite and the span has positive length.

ThreadlikeActuator

ThreadlikeActuator(*, params: ThreadlikeActuatorParams, routing: BaseThreadlikeRouting | None = None, friction: ThreadlikeFriction | None = None, labels: tuple[str, ...], units: str | tuple[str, ...], name: str, kind: ThreadlikeKind)

Bases: Actuator


              flowchart TD
              soromox.actuation.ThreadlikeActuator[ThreadlikeActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.ThreadlikeActuator
                


              click soromox.actuation.ThreadlikeActuator href "" "soromox.actuation.ThreadlikeActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Vectorized threadlike actuator with modality-specific presets.

Construct a vectorized threadlike actuator.

Prefer the modality-specific constructors such as :meth:tendons or :meth:push_rods when their effort sign conventions apply.

params property

Return the actuator parameter tree.

transmission property

transmission: ThreadlikeTransmission

Return the threadlike transmission.

effort_model property

effort_model: DirectEffort

Return the direct commanded-effort model.

metadata property

metadata: ActuatorMetadata

Return channel labels, units, kind, and bounds.

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts

efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

tendons classmethod

tendons(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct tension-only tendons with shortening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized tendon actuator with one channel per path.

push_rods classmethod

push_rods(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct compression push rods with lengthening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized push-rod actuator with one channel per path.

muscles classmethod

muscles(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct tensile muscles with shortening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized muscle actuator with one channel per path.

pressure_chambers classmethod

pressure_chambers(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, effective_areas: Array, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct pressure chambers scaled by their effective areas.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
effective_areas Array

Effective area of each chamber with shape (num_paths,).

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized pressure-chamber actuator with one channel per path.

with_params

with_params(params: BaseSystemParams) -> ThreadlikeActuator

Return a copy carrying replacement actuator parameter leaves.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement threadlike-actuator parameters.

required

Returns:

Type Description
ThreadlikeActuator

Actuator with updated differentiable parameter leaves.

Raises:

Type Description
TypeError

If params has the wrong parameter type.

ValueError

If params changes the routing topology.

validate_structure_for_robot

validate_structure_for_robot(robot: SoftRobot) -> None

Validate routing and friction structure for the host robot.

validate_values_for_robot

validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete routing and friction values for the host robot.

path_lengths

path_lengths(robot: SoftRobot, q: Array) -> Array

Return physical routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.num_channels,).

path_velocities

path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return physical routed-path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.num_channels,).

path_poses

path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.num_channels, 2) for planar

Array

hosts or (self.num_channels, 3) for spatial hosts.

ThreadlikeActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ThreadlikeActuatorParams[ThreadlikeActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ThreadlikeActuatorParams
                


              click soromox.actuation.ThreadlikeActuatorParams href "" "soromox.actuation.ThreadlikeActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Physical and control parameters for a threadlike actuator family.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__

__check_init__() -> None

Validate newly constructed threadlike-actuator parameters.

validate_structure

validate_structure() -> None

Validate threadlike actuator parameter structure.

validate_values

validate_values() -> None

Validate eager nested threadlike transmission values.

ThreadlikeImpedance

ThreadlikeImpedance(*, routing: BaseThreadlikeRouting | ThreadlikeRoutingParameters, stiffness: Array, damping: Array, rest_length: Array, name: str = 'passive_threadlike')

Bases: PassiveElement


              flowchart TD
              soromox.actuation.ThreadlikeImpedance[ThreadlikeImpedance]
              soromox.actuation.core.PassiveElement[PassiveElement]

                              soromox.actuation.core.PassiveElement --> soromox.actuation.ThreadlikeImpedance
                


              click soromox.actuation.ThreadlikeImpedance href "" "soromox.actuation.ThreadlikeImpedance"
              click soromox.actuation.core.PassiveElement href "" "soromox.actuation.core.PassiveElement"
            

Passive spring-damper mechanics along threadlike paths.

Construct passive spring-damper paths.

Parameters:

Name Type Description Default
routing BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
stiffness Array

One axial stiffness per path.

required
damping Array

One axial damping coefficient per path.

required
rest_length Array

One undeformed length per path.

required
name str

Human-readable passive-element name.

'passive_threadlike'

params property

Return the passive element parameters.

validate_for_robot

validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

passive_force

passive_force(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this element's elastic and damping effort.

Parameters:

Name Type Description Default
robot SoftRobot

Robot on which the passive element is installed.

required
q Array

Configuration, shape (robot.num_coordinates,).

required
qd Array

Generalized velocity, shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Required passive effort, shape (robot.num_velocities,). Its

Array

negative is the force applied by the element to the robot.

with_params

with_params(params: BaseSystemParams) -> ThreadlikeImpedance

Return a copy carrying replacement impedance parameters.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement threadlike-impedance parameters.

required

Returns:

Type Description
ThreadlikeImpedance

Passive element with updated differentiable parameter leaves.

Raises:

Type Description
TypeError

If params has the wrong parameter type.

ValueError

If params changes the routing topology.

validate_structure_for_robot

validate_structure_for_robot(robot: SoftRobot) -> None

Validate routing structure for the host robot.

validate_values_for_robot

validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete routing values for the host robot.

path_lengths

path_lengths(robot: SoftRobot, q: Array) -> Array

Return the raw lengths of the passive routed paths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.routing.num_paths,).

path_length_jacobian

path_length_jacobian(robot: SoftRobot, q: Array) -> Array

Return the Jacobian of passive physical path lengths.

The Jacobian maps generalized velocity to passive path-length rate.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_l Array

Path-length Jacobian with shape (self.routing.num_paths, robot.num_velocities).

path_velocities

path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return the raw length rates of the passive routed paths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.routing.num_paths,).

path_poses

path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return passive routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.routing.num_paths, 2) for

Array

planar hosts or (self.routing.num_paths, 3) for spatial hosts.

elastic_force

elastic_force(robot: SoftRobot, q: Array) -> Array

Return conservative generalized spring force from the paths.

damping_matrix

damping_matrix(robot: SoftRobot, q: Array) -> Array

Return generalized viscous damping from the routed paths.

elastic_energy

elastic_energy(robot: SoftRobot, q: Array) -> Array

Return elastic energy stored in the routed springs.

ThreadlikeImpedanceParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ThreadlikeImpedanceParams[ThreadlikeImpedanceParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ThreadlikeImpedanceParams
                


              click soromox.actuation.ThreadlikeImpedanceParams href "" "soromox.actuation.ThreadlikeImpedanceParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Spring-damper parameters for passive routed paths.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__

__check_init__() -> None

Validate newly constructed impedance parameters.

validate_structure

validate_structure() -> None

Validate threadlike impedance parameter structure.

validate_values

validate_values() -> None

Validate eager nested threadlike routing values.

ThreadlikeRouting

Bases: BaseThreadlikeRouting


              flowchart TD
              soromox.actuation.ThreadlikeRouting[ThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.ThreadlikeRouting
                


              click soromox.actuation.ThreadlikeRouting href "" "soromox.actuation.ThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Runtime routing object for a batched fixed material-frame path family.

num_paths property

num_paths: int

Return the number of paths represented by the routing family.

has_analytical_second_derivative property

has_analytical_second_derivative: bool

Return whether the routing supplies the derivative needed for turn.

Returns:

Type Description
bool

Whether an explicit second-derivative function is installed or all

bool

routing callbacks are the built-in linear functions.

linear classmethod

linear(*, intercept: Array, slope: Array | float = 0.0, start_segment_index: int | tuple[int, ...] | Array = 0, end_segment_index: int | tuple[int, ...] | Array = 0) -> ThreadlikeRouting

Construct linear cross-section paths in the local material frame.

The final array axis is [x, y, z]. Local x follows the backbone, so the x-components of intercept and slope must both be zero.

Parameters:

Name Type Description Default
intercept Array

Offset at zero backbone abscissa with shape (3,) or (num_paths, 3).

required
slope Array | float

Constant offset derivative, either scalar or shaped (3,) or (num_paths, 3).

0.0
start_segment_index int | tuple[int, ...] | Array

First segment traversed by each path.

0
end_segment_index int | tuple[int, ...] | Array

Last segment traversed by each path.

0

Returns:

Type Description
ThreadlikeRouting

Vectorized linear routing family.

offset

offset(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Material-frame offset with shape (3,).

derivative

derivative(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset derivative.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

First backbone-abscissa derivative with shape (3,).

second_derivative

second_derivative(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset second derivative.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Second backbone-abscissa derivative with shape (3,).

Raises:

Type Description
ValueError

If a custom routing does not provide an analytical second_derivative_fn.

with_params

Return a routing with new values and unchanged runtime functions.

update_params

update_params(**updates: Any) -> ThreadlikeRouting

Return a routing with selected parameter leaves replaced.

validate_structure_for_robot

validate_structure_for_robot(robot: SoftRobot) -> None

Validate the fixed path topology and host hooks.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing integration hooks and segment topology.

required

Raises:

Type Description
TypeError

The host lacks the required integration or segment data.

ValueError

A path span exceeds the host or a routing callback returns offsets with an incompatible shape.

validate_values_for_robot

validate_values_for_robot(robot: SoftRobot) -> None

Validate material offsets, including the planar restriction.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with concrete segment lengths and material frame conventions.

required

Raises:

Type Description
ValueError

Routing parameters are invalid or sampled offsets leave the local-y direction required by a planar host.

validate_friction

validate_friction(friction: ThreadlikeFriction) -> None

Validate the derivatives required by a fixed-path friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model paired with this routing.

required

Raises:

Type Description
ValueError

Nonzero friction requires an analytical second derivative that the routing does not provide.

path_lengths

path_lengths(robot: SoftRobot, q: Array) -> Array

Return physical path lengths, independent of rigid base motion.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing length integration.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Physical lengths in metres with shape (self.num_paths,). Actuator coordinate signs and scales are not applied.

path_velocity_jacobian

path_velocity_jacobian(robot: SoftRobot, q: Array) -> Array

Return length-rate derivatives with zero floating-base columns.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing length derivatives.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Jacobian with shape (self.num_paths, robot.num_velocities). Multiplication by generalized velocity gives physical path length rates in metres per second.

path_force_matrix

path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Integrate length-conjugate efforts with optional fixed-path friction.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the fixed-routing force integral.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this routing.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths). Floating-base rows are zero; actuator signs and scales have not been applied.

Raises:

Type Description
ValueError

The routing lacks the analytical derivatives required by the friction model.

path_positions

path_positions(robot: SoftRobot, q: Array, s: Array) -> Array

Return world positions with stations clamped to each path's ends.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing world positions.

required
q Array

Configuration with shape (robot.num_coordinates,), including the runtime base pose for floating hosts.

required
s Array

Scalar reference backbone station in metres.

required

Returns:

Type Description
Array

World positions in metres with shape (self.num_paths, 2) for planar hosts or (self.num_paths, 3) for spatial hosts.

ThreadlikeTransmission

ThreadlikeTransmission(params: ThreadlikeTransmissionParams, *, routing: BaseThreadlikeRouting | None = None, friction: ThreadlikeFriction | None = None)

Bases: Transmission


              flowchart TD
              soromox.actuation.ThreadlikeTransmission[ThreadlikeTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.ThreadlikeTransmission
                


              click soromox.actuation.ThreadlikeTransmission href "" "soromox.actuation.ThreadlikeTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Map scaled path lengths and anchor efforts to robot coordinates.

Construct a runtime transmission from matching parameter objects.

Parameters:

Name Type Description Default
params ThreadlikeTransmissionParams

Nested routing, coordinate-scale, and friction parameters.

required
routing BaseThreadlikeRouting | None

Runtime strategy, including any custom callbacks or solver settings. Omission reconstructs the built-in strategy from its parameter type using default settings.

None
friction ThreadlikeFriction | None

Runtime effort-ratio law. Frictionless behavior is reconstructed automatically when this argument is omitted.

None

num_channels property

num_channels: int

Return the number of independently routed paths.

velocities

velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

coordinates

coordinates(robot: SoftRobot, q: Array) -> Array

Return scaled routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate coordinates with shape (self.num_channels,).

coordinate_jacobian

coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the scaled path-coordinate Jacobian.

The Jacobian maps generalized velocity to actuator-coordinate velocity as yd_a = J_a(q) @ qd.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

actuation_matrix

actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the anchor-effort to generalized-force map.

Friction weights each local contribution by its surviving effort ratio, so this matrix need not equal :meth:coordinate_jacobian transposed.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

path_lengths

path_lengths(robot: SoftRobot, q: Array) -> Array

Return unscaled physical routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.num_channels,).

path_length_jacobian

path_length_jacobian(robot: SoftRobot, q: Array) -> Array

Return the unscaled physical path-length Jacobian.

This Jacobian maps generalized velocity to physical path-length rate.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_l Array

Path-length Jacobian with shape (self.num_channels, robot.num_velocities).

path_velocities

path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return unscaled physical path-length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.num_channels,).

path_poses

path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.num_channels, 2) for planar

Array

hosts or (self.num_channels, 3) for spatial hosts.

with_params

Return a copy carrying replacement transmission parameter leaves.

update_params

update_params(**updates: Any) -> ThreadlikeTransmission

Return a copy with replaced transmission parameter leaves.

ThreadlikeTransmissionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.ThreadlikeTransmissionParams[ThreadlikeTransmissionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.ThreadlikeTransmissionParams
                


              click soromox.actuation.ThreadlikeTransmissionParams href "" "soromox.actuation.ThreadlikeTransmissionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Routing, work-coordinate scale, and friction parameters per path.

replace

replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate

validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update

validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility

validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility

validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure

validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure

validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__

__check_init__() -> None

Validate newly constructed transmission parameters.

validate_structure

validate_structure() -> None

Validate threadlike transmission parameter structure.

validate_values

validate_values() -> None

Validate eager nested routing and friction values.

capstan_effort_ratio

capstan_effort_ratio(params: CapstanFrictionParams, accumulated_turn: Array) -> Array

Return the surviving effort fraction exp(-mu * Theta).

Parameters:

Name Type Description Default
params CapstanFrictionParams

Capstan parameters containing mu.

required
accumulated_turn Array

Unsigned turn Theta from each path anchor to the evaluation point, in radians.

required

Returns:

Type Description
Array

Effort ratio in (0, 1] with one value per routed path.

frictionless_effort_ratio

frictionless_effort_ratio(params: FrictionlessParams, accumulated_turn: Array) -> Array

Return the unit effort ratio for an ideal transmission.

Parameters:

Name Type Description Default
params FrictionlessParams

Parameter-free frictionless model parameters.

required
accumulated_turn Array

Accumulated routed-path turn in radians.

required

Returns:

Type Description
Array

Ones with the same shape as accumulated_turn.

threadlike_constant_strain_turn_rate

threadlike_constant_strain_turn_rate(angular_strain: Array, linear_strain: Array, offset: Array, offset_derivative: Array, offset_second_derivative: Array, *, eps: Array | float) -> Array

Return routed-path turn rate for a constant Cosserat strain.

For PCS, omega' = v' = 0 within every segment, so the material tangent derivative simplifies analytically to

.. math::

a' = \omega \times r' + r''.

Parameters:

Name Type Description Default
angular_strain Array

Constant material angular strain omega with shape (3,).

required
linear_strain Array

Constant material linear strain v with shape (3,).

required
offset Array

Material-frame routing offset r with shape (3,).

required
offset_derivative Array

Backbone-abscissa derivative r' with shape (3,).

required
offset_second_derivative Array

Backbone-abscissa derivative r'' with shape (3,).

required
eps Array | float

Threshold below which a collapsed tangent uses the finite zero convention.

required

Returns:

Type Description
Array

Nonnegative turn rate rho as a scalar.

threadlike_tangent

threadlike_tangent(angular_strain: Array, linear_strain: Array, offset: Array, offset_derivative: Array) -> Array

Return the material-frame tangent of a routed path.

For backbone pose g(s) = (R(s), p(s)) and material-frame routing offset r(s), the spatial path is x(s) = p(s) + R(s) r(s). The Cosserat relations R' = R hat(omega) and p' = R v give

.. math::

x' = R a, \qquad a = v + \omega \times r + r'.

Parameters:

Name Type Description Default
angular_strain Array

Material angular strain omega with shape (3,).

required
linear_strain Array

Material linear strain v with shape (3,).

required
offset Array

Material-frame routing offset r with shape (3,).

required
offset_derivative Array

Backbone-abscissa derivative r' with shape (3,).

required

Returns:

Type Description
Array

Material-frame path tangent a with shape (3,).

threadlike_turn_rate

threadlike_turn_rate(angular_strain: Array, linear_strain: Array, angular_strain_derivative: Array, linear_strain_derivative: Array, offset: Array, offset_derivative: Array, offset_second_derivative: Array, *, eps: Array | float) -> Array

Return how quickly the routed path direction turns in space.

The spatial unit tangent is t_hat = R u, where u is the normalized material tangent. Since R' = R hat(omega),

.. math::

\frac{d\hat t}{ds}
= R(\omega \times u + u'), \qquad
\rho = \left\|\omega \times u + u'\right\|.

Rotation preserves the Euclidean norm, so rho is evaluated entirely in the material frame. It has units of radians per metre of backbone abscissa and includes both backbone strain variation and routing-offset variation.

Parameters:

Name Type Description Default
angular_strain Array

Material angular strain omega with shape (3,).

required
linear_strain Array

Material linear strain v with shape (3,).

required
angular_strain_derivative Array

Backbone-abscissa derivative omega' with shape (3,).

required
linear_strain_derivative Array

Backbone-abscissa derivative v' with shape (3,).

required
offset Array

Material-frame routing offset r with shape (3,).

required
offset_derivative Array

Backbone-abscissa derivative r' with shape (3,).

required
offset_second_derivative Array

Backbone-abscissa derivative r'' with shape (3,).

required
eps Array | float

Threshold used for a collapsed tangent.

required

Returns:

Type Description
Array

Nonnegative turn rate rho as a scalar.

linear_threadlike_routing

linear_threadlike_routing(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Evaluate linear material-frame routing offsets.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Material-frame offsets params.intercept + params.slope * s with

Array

shape (3,) or (num_paths, 3).

linear_threadlike_routing_derivative

linear_threadlike_routing_derivative(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Evaluate the first derivative of a linear routing offset.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa, used to preserve dtype and tracing.

required

Returns:

Type Description
Array

Constant slopes with shape (3,) or (num_paths, 3).

linear_threadlike_routing_second_derivative

linear_threadlike_routing_second_derivative(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Return the zero second derivative of a linear routing offset.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa, used to preserve output dtype and tracing.

required

Returns:

Type Description
Array

Zeros with the same shape as params.slope.

core

Composable actuation primitives.

The actuation model follows a work-conjugate formulation. A transmission defines actuator coordinates y_a(q), their coordinate Jacobian J_a(q) = dy_a/dq, and an effort-to-generalized-force map A(q). For an ideal lossless transmission A = J_a.T; lossy transmissions need not obey that identity. An effort model maps user controls to efforts conjugate to the actuator coordinates, and generalized actuation forces are A(q) @ effort.

ActuatorMetadata

ActuatorMetadata(*, labels: tuple[str, ...], units: str | tuple[str, ...], kind: ActuatorKind = 'generic', lower_bounds: Array | None = None, upper_bounds: Array | None = None)

Bases: Module


              flowchart TD
              soromox.actuation.core.ActuatorMetadata[ActuatorMetadata]

              

              click soromox.actuation.core.ActuatorMetadata href "" "soromox.actuation.core.ActuatorMetadata"
            

Ordered labels, units, limits, and semantics for input channels.

Transmission

Bases: Module


              flowchart TD
              soromox.actuation.core.Transmission[Transmission]

              

              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Map robot configuration to work-conjugate actuator coordinates.

num_channels abstractmethod property
num_channels: int

Number of scalar transmission coordinates.

coordinates abstractmethod
coordinates(robot: SoftRobot, q: Array) -> Array

Return transmission coordinates y_a(q).

coordinate_jacobian abstractmethod
coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the transmission-coordinate Jacobian.

The Jacobian J_a(q) maps generalized velocity to transmission- coordinate velocity as yd_a = J_a(q) @ qd.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

actuation_matrix abstractmethod
actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the effort-to-generalized-force map.

The actuation matrix A(q) maps transmission efforts to generalized force as tau_u = A(q) @ effort.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

EffortModel

Bases: Module


              flowchart TD
              soromox.actuation.core.EffortModel[EffortModel]

              

              click soromox.actuation.core.EffortModel href "" "soromox.actuation.core.EffortModel"
            

Map controls to efforts work-conjugate to transmission coordinates.

effort abstractmethod
effort(control: Array, coordinate: Array | None, velocity: Array | None) -> Array

Return actuator effort for the current control and transmission state.

DirectEffort

Bases: EffortModel


              flowchart TD
              soromox.actuation.core.DirectEffort[DirectEffort]
              soromox.actuation.core.EffortModel[EffortModel]

                              soromox.actuation.core.EffortModel --> soromox.actuation.core.DirectEffort
                


              click soromox.actuation.core.DirectEffort href "" "soromox.actuation.core.DirectEffort"
              click soromox.actuation.core.EffortModel href "" "soromox.actuation.core.EffortModel"
            

Stateless effort model for which effort is exactly the user control.

PassiveElement

Bases: Module


              flowchart TD
              soromox.actuation.core.PassiveElement[PassiveElement]

              

              click soromox.actuation.core.PassiveElement href "" "soromox.actuation.core.PassiveElement"
            

Independent passive contribution to robot mechanics.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate tracer-safe component compatibility with robot.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

passive_force
passive_force(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this element's elastic and damping effort.

Parameters:

Name Type Description Default
robot SoftRobot

Robot on which the passive element is installed.

required
q Array

Configuration, shape (robot.num_coordinates,).

required
qd Array

Generalized velocity, shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Required passive effort, shape (robot.num_velocities,). Its

Array

negative is the force applied by the element to the robot.

Actuator

Bases: Module


              flowchart TD
              soromox.actuation.core.Actuator[Actuator]

              

              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

A transmission paired with an effort law and ordered channel metadata.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts
efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate tracer-safe component compatibility with robot.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

IdentityActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.core.IdentityActuatorParams[IdentityActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.core.IdentityActuatorParams
                


              click soromox.actuation.core.IdentityActuatorParams href "" "soromox.actuation.core.IdentityActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Empty immutable parameter object for identity actuation.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure
validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values
validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

IdentityTransmission

IdentityTransmission(num_channels: int)

Bases: Transmission


              flowchart TD
              soromox.actuation.core.IdentityTransmission[IdentityTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.core.IdentityTransmission
                


              click soromox.actuation.core.IdentityTransmission href "" "soromox.actuation.core.IdentityTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Identity generalized-coordinate transmission.

coordinate_jacobian
coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the identity coordinate Jacobian.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Identity map from generalized to actuator-coordinate velocities with shape (self.num_channels, self.num_channels).

actuation_matrix
actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the identity effort-to-generalized-force map.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Identity actuation matrix with shape (self.num_channels, self.num_channels).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

IdentityActuator

IdentityActuator(num_channels: int)

Bases: Actuator


              flowchart TD
              soromox.actuation.core.IdentityActuator[IdentityActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.core.IdentityActuator
                


              click soromox.actuation.core.IdentityActuator href "" "soromox.actuation.core.IdentityActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Direct generalized-coordinate actuation used by default.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts
efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

friction

Friction models and geometry helpers for threadlike actuation.

BaseThreadlikeFrictionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.friction.BaseThreadlikeFrictionParams[BaseThreadlikeFrictionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.friction.BaseThreadlikeFrictionParams
                


              click soromox.actuation.friction.BaseThreadlikeFrictionParams href "" "soromox.actuation.friction.BaseThreadlikeFrictionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Base PyTree contract for threadlike friction parameters.

validate_structure_compatibility
validate_structure_compatibility(num_paths: int) -> None

Validate parameter shapes against the number of routed paths.

Parameters:

Name Type Description Default
num_paths int

Number of paths in the routing family.

required
replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure
validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values
validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

FrictionlessParams

Bases: BaseThreadlikeFrictionParams


              flowchart TD
              soromox.actuation.friction.FrictionlessParams[FrictionlessParams]
              soromox.actuation.friction.BaseThreadlikeFrictionParams[BaseThreadlikeFrictionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.actuation.friction.BaseThreadlikeFrictionParams --> soromox.actuation.friction.FrictionlessParams
                                soromox.systems.params.BaseSystemParams --> soromox.actuation.friction.BaseThreadlikeFrictionParams
                



              click soromox.actuation.friction.FrictionlessParams href "" "soromox.actuation.friction.FrictionlessParams"
              click soromox.actuation.friction.BaseThreadlikeFrictionParams href "" "soromox.actuation.friction.BaseThreadlikeFrictionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Parameter-free ideal threadlike transmission.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure
validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values
validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(num_paths: int) -> None

Validate parameter shapes against the number of routed paths.

Parameters:

Name Type Description Default
num_paths int

Number of paths in the routing family.

required
validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

CapstanFrictionParams

Bases: BaseThreadlikeFrictionParams


              flowchart TD
              soromox.actuation.friction.CapstanFrictionParams[CapstanFrictionParams]
              soromox.actuation.friction.BaseThreadlikeFrictionParams[BaseThreadlikeFrictionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.actuation.friction.BaseThreadlikeFrictionParams --> soromox.actuation.friction.CapstanFrictionParams
                                soromox.systems.params.BaseSystemParams --> soromox.actuation.friction.BaseThreadlikeFrictionParams
                



              click soromox.actuation.friction.CapstanFrictionParams href "" "soromox.actuation.friction.CapstanFrictionParams"
              click soromox.actuation.friction.BaseThreadlikeFrictionParams href "" "soromox.actuation.friction.BaseThreadlikeFrictionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Coulomb coefficient of the continuum Capstan model.

Attributes:

Name Type Description
coefficient Array

Nonnegative friction coefficient, either scalar or one value per routed path.

__check_init__
__check_init__() -> None

Validate newly constructed Capstan parameters.

validate_structure_compatibility
validate_structure_compatibility(num_paths: int) -> None

Validate the coefficient shape against the path count.

Parameters:

Name Type Description Default
num_paths int

Number of paths in the routing family.

required
validate_values
validate_values() -> None

Validate concrete Capstan coefficient values.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_structure
validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ThreadlikeFriction

Bases: Module


              flowchart TD
              soromox.actuation.friction.ThreadlikeFriction[ThreadlikeFriction]

              

              click soromox.actuation.friction.ThreadlikeFriction href "" "soromox.actuation.friction.ThreadlikeFriction"
            

Runtime effort-loss law for a routed-path family.

The effort supplied by the actuator is defined at each path anchor. The model returns the fraction that remains after the path has accumulated a given unsigned turn while moving along increasing backbone abscissa.

Attributes:

Name Type Description
params BaseThreadlikeFrictionParams

Dynamic friction parameters.

effort_ratio_fn Callable

Function of (params, accumulated_turn).

is_frictionless bool

Whether the ratio is identically one.

__check_init__
__check_init__() -> None

Validate consistency between the law and frictionless marker.

frictionless classmethod
frictionless() -> ThreadlikeFriction

Construct the ideal threadlike transmission.

capstan classmethod
capstan(*, coefficient: Any = 0.0) -> ThreadlikeFriction

Construct the continuum Capstan effort-loss model.

Parameters:

Name Type Description Default
coefficient Any

Nonnegative scalar or one value per routed path.

0.0

Returns:

Type Description
ThreadlikeFriction

A Capstan friction model.

effort_ratio
effort_ratio(accumulated_turn: Array) -> Array

Return the surviving effort fraction after accumulated turn.

Parameters:

Name Type Description Default
accumulated_turn Array

Unsigned turn from each path anchor in radians.

required

Returns:

Type Description
Array

One effort ratio per routed path.

with_params

Return a copy carrying replacement friction parameters.

Parameters:

Name Type Description Default
params BaseThreadlikeFrictionParams

Replacement parameters of the installed model type.

required

Returns:

Type Description
ThreadlikeFriction

A friction model with updated dynamic leaves.

Raises:

Type Description
TypeError

If the parameter type changes.

update_params
update_params(**updates: Any) -> ThreadlikeFriction

Return a copy with replaced friction-parameter leaves.

Parameters:

Name Type Description Default
**updates Any

Named parameter-leaf replacements.

{}

Returns:

Type Description
ThreadlikeFriction

A friction model with updated parameter leaves.

threadlike_tangent

threadlike_tangent(angular_strain: Array, linear_strain: Array, offset: Array, offset_derivative: Array) -> Array

Return the material-frame tangent of a routed path.

For backbone pose g(s) = (R(s), p(s)) and material-frame routing offset r(s), the spatial path is x(s) = p(s) + R(s) r(s). The Cosserat relations R' = R hat(omega) and p' = R v give

.. math::

x' = R a, \qquad a = v + \omega \times r + r'.

Parameters:

Name Type Description Default
angular_strain Array

Material angular strain omega with shape (3,).

required
linear_strain Array

Material linear strain v with shape (3,).

required
offset Array

Material-frame routing offset r with shape (3,).

required
offset_derivative Array

Backbone-abscissa derivative r' with shape (3,).

required

Returns:

Type Description
Array

Material-frame path tangent a with shape (3,).

threadlike_turn_rate

threadlike_turn_rate(angular_strain: Array, linear_strain: Array, angular_strain_derivative: Array, linear_strain_derivative: Array, offset: Array, offset_derivative: Array, offset_second_derivative: Array, *, eps: Array | float) -> Array

Return how quickly the routed path direction turns in space.

The spatial unit tangent is t_hat = R u, where u is the normalized material tangent. Since R' = R hat(omega),

.. math::

\frac{d\hat t}{ds}
= R(\omega \times u + u'), \qquad
\rho = \left\|\omega \times u + u'\right\|.

Rotation preserves the Euclidean norm, so rho is evaluated entirely in the material frame. It has units of radians per metre of backbone abscissa and includes both backbone strain variation and routing-offset variation.

Parameters:

Name Type Description Default
angular_strain Array

Material angular strain omega with shape (3,).

required
linear_strain Array

Material linear strain v with shape (3,).

required
angular_strain_derivative Array

Backbone-abscissa derivative omega' with shape (3,).

required
linear_strain_derivative Array

Backbone-abscissa derivative v' with shape (3,).

required
offset Array

Material-frame routing offset r with shape (3,).

required
offset_derivative Array

Backbone-abscissa derivative r' with shape (3,).

required
offset_second_derivative Array

Backbone-abscissa derivative r'' with shape (3,).

required
eps Array | float

Threshold used for a collapsed tangent.

required

Returns:

Type Description
Array

Nonnegative turn rate rho as a scalar.

threadlike_constant_strain_turn_rate

threadlike_constant_strain_turn_rate(angular_strain: Array, linear_strain: Array, offset: Array, offset_derivative: Array, offset_second_derivative: Array, *, eps: Array | float) -> Array

Return routed-path turn rate for a constant Cosserat strain.

For PCS, omega' = v' = 0 within every segment, so the material tangent derivative simplifies analytically to

.. math::

a' = \omega \times r' + r''.

Parameters:

Name Type Description Default
angular_strain Array

Constant material angular strain omega with shape (3,).

required
linear_strain Array

Constant material linear strain v with shape (3,).

required
offset Array

Material-frame routing offset r with shape (3,).

required
offset_derivative Array

Backbone-abscissa derivative r' with shape (3,).

required
offset_second_derivative Array

Backbone-abscissa derivative r'' with shape (3,).

required
eps Array | float

Threshold below which a collapsed tangent uses the finite zero convention.

required

Returns:

Type Description
Array

Nonnegative turn rate rho as a scalar.

threadlike_turning_angle

threadlike_turning_angle(left_unit_tangent: Array, right_unit_tangent: Array) -> Array

Return the unsigned turning angle between two unit tangents.

Parameters:

Name Type Description Default
left_unit_tangent Array

Unit tangent immediately before a segment boundary.

required
right_unit_tangent Array

Unit tangent immediately after the boundary.

required

Returns:

Type Description
Array

Angle in radians in the closed interval [0, pi].

integrate_accumulated_turn

integrate_accumulated_turn(turn_rate_fn: Callable[[Array, Array], Array], boundary_turn_fn: Callable[[Array], Array], s: Array, segment_starts: Array, segment_lengths: Array, normalized_s_ps: Array, normalized_weights: Array, start_segment_index: Array, end_segment_index: Array) -> Array

Integrate path turn from each anchor through backbone abscissa s.

The integral uses the host quadrature rule on every complete segment and a rescaled copy of that rule on the final partial segment. One-sided tangent jumps caused by the host discretization are added at crossed segment boundaries. These are continuum-model interfaces, not discrete friction guides.

Parameters:

Name Type Description Default
turn_rate_fn Callable[[Array, Array], Array]

Function accepting (segment_index, s_ps) and returning turn rates shaped (num_points, num_paths).

required
boundary_turn_fn Callable[[Array], Array]

Function accepting a left segment index and returning one-sided tangent angles shaped (num_paths,).

required
s Array

Backbone abscissa through which to integrate.

required
segment_starts Array

Backbone abscissa at the start of every segment.

required
segment_lengths Array

Physical length of every segment.

required
normalized_s_ps Array

Normalized quadrature abscissae in [0, 1] shaped (num_segments, num_points).

required
normalized_weights Array

Corresponding quadrature weights with the same shape as normalized_s_ps.

required
start_segment_index Array

First segment of every routed path.

required
end_segment_index Array

Last segment of every routed path.

required

Returns:

Type Description
Array

Accumulated unsigned turn, in radians, shaped (num_paths,).

frictionless_effort_ratio

frictionless_effort_ratio(params: FrictionlessParams, accumulated_turn: Array) -> Array

Return the unit effort ratio for an ideal transmission.

Parameters:

Name Type Description Default
params FrictionlessParams

Parameter-free frictionless model parameters.

required
accumulated_turn Array

Accumulated routed-path turn in radians.

required

Returns:

Type Description
Array

Ones with the same shape as accumulated_turn.

capstan_effort_ratio

capstan_effort_ratio(params: CapstanFrictionParams, accumulated_turn: Array) -> Array

Return the surviving effort fraction exp(-mu * Theta).

Parameters:

Name Type Description Default
params CapstanFrictionParams

Capstan parameters containing mu.

required
accumulated_turn Array

Unsigned turn Theta from each path anchor to the evaluation point, in radians.

required

Returns:

Type Description
Array

Effort ratio in (0, 1] with one value per routed path.

joint

Joint-space transmissions and articulated tendon mechanics.

AffineGeneralizedCoordinateTransmissionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.joint.AffineGeneralizedCoordinateTransmissionParams[AffineGeneralizedCoordinateTransmissionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.joint.AffineGeneralizedCoordinateTransmissionParams
                


              click soromox.actuation.joint.AffineGeneralizedCoordinateTransmissionParams href "" "soromox.actuation.joint.AffineGeneralizedCoordinateTransmissionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Parameters for an affine mapping to actuator coordinates.

Attributes:

Name Type Description
routing_matrix Array

Matrix R with shape (num_channels, num_dofs). Each row is the derivative of one actuator coordinate with respect to the generalized coordinates.

reference_configuration Array

Generalized configuration q_ref at which the affine displacement term is zero.

coordinate_offset Array

Per-channel actuator coordinate y_a0 at q_ref, in the same units as the actuator coordinate. Thus y_a(q_ref) = y_a0 and the differential map is dy_a/dq = R. For passive tendon impedance, y_a0 specifies the deformation and corresponding preload at q_ref.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate_values
validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

AffineGeneralizedCoordinateTransmission

AffineGeneralizedCoordinateTransmission(params: AffineGeneralizedCoordinateTransmissionParams)

Bases: Transmission


              flowchart TD
              soromox.actuation.joint.AffineGeneralizedCoordinateTransmission[AffineGeneralizedCoordinateTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.joint.AffineGeneralizedCoordinateTransmission
                


              click soromox.actuation.joint.AffineGeneralizedCoordinateTransmission href "" "soromox.actuation.joint.AffineGeneralizedCoordinateTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Affine actuator coordinates R @ (q - q_ref) + y_a0.

coordinate_jacobian
coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the constant actuator-coordinate Jacobian.

Parameters:

Name Type Description Default
robot SoftRobot

Robot hosting the generalized-coordinate transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Matrix mapping generalized velocities to actuator-coordinate velocities, with shape (self.num_channels, robot.num_velocities).

actuation_matrix
actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the ideal effort-to-generalized-force map.

Parameters:

Name Type Description Default
robot SoftRobot

Robot hosting the generalized-coordinate transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

AffineGeneralizedCoordinateActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.joint.AffineGeneralizedCoordinateActuatorParams[AffineGeneralizedCoordinateActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.joint.AffineGeneralizedCoordinateActuatorParams
                


              click soromox.actuation.joint.AffineGeneralizedCoordinateActuatorParams href "" "soromox.actuation.joint.AffineGeneralizedCoordinateActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Parameters for signed direct effort through an affine coordinate map.

transmission defines actuator work coordinates y_a = R @ (q - q_ref) + y_a0. The corresponding moment matrix is A = R.T. lower_bounds and upper_bounds are ordered channel metadata for controllers, trajectory optimization, and user interfaces; they do not modify or clip controls passed to the actuator.

Attributes:

Name Type Description
transmission AffineGeneralizedCoordinateTransmissionParams

Affine generalized-coordinate transmission with one row per actuator channel and one column per robot coordinate.

lower_bounds Array

Descriptive lower control bound for every channel.

upper_bounds Array

Descriptive upper control bound for every channel.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

AffineGeneralizedCoordinateActuator

AffineGeneralizedCoordinateActuator(*, params: AffineGeneralizedCoordinateActuatorParams, labels: tuple[str, ...] | None = None, units: str | tuple[str, ...] = 'generalized effort', name: str = 'affine_generalized_coordinate_actuator')

Bases: Actuator


              flowchart TD
              soromox.actuation.joint.AffineGeneralizedCoordinateActuator[AffineGeneralizedCoordinateActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.joint.AffineGeneralizedCoordinateActuator
                


              click soromox.actuation.joint.AffineGeneralizedCoordinateActuator href "" "soromox.actuation.joint.AffineGeneralizedCoordinateActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Apply signed controls through a constant affine coordinate map.

The actuator combines :class:AffineGeneralizedCoordinateTransmission with :class:DirectEffort. For a routing matrix R, reference configuration q_ref, and coordinate offset y_a0, its work-conjugate actuator coordinates and velocities are

y_a = R @ (q - q_ref) + y_a0 and yd_a = R @ qd.

A user control is interpreted directly as the signed effort conjugate to y_a. The generalized force is therefore tau = R.T @ control and satisfies the power identity qd.T @ tau = yd_a.T @ control. This makes the class suitable for direct joint torques, prismatic forces, selected generalized-coordinate efforts, or fixed linear combinations of them. It imposes no tendon-specific positivity, serial-routing, or host restrictions.

Input bounds are exposed through :attr:metadata for downstream consumers. They are intentionally not enforced inside :meth:efforts; controls outside those bounds still produce the corresponding linear generalized force.

from_routing classmethod
from_routing(routing_matrix: Array, *, reference_configuration: Array | None = None, coordinate_offset: Array | float = 0.0, lower_bounds: Array | float | None = None, upper_bounds: Array | float | None = None, labels: tuple[str, ...] | None = None, units: str | tuple[str, ...] = 'generalized effort', name: str = 'affine_generalized_coordinate_actuator') -> AffineGeneralizedCoordinateActuator

Construct signed direct actuation from an affine routing matrix.

Bounds are exposed through :class:ActuatorMetadata and are not enforced by clipping. Omitting either bound makes it infinite.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts
efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete component values against robot.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

ArticulatedTendonActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.joint.ArticulatedTendonActuatorParams[ArticulatedTendonActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.joint.ArticulatedTendonActuatorParams
                


              click soromox.actuation.joint.ArticulatedTendonActuatorParams href "" "soromox.actuation.joint.ArticulatedTendonActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Physical parameters for direct-effort articulated tendons.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ArticulatedTendonActuator

ArticulatedTendonActuator(*, params: ArticulatedTendonActuatorParams, labels: tuple[str, ...] | None = None, name: str = 'articulated_tendons')

Bases: Actuator


              flowchart TD
              soromox.actuation.joint.ArticulatedTendonActuator[ArticulatedTendonActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.joint.ArticulatedTendonActuator
                


              click soromox.actuation.joint.ArticulatedTendonActuator href "" "soromox.actuation.joint.ArticulatedTendonActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Positive-tension actuation through fixed signed joint routing.

from_routing classmethod
from_routing(routing_matrix: Array, *, reference_configuration: Array | None = None, coordinate_offset: Array | float = 0.0, lower_bounds: Array | float = 0.0, upper_bounds: Array | float = inf, labels: tuple[str, ...] | None = None, name: str = 'articulated_tendons') -> ArticulatedTendonActuator

Construct direct-tension actuation from signed joint routing.

The resulting actuator coordinate is routing_matrix @ (q - reference_configuration) + coordinate_offset. Each routing row is the signed contraction Jacobian of one tendon.

Parameters:

Name Type Description Default
routing_matrix Array

Signed tendon routing with one row per tendon and one column per generalized coordinate.

required
reference_configuration Array | None

Configuration q_ref used as the origin of the routing displacement. Defaults to zero.

None
coordinate_offset Array | float

Actuator coordinate y_a0 at q_ref, as a scalar shared by all tendons or one value per tendon. Under DirectEffort, the generalized force is R.T @ control.

0.0
lower_bounds Array | float

Lower tension bounds, shared or per tendon.

0.0
upper_bounds Array | float

Upper tension bounds, shared or per tendon.

inf
labels tuple[str, ...] | None

Optional input label for each tendon.

None
name str

Component name used for identification and rendering.

'articulated_tendons'

Returns:

Type Description
ArticulatedTendonActuator

An articulated tendon actuator with direct tension effort.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts
efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

ArticulatedTendonImpedanceParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.joint.ArticulatedTendonImpedanceParams[ArticulatedTendonImpedanceParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.joint.ArticulatedTendonImpedanceParams
                


              click soromox.actuation.joint.ArticulatedTendonImpedanceParams href "" "soromox.actuation.joint.ArticulatedTendonImpedanceParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Spring-damper parameters for articulated tendon coordinates.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ArticulatedTendonImpedance

ArticulatedTendonImpedance(*, params: ArticulatedTendonImpedanceParams, name: str = 'passive_articulated_tendons')

Bases: PassiveElement


              flowchart TD
              soromox.actuation.joint.ArticulatedTendonImpedance[ArticulatedTendonImpedance]
              soromox.actuation.core.PassiveElement[PassiveElement]

                              soromox.actuation.core.PassiveElement --> soromox.actuation.joint.ArticulatedTendonImpedance
                


              click soromox.actuation.joint.ArticulatedTendonImpedance href "" "soromox.actuation.joint.ArticulatedTendonImpedance"
              click soromox.actuation.core.PassiveElement href "" "soromox.actuation.core.PassiveElement"
            

Passive spring-damper mechanics in affine tendon coordinates.

from_routing classmethod
from_routing(routing_matrix: Array, *, stiffness: Array, damping: Array, reference_configuration: Array | None = None, coordinate_offset: Array | float = 0.0, name: str = 'passive_articulated_tendons') -> ArticulatedTendonImpedance

Construct passive spring-damper mechanics in tendon coordinates.

Parameters:

Name Type Description Default
routing_matrix Array

Signed tendon routing with one row per passive tendon and one column per generalized coordinate.

required
stiffness Array

Actuator-space stiffness, one value per tendon.

required
damping Array

Actuator-space damping, one value per tendon.

required
reference_configuration Array | None

Configuration q_ref used as the origin of the routing displacement. Defaults to zero.

None
coordinate_offset Array | float

Tendon deformation y_a0 at q_ref, as a scalar shared by all tendons or one value per tendon. Zero makes q_ref unstrained; a nonzero value creates elastic preload R.T @ (stiffness * y_a0).

0.0
name str

Component name used for identification and rendering.

'passive_articulated_tendons'

Returns:

Type Description
ArticulatedTendonImpedance

A passive articulated tendon impedance component.

elastic_force
elastic_force(robot, q: Array) -> Array

Return generalized elastic force from the routed joint tendons.

damping_matrix
damping_matrix(robot, q: Array) -> Array

Return generalized viscous damping from the routed joint tendons.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

passive_force
passive_force(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this element's elastic and damping effort.

Parameters:

Name Type Description Default
robot SoftRobot

Robot on which the passive element is installed.

required
q Array

Configuration, shape (robot.num_coordinates,).

required
qd Array

Generalized velocity, shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Required passive effort, shape (robot.num_velocities,). Its

Array

negative is the force applied by the element to the robot.

mckibben

McKibben pneumatic-muscle transmission for spatial articulated robots.

This module's geometry is intentionally specific to grouped muscles spanning two-axis articulated joints. It requires a host that provides spatial kinematic frames; it is not a continuum-rod transmission. Continuum models can use threadlike muscle or equivalent pressure-chamber coordinates, while a future continuum McKibben model may reuse the constitutive equation with a different geometry contract.

ArticulatedMcKibbenTransmissionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.mckibben.ArticulatedMcKibbenTransmissionParams[ArticulatedMcKibbenTransmissionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.mckibben.ArticulatedMcKibbenTransmissionParams
                


              click soromox.actuation.mckibben.ArticulatedMcKibbenTransmissionParams href "" "soromox.actuation.mckibben.ArticulatedMcKibbenTransmissionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Attachment geometry and constitutive parameters for McKibben groups.

validate_values
validate_values() -> None

Validate eager McKibben topology values.

from_cached_npz classmethod
from_cached_npz(path: str | Path) -> ArticulatedMcKibbenTransmissionParams

Load McKibben transmission fields from an existing UMArm cache.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ArticulatedMcKibbenTransmission

ArticulatedMcKibbenTransmission(params: ArticulatedMcKibbenTransmissionParams)

Bases: Transmission


              flowchart TD
              soromox.actuation.mckibben.ArticulatedMcKibbenTransmission[ArticulatedMcKibbenTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.mckibben.ArticulatedMcKibbenTransmission
                


              click soromox.actuation.mckibben.ArticulatedMcKibbenTransmission href "" "soromox.actuation.mckibben.ArticulatedMcKibbenTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Pressure-work transmission using McKibben volume coordinates.

The transmission owns fixed and moving attachment geometry for grouped universal joints on a spatial articulated host. It computes effective muscle lengths, the volume-like coordinate work-conjugate to pressure, its analytic actuation matrix, and renderer-facing endpoint segments without embedding those mechanics in a particular articulated robot class.

local_segments
local_segments(q: Array) -> Array

Return group-local fixed/moving endpoint segments.

Returns:

Type Description
Array

Array with shape (num_groups, actuators_per_group, 2, 3).

Array

Endpoint axis 2 is ordered as [fixed, moving].

segments
segments(robot, q: Array) -> Array

Return world-space actuator endpoint segments for rendering.

Returns:

Type Description
Array

Array with shape (num_channels, 2, 3) whose endpoint axis is

Array

ordered as [fixed, moving].

effective_lengths
effective_lengths(q: Array) -> Array

Return effective McKibben muscle lengths.

For actuator i, the effective length is its current geometric endpoint distance minus reference_length[i] plus length_offset[i].

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return pressure-work coordinates for all McKibben muscles.

The coordinate is (B**2 - length**2) * length / (4*pi*N**2) and has volume units, making pressure its work-conjugate effort.

coordinate_jacobian
coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the pressure-work coordinate Jacobian.

The Jacobian maps generalized velocity to the rates of the volume-like coordinates work-conjugate to pressure.

Parameters:

Name Type Description Default
robot SoftRobot

Articulated robot hosting the transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

actuation_matrix
actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the analytical pressure-to-generalized-force matrix.

Parameters:

Name Type Description Default
robot SoftRobot

Articulated robot hosting the transmission.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

axial_forces
axial_forces(q: Array, pressures: Array) -> Array

Return per-muscle axial forces for the supplied pressures.

The sign convention and constitutive equation match the cached UMArm model and its MuJoCo implementation.

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

ArticulatedMcKibbenActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.mckibben.ArticulatedMcKibbenActuatorParams[ArticulatedMcKibbenActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.mckibben.ArticulatedMcKibbenActuatorParams
                


              click soromox.actuation.mckibben.ArticulatedMcKibbenActuatorParams href "" "soromox.actuation.mckibben.ArticulatedMcKibbenActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

McKibben transmission and pressure bounds.

validate_structure
validate_structure() -> None

Validate McKibben actuator parameter structure.

validate_values
validate_values() -> None

Validate eager nested McKibben transmission values.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ArticulatedMcKibbenActuator

ArticulatedMcKibbenActuator(*, params: ArticulatedMcKibbenActuatorParams, labels: tuple[str, ...] | None = None, name: str = 'mckibben_muscles')

Bases: Actuator


              flowchart TD
              soromox.actuation.mckibben.ArticulatedMcKibbenActuator[ArticulatedMcKibbenActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.mckibben.ArticulatedMcKibbenActuator
                


              click soromox.actuation.mckibben.ArticulatedMcKibbenActuator href "" "soromox.actuation.mckibben.ArticulatedMcKibbenActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Direct-pressure McKibben muscle actuator.

Controls are pressures in pascals. The transmission supplies equivalent volume coordinates, while diagnostic helpers expose effective lengths, endpoint segments, and signed axial forces. Installation requires a spatial articulated robot implementing the kinematic-frame contract; continuum hosts must use an appropriate continuum transmission instead.

empty classmethod
empty(actuators_per_group: int = 4) -> ArticulatedMcKibbenActuator

Construct a zero-channel actuator with fixed empty group topology.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts
efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

threadlike

Fixed and configuration-dependent routing for threadlike actuation.

RoutingSolverOptions

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.RoutingSolverOptions[RoutingSolverOptions]

              

              click soromox.actuation.threadlike.RoutingSolverOptions href "" "soromox.actuation.threadlike.RoutingSolverOptions"
            

Separate numerical termination, physical feasibility, and sensitivity checks.

Attributes:

Name Type Description
max_steps int

Positive upper bound on SLSQP iterations.

tolerance float

Dimensionless SLSQP termination tolerance.

endpoint_tolerance float

Maximum endpoint position residual in metres.

wall_tolerance float

Maximum radial wall penetration in metres, also applied to the continuous-span clearance bound by the routing strategy.

optimality_tolerance float

Maximum normalized stationarity residual for forward routing and its analytical envelope force evaluation.

complementarity_tolerance float

Maximum normalized multiplier/residual product.

dual_tolerance float

Maximum allowed negative wall multiplier magnitude.

sensitivity_tolerance float

Stricter normalized KKT residual limit for derivatives through the optimized coefficients. Forward acceptance alone does not certify these derivatives.

active_tolerance float

Wall residual threshold used to identify active constraints; also the strict complementarity margin for derivatives.

regularization float

Positive diagonal addition to the primal KKT Hessian during sensitivity solves, after checking the original matrix rank.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

BaseThreadlikeRouting

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.BaseThreadlikeRouting[BaseThreadlikeRouting]

              

              click soromox.actuation.threadlike.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.BaseThreadlikeRouting"
            

Supply physical path geometry independently of actuator sign and scale.

Transmissions delegate to this contract rather than robot-specific hooks. Path lengths are in metres. Velocity Jacobians include zero floating-base columns for internal paths. Each strategy retains its geometry, solver settings, and parameter type.

Attributes:

Name Type Description
params BaseSystemParams

Numerical geometry and static topology of the routing strategy.

num_paths abstractmethod property
num_paths: int

Return the number of physical filaments in the routing family.

Returns:

Type Description
int

Number of paths, each corresponding to one actuator channel.

path_lengths abstractmethod
path_lengths(robot: SoftRobot, q: Array) -> Array

Evaluate the physical length of every routed path.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the strategy's required kinematics.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Physical lengths in metres with shape (self.num_paths,), before

Array

applying actuator coordinate signs or scales.

path_velocity_jacobian abstractmethod
path_velocity_jacobian(robot: SoftRobot, q: Array) -> Array

Map generalized velocities to physical path-length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the strategy's required kinematics.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Jacobian with shape (self.num_paths, robot.num_velocities).

Array

Multiplication by generalized velocity gives length rates in metres

Array

per second. Internal paths have zero floating-base columns.

path_positions abstractmethod
path_positions(robot: SoftRobot, q: Array, s: Array) -> Array

Sample each path at a reference backbone station.

Guided strategies parameterize each span by its backbone interval. At a moving joint, the station selects the upstream guide; use the strategy's span sampling API to represent both guides and their cable connection explicitly.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host defining world-frame path positions.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
s Array

Scalar reference backbone station in metres, clamped to each path's endpoints.

required

Returns:

Type Description
Array

World positions in metres with shape (self.num_paths, 2) for

Array

planar hosts or (self.num_paths, 3) for spatial hosts.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

with_params abstractmethod
with_params(params: BaseSystemParams) -> BaseThreadlikeRouting

Replace numerical geometry while preserving topology and settings.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement parameters of the strategy's existing type, with the same path count and connectivity.

required

Returns:

Type Description
BaseThreadlikeRouting

Routing with updated parameter leaves and preserved runtime

BaseThreadlikeRouting

callbacks, discretization, and solver settings where applicable.

Raises:

Type Description
TypeError

The replacement parameter type is incompatible.

ValueError

Parameters are invalid or change routing topology.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot abstractmethod
validate_structure_for_robot(robot: SoftRobot) -> None

Check host compatibility without reading traced parameter values.

Parameters:

Name Type Description Default
robot SoftRobot

Host whose kinematic interface and segment topology must support this routing strategy.

required

Raises:

Type Description
TypeError

The host lacks a required interface.

ValueError

Routing shapes or connectivity are incompatible with the host.

validate_values_for_robot abstractmethod
validate_values_for_robot(robot: SoftRobot) -> None

Check concrete routing geometry against the host.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying physical geometry. Call this check with concrete numerical values, after structure validation.

required

Raises:

Type Description
ValueError

Numerical geometry violates a strategy or host restriction, such as nonplanar offsets on a planar robot.

ThreadlikeActuator

ThreadlikeActuator(*, params: ThreadlikeActuatorParams, routing: BaseThreadlikeRouting | None = None, friction: ThreadlikeFriction | None = None, labels: tuple[str, ...], units: str | tuple[str, ...], name: str, kind: ThreadlikeKind)

Bases: Actuator


              flowchart TD
              soromox.actuation.threadlike.ThreadlikeActuator[ThreadlikeActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.threadlike.ThreadlikeActuator
                


              click soromox.actuation.threadlike.ThreadlikeActuator href "" "soromox.actuation.threadlike.ThreadlikeActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Vectorized threadlike actuator with modality-specific presets.

Construct a vectorized threadlike actuator.

Prefer the modality-specific constructors such as :meth:tendons or :meth:push_rods when their effort sign conventions apply.

params property

Return the actuator parameter tree.

transmission property
transmission: ThreadlikeTransmission

Return the threadlike transmission.

effort_model property
effort_model: DirectEffort

Return the direct commanded-effort model.

metadata property
metadata: ActuatorMetadata

Return channel labels, units, kind, and bounds.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts
efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

tendons classmethod
tendons(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct tension-only tendons with shortening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized tendon actuator with one channel per path.

push_rods classmethod
push_rods(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct compression push rods with lengthening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized push-rod actuator with one channel per path.

muscles classmethod
muscles(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct tensile muscles with shortening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized muscle actuator with one channel per path.

pressure_chambers classmethod
pressure_chambers(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, effective_areas: Array, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct pressure chambers scaled by their effective areas.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
effective_areas Array

Effective area of each chamber with shape (num_paths,).

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized pressure-chamber actuator with one channel per path.

with_params
with_params(params: BaseSystemParams) -> ThreadlikeActuator

Return a copy carrying replacement actuator parameter leaves.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement threadlike-actuator parameters.

required

Returns:

Type Description
ThreadlikeActuator

Actuator with updated differentiable parameter leaves.

Raises:

Type Description
TypeError

If params has the wrong parameter type.

ValueError

If params changes the routing topology.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate routing and friction structure for the host robot.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete routing and friction values for the host robot.

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return physical routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.num_channels,).

path_velocities
path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return physical routed-path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.num_channels,).

path_poses
path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.num_channels, 2) for planar

Array

hosts or (self.num_channels, 3) for spatial hosts.

ThreadlikeActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.ThreadlikeActuatorParams[ThreadlikeActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.ThreadlikeActuatorParams
                


              click soromox.actuation.threadlike.ThreadlikeActuatorParams href "" "soromox.actuation.threadlike.ThreadlikeActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Physical and control parameters for a threadlike actuator family.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__
__check_init__() -> None

Validate newly constructed threadlike-actuator parameters.

validate_structure
validate_structure() -> None

Validate threadlike actuator parameter structure.

validate_values
validate_values() -> None

Validate eager nested threadlike transmission values.

ThreadlikeImpedance

ThreadlikeImpedance(*, routing: BaseThreadlikeRouting | ThreadlikeRoutingParameters, stiffness: Array, damping: Array, rest_length: Array, name: str = 'passive_threadlike')

Bases: PassiveElement


              flowchart TD
              soromox.actuation.threadlike.ThreadlikeImpedance[ThreadlikeImpedance]
              soromox.actuation.core.PassiveElement[PassiveElement]

                              soromox.actuation.core.PassiveElement --> soromox.actuation.threadlike.ThreadlikeImpedance
                


              click soromox.actuation.threadlike.ThreadlikeImpedance href "" "soromox.actuation.threadlike.ThreadlikeImpedance"
              click soromox.actuation.core.PassiveElement href "" "soromox.actuation.core.PassiveElement"
            

Passive spring-damper mechanics along threadlike paths.

Construct passive spring-damper paths.

Parameters:

Name Type Description Default
routing BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
stiffness Array

One axial stiffness per path.

required
damping Array

One axial damping coefficient per path.

required
rest_length Array

One undeformed length per path.

required
name str

Human-readable passive-element name.

'passive_threadlike'
params property

Return the passive element parameters.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

passive_force
passive_force(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this element's elastic and damping effort.

Parameters:

Name Type Description Default
robot SoftRobot

Robot on which the passive element is installed.

required
q Array

Configuration, shape (robot.num_coordinates,).

required
qd Array

Generalized velocity, shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Required passive effort, shape (robot.num_velocities,). Its

Array

negative is the force applied by the element to the robot.

with_params
with_params(params: BaseSystemParams) -> ThreadlikeImpedance

Return a copy carrying replacement impedance parameters.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement threadlike-impedance parameters.

required

Returns:

Type Description
ThreadlikeImpedance

Passive element with updated differentiable parameter leaves.

Raises:

Type Description
TypeError

If params has the wrong parameter type.

ValueError

If params changes the routing topology.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate routing structure for the host robot.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete routing values for the host robot.

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return the raw lengths of the passive routed paths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.routing.num_paths,).

path_length_jacobian
path_length_jacobian(robot: SoftRobot, q: Array) -> Array

Return the Jacobian of passive physical path lengths.

The Jacobian maps generalized velocity to passive path-length rate.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_l Array

Path-length Jacobian with shape (self.routing.num_paths, robot.num_velocities).

path_velocities
path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return the raw length rates of the passive routed paths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.routing.num_paths,).

path_poses
path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return passive routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.routing.num_paths, 2) for

Array

planar hosts or (self.routing.num_paths, 3) for spatial hosts.

elastic_force
elastic_force(robot: SoftRobot, q: Array) -> Array

Return conservative generalized spring force from the paths.

damping_matrix
damping_matrix(robot: SoftRobot, q: Array) -> Array

Return generalized viscous damping from the routed paths.

elastic_energy
elastic_energy(robot: SoftRobot, q: Array) -> Array

Return elastic energy stored in the routed springs.

ThreadlikeImpedanceParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.ThreadlikeImpedanceParams[ThreadlikeImpedanceParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.ThreadlikeImpedanceParams
                


              click soromox.actuation.threadlike.ThreadlikeImpedanceParams href "" "soromox.actuation.threadlike.ThreadlikeImpedanceParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Spring-damper parameters for passive routed paths.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__
__check_init__() -> None

Validate newly constructed impedance parameters.

validate_structure
validate_structure() -> None

Validate threadlike impedance parameter structure.

validate_values
validate_values() -> None

Validate eager nested threadlike routing values.

ThreadlikeTransmission

ThreadlikeTransmission(params: ThreadlikeTransmissionParams, *, routing: BaseThreadlikeRouting | None = None, friction: ThreadlikeFriction | None = None)

Bases: Transmission


              flowchart TD
              soromox.actuation.threadlike.ThreadlikeTransmission[ThreadlikeTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.threadlike.ThreadlikeTransmission
                


              click soromox.actuation.threadlike.ThreadlikeTransmission href "" "soromox.actuation.threadlike.ThreadlikeTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Map scaled path lengths and anchor efforts to robot coordinates.

Construct a runtime transmission from matching parameter objects.

Parameters:

Name Type Description Default
params ThreadlikeTransmissionParams

Nested routing, coordinate-scale, and friction parameters.

required
routing BaseThreadlikeRouting | None

Runtime strategy, including any custom callbacks or solver settings. Omission reconstructs the built-in strategy from its parameter type using default settings.

None
friction ThreadlikeFriction | None

Runtime effort-ratio law. Frictionless behavior is reconstructed automatically when this argument is omitted.

None
num_channels property
num_channels: int

Return the number of independently routed paths.

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return scaled routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate coordinates with shape (self.num_channels,).

coordinate_jacobian
coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the scaled path-coordinate Jacobian.

The Jacobian maps generalized velocity to actuator-coordinate velocity as yd_a = J_a(q) @ qd.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

actuation_matrix
actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the anchor-effort to generalized-force map.

Friction weights each local contribution by its surviving effort ratio, so this matrix need not equal :meth:coordinate_jacobian transposed.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return unscaled physical routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.num_channels,).

path_length_jacobian
path_length_jacobian(robot: SoftRobot, q: Array) -> Array

Return the unscaled physical path-length Jacobian.

This Jacobian maps generalized velocity to physical path-length rate.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_l Array

Path-length Jacobian with shape (self.num_channels, robot.num_velocities).

path_velocities
path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return unscaled physical path-length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.num_channels,).

path_poses
path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.num_channels, 2) for planar

Array

hosts or (self.num_channels, 3) for spatial hosts.

with_params

Return a copy carrying replacement transmission parameter leaves.

update_params
update_params(**updates: Any) -> ThreadlikeTransmission

Return a copy with replaced transmission parameter leaves.

ThreadlikeTransmissionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.ThreadlikeTransmissionParams[ThreadlikeTransmissionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.ThreadlikeTransmissionParams
                


              click soromox.actuation.threadlike.ThreadlikeTransmissionParams href "" "soromox.actuation.threadlike.ThreadlikeTransmissionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Routing, work-coordinate scale, and friction parameters per path.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__
__check_init__() -> None

Validate newly constructed transmission parameters.

validate_structure
validate_structure() -> None

Validate threadlike transmission parameter structure.

validate_values
validate_values() -> None

Validate eager nested routing and friction values.

BaseThreadlikeRoutingParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.BaseThreadlikeRoutingParams[BaseThreadlikeRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.BaseThreadlikeRoutingParams
                


              click soromox.actuation.threadlike.BaseThreadlikeRoutingParams href "" "soromox.actuation.threadlike.BaseThreadlikeRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Base PyTree contract for vectorized threadlike routing parameters.

num_paths property
num_paths: int

Return the number of routed paths represented by the parameters.

start_segment_index_array property
start_segment_index_array: Array

Return the first active segment of every routed path.

Returns:

Type Description
Array

Start indices with shape (self.num_paths,).

end_segment_index_array property
end_segment_index_array: Array

Return the last active segment of every routed path.

Returns:

Type Description
Array

End indices with shape (self.num_paths,).

validate_structure
validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values
validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_structure_for_robot
validate_structure_for_robot(num_segments: int) -> None

Validate path spans against a host robot's segment count.

Parameters:

Name Type Description Default
num_segments int

Number of continuum body segments in the host robot.

required

Raises:

Type Description
ValueError

If a path span falls outside the host robot or its start index follows its end index.

assert_same_topology
assert_same_topology(other: BaseThreadlikeRoutingParams) -> None

Reject a replacement that changes routing type, count, or spans.

Parameters:

Name Type Description Default
other BaseThreadlikeRoutingParams

Candidate replacement routing parameters.

required

Raises:

Type Description
ValueError

If other changes the parameter type, number of paths, or segment spans.

replace
replace(**updates: Any) -> BaseThreadlikeRoutingParams

Replace numeric fields while keeping routing topology immutable.

LinearThreadlikeRoutingParams

Bases: BaseThreadlikeRoutingParams


              flowchart TD
              soromox.actuation.threadlike.LinearThreadlikeRoutingParams[LinearThreadlikeRoutingParams]
              soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams[BaseThreadlikeRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams --> soromox.actuation.threadlike.LinearThreadlikeRoutingParams
                                soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams
                



              click soromox.actuation.threadlike.LinearThreadlikeRoutingParams href "" "soromox.actuation.threadlike.LinearThreadlikeRoutingParams"
              click soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams href "" "soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Batched linear material-frame routing and contiguous segment spans.

intercept and slope have shape (num_paths, 3) in the local material frame. Because SoRoMoX aligns the backbone with the local x-axis, their x-components must be zero; the remaining components describe the path within each material-frame cross-section.

start_segment_index_array property
start_segment_index_array: Array

Return the first active segment of every routed path.

Returns:

Type Description
Array

Start indices with shape (self.num_paths,).

end_segment_index_array property
end_segment_index_array: Array

Return the last active segment of every routed path.

Returns:

Type Description
Array

End indices with shape (self.num_paths,).

num_paths property
num_paths: int

Return the number of linear paths.

replace
replace(**updates: Any) -> BaseThreadlikeRoutingParams

Replace numeric fields while keeping routing topology immutable.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_structure_for_robot
validate_structure_for_robot(num_segments: int) -> None

Validate path spans against a host robot's segment count.

Parameters:

Name Type Description Default
num_segments int

Number of continuum body segments in the host robot.

required

Raises:

Type Description
ValueError

If a path span falls outside the host robot or its start index follows its end index.

assert_same_topology
assert_same_topology(other: BaseThreadlikeRoutingParams) -> None

Reject a replacement that changes routing type, count, or spans.

Parameters:

Name Type Description Default
other BaseThreadlikeRoutingParams

Candidate replacement routing parameters.

required

Raises:

Type Description
ValueError

If other changes the parameter type, number of paths, or segment spans.

__check_init__
__check_init__() -> None

Validate newly constructed linear-routing parameters.

empty classmethod

Construct an empty linear-routing parameter batch.

validate_structure
validate_structure() -> None

Validate linear-routing array shapes and segment-span topology.

validate_values
validate_values() -> None

Validate eager linear-routing values.

ThreadlikeRouting

Bases: BaseThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.ThreadlikeRouting[ThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.ThreadlikeRouting
                


              click soromox.actuation.threadlike.ThreadlikeRouting href "" "soromox.actuation.threadlike.ThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Runtime routing object for a batched fixed material-frame path family.

num_paths property
num_paths: int

Return the number of paths represented by the routing family.

has_analytical_second_derivative property
has_analytical_second_derivative: bool

Return whether the routing supplies the derivative needed for turn.

Returns:

Type Description
bool

Whether an explicit second-derivative function is installed or all

bool

routing callbacks are the built-in linear functions.

linear classmethod
linear(*, intercept: Array, slope: Array | float = 0.0, start_segment_index: int | tuple[int, ...] | Array = 0, end_segment_index: int | tuple[int, ...] | Array = 0) -> ThreadlikeRouting

Construct linear cross-section paths in the local material frame.

The final array axis is [x, y, z]. Local x follows the backbone, so the x-components of intercept and slope must both be zero.

Parameters:

Name Type Description Default
intercept Array

Offset at zero backbone abscissa with shape (3,) or (num_paths, 3).

required
slope Array | float

Constant offset derivative, either scalar or shaped (3,) or (num_paths, 3).

0.0
start_segment_index int | tuple[int, ...] | Array

First segment traversed by each path.

0
end_segment_index int | tuple[int, ...] | Array

Last segment traversed by each path.

0

Returns:

Type Description
ThreadlikeRouting

Vectorized linear routing family.

offset
offset(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Material-frame offset with shape (3,).

derivative
derivative(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset derivative.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

First backbone-abscissa derivative with shape (3,).

second_derivative
second_derivative(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset second derivative.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Second backbone-abscissa derivative with shape (3,).

Raises:

Type Description
ValueError

If a custom routing does not provide an analytical second_derivative_fn.

with_params

Return a routing with new values and unchanged runtime functions.

update_params
update_params(**updates: Any) -> ThreadlikeRouting

Return a routing with selected parameter leaves replaced.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate the fixed path topology and host hooks.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing integration hooks and segment topology.

required

Raises:

Type Description
TypeError

The host lacks the required integration or segment data.

ValueError

A path span exceeds the host or a routing callback returns offsets with an incompatible shape.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate material offsets, including the planar restriction.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with concrete segment lengths and material frame conventions.

required

Raises:

Type Description
ValueError

Routing parameters are invalid or sampled offsets leave the local-y direction required by a planar host.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Validate the derivatives required by a fixed-path friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model paired with this routing.

required

Raises:

Type Description
ValueError

Nonzero friction requires an analytical second derivative that the routing does not provide.

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return physical path lengths, independent of rigid base motion.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing length integration.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Physical lengths in metres with shape (self.num_paths,). Actuator coordinate signs and scales are not applied.

path_velocity_jacobian
path_velocity_jacobian(robot: SoftRobot, q: Array) -> Array

Return length-rate derivatives with zero floating-base columns.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing length derivatives.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Jacobian with shape (self.num_paths, robot.num_velocities). Multiplication by generalized velocity gives physical path length rates in metres per second.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Integrate length-conjugate efforts with optional fixed-path friction.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the fixed-routing force integral.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this routing.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths). Floating-base rows are zero; actuator signs and scales have not been applied.

Raises:

Type Description
ValueError

The routing lacks the analytical derivatives required by the friction model.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array) -> Array

Return world positions with stations clamped to each path's ends.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing world positions.

required
q Array

Configuration with shape (robot.num_coordinates,), including the runtime base pose for floating hosts.

required
s Array

Scalar reference backbone station in metres.

required

Returns:

Type Description
Array

World positions in metres with shape (self.num_paths, 2) for planar hosts or (self.num_paths, 3) for spatial hosts.

ConfigurationDependentThreadlikeRouting

Bases: BaseThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.ConfigurationDependentThreadlikeRouting
                


              click soromox.actuation.threadlike.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Interface for configuration-dependent filament routing.

A path represents one physical filament; a span is a portion between prescribed guides. Strategies return resolved geometry; optimizers also return their state explicitly for warm starts.

Attributes:

Name Type Description
params BaseSystemParams

Strategy parameters containing numerical geometry and static topology.

spans RoutingSpanParams

Shared guide geometry and mapping of spans to physical paths.

num_paths property
num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

spans abstractmethod property

Return shared endpoints and connectivity.

Returns:

Name Type Description
result RoutingSpanParams

RoutingSpanParams containing guide offsets and span-to-path connectivity.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

path_lengths
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_length_jacobian abstractmethod
path_length_jacobian(robot, configuration, solution=None)

Evaluate the analytical length derivative at a resolved route.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying guide and material kinematics.

required
configuration Array

Host configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution for this routing and configuration; omission resolves the route once.

None

Returns:

Name Type Description
result Array

Length Jacobian, shape (num_paths, num_coordinates).

path_velocity_jacobian
path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

span_positions abstractmethod
span_positions(robot, configuration, solution, span_index, fractions)

Sample a resolved span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying forward kinematics.

required
configuration Array

Host configuration, shape (num_coordinates,).

required
solution RoutingSolution

Solution at this configuration.

required
span_index int

Static span index.

required
fractions Array

One-dimensional sample fractions in [0, 1].

required

Returns:

Name Type Description
result Array

World positions, shape (num_samples, 3), in metres. Fractions parameterize the backbone interval for optimized routes and the straight line for straight spans.

with_params
with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

validate_structure_for_robot
validate_structure_for_robot(robot) -> None

Validate segment bounds and prescribed guides at moving joints.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with static segment topology.

required

Raises:

Type Description
ValueError

Span connectivity is incompatible with the host.

validate_values_for_robot
validate_values_for_robot(robot) -> None

Validate guide geometry and positive finite segment lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with material frame conventions.

required

Raises:

Type Description
ValueError

Host lengths or guide offsets are invalid.

solve_routing abstractmethod
solve_routing(robot, configuration, *, initial_guess=None) -> RoutingSolution

Resolve all physical paths for a robot configuration.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required
configuration Array

Generalized configuration, shape (robot.num_coordinates,).

required
initial_guess RoutingSolution | None

Previous RoutingSolution with matching span topology, or None.

None

Returns:

Name Type Description
result RoutingSolution

RoutingSolution with resolved spans, guide connections, and total path lengths.

RoutingGuideSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.RoutingGuideSolution[RoutingGuideSolution]

              

              click soromox.actuation.threadlike.RoutingGuideSolution href "" "soromox.actuation.threadlike.RoutingGuideSolution"
            

Straight connection between prescribed guides on adjacent spans.

Attributes:

Name Type Description
downstream_span int

Index of the span entered after this connection.

length Array

Cable length in metres, including separation due to joint motion.

displacement Array

Downstream guide minus upstream guide in the upstream material frame, shape (3,).

differentiable Array

Whether the connection has a configuration derivative. Always coincident guides have zero length and derivative. A moving connection collapsing to zero length has an undefined derivative.

RoutingSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.RoutingSolution[RoutingSolution]

              

              click soromox.actuation.threadlike.RoutingSolution href "" "soromox.actuation.threadlike.RoutingSolution"
            

Solved spans and connecting guides, grouped into physical filament paths.

Attributes:

Name Type Description
spans tuple[RoutingSpanSolution | StraightSpanSolution, ...]

Resolved portions between prescribed guides, in input span order.

path_lengths Array

Total lengths in metres, shape (num_paths,), including straight connections between adjacent spans of the same path.

guides tuple[RoutingGuideSolution, ...]

Straight connections in downstream span order. An empty tuple means every physical path consists of a single span.

length_jacobian Array | None

Optional cached path derivatives in configuration coordinates, including connecting guides. Straight routing supplies this during its shared geometry evaluation.

converged property
converged

Check the independent convergence diagnostics.

Returns:

Name Type Description
result Array

Scalar boolean indicating that every span satisfies the solve and physical clearance checks and guide lengths are finite.

RoutingSpanParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.RoutingSpanParams[RoutingSpanParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.RoutingSpanParams
                


              click soromox.actuation.threadlike.RoutingSpanParams href "" "soromox.actuation.threadlike.RoutingSpanParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Shared endpoints and topology, with one row per guided span.

Offsets have shape (num_spans, 3) in metres and local [0, y, z] order. A path is one physical filament, associated with one actuator channel. A span is the portion between prescribed guides inside one or more continuous sections. Segment indices are inclusive. Spans of each path must be ordered and contiguous; a numerical segment boundary inside a span does not add a guide. Adjacent spans are connected by a straight cable between their prescribed exit and entry guides.

Parameters live alongside their routing strategy, following the existing threadlike actuation API. This shared class also serves other strategies.

Attributes:

Name Type Description
start_offset Array

Entry guide offsets, shape (num_spans, 3), in metres in each entry segment's material frame. Longitudinal entries are zero.

end_offset Array

Exit guide offsets, shape (num_spans, 3), in metres in each exit segment's material frame.

span_path_index tuple[int, ...]

Physical path assigned to each span. Indices are contiguous from zero; multiple spans can belong to the same path.

start_segment_index tuple[int, ...]

Inclusive entry segment for each span.

end_segment_index tuple[int, ...]

Inclusive exit segment for each span.

num_spans property
num_spans: int

Return the number of spans.

Returns:

Name Type Description
result int

Number of guided portions represented by the topology.

num_paths property
num_paths: int

Return the number of physical paths.

Returns:

Name Type Description
result int

Number of physical filament paths represented by the topology.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

validate_structure
validate_structure()

Validate shapes and immutable connectivity without reading tracers.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values
validate_values()

Validate finite transverse guide offsets.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

validate_structure_for_robot
validate_structure_for_robot(robot)

Check span bounds against the host segment count.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid host topology or unsupported span crossings raise an exception.

validate_values_for_robot
validate_values_for_robot(robot)

Check transverse geometry in aligned continuum segment frames.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid concrete host or guide geometry raises ValueError.

assert_same_topology
assert_same_topology(other)

Reject changes in span connectivity or parameter type.

Parameters:

Name Type Description Default
other BaseSystemParams

Replacement parameters whose static topology must match this object.

required

Returns:

Name Type Description
result None

None. Changed parameter types, shapes, or connectivity raise ValueError.

replace
replace(**updates: Any)

Replace numeric geometry while retaining span topology.

Parameters:

Name Type Description Default
updates Any

Named parameter replacements; numeric geometry can change while topology is retained.

{}

Returns:

Name Type Description
result RoutingSpanParams

New parameter object with validated geometry and unchanged static topology.

RoutingSpanSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.RoutingSpanSolution[RoutingSpanSolution]

              

              click soromox.actuation.threadlike.RoutingSpanSolution href "" "soromox.actuation.threadlike.RoutingSpanSolution"
            

One solved span and normalized KKT diagnostics.

Coefficients are nodal transverse slopes d(offset)/ds, shaped (nodes, 2) in space or (nodes, 1) in the plane. Multipliers use normalized objectives/constraints and the nonpositive wall convention. dense_wall_violation is measured in metres. Convergence also requires the continuous interpolation bound to meet the physical wall tolerance.

Attributes:

Name Type Description
coefficients Array

Physical transverse offset slopes, shape (nodes, 1 or 2).

knots Array

Global reference backbone coordinates in metres, shape (nodes,).

length Array

Integrated span length in metres.

equality_multipliers Array

Endpoint constraint multipliers, shape (1 or 2,).

inequality_multipliers Array

Wall multipliers, shape (wall_samples,).

active_mask Array

Active sampled wall constraints, shape (wall_samples,).

converged Array

Scalar boolean from independent optimality and feasibility checks.

iterations Array

Scalar SLSQP iteration count.

primal_residual Array

Maximum normalized endpoint or wall constraint violation.

stationarity_residual Array

Maximum absolute normalized Lagrangian gradient.

complementarity_residual Array

Maximum absolute wall residual times multiplier.

dense_wall_violation Array

Maximum sampled penetration in metres on the checking grid.

wall_violation_bound Array

Conservative upper bound on penetration between checking points, in metres, using the quadratic offset interpolation error on each element. Included in convergence acceptance.

StraightSpanSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.StraightSpanSolution[StraightSpanSolution]

              

              click soromox.actuation.threadlike.StraightSpanSolution href "" "soromox.actuation.threadlike.StraightSpanSolution"
            

A straight span between prescribed guides, with no optimization state.

Attributes:

Name Type Description
start_position Array

World entry guide, shape (3,), in metres.

end_position Array

World exit guide, shape (3,), in metres.

length Array

Distance between guides in metres.

length_jacobian Array

Analytical configuration derivative, shape (num_coordinates,), with zero base columns.

converged Array

Whether endpoints are finite and the span has positive length.

CircularLumenParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.CircularLumenParams[CircularLumenParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.CircularLumenParams
                


              click soromox.actuation.threadlike.CircularLumenParams href "" "soromox.actuation.threadlike.CircularLumenParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Circular hollow interiors available to the routed filament.

The lumen is the empty passage inside a hollow section, bounded by its inner wall. It is centered on the backbone in every material cross section.

Attributes:

Name Type Description
inner_radius Array

Positive inner radii in metres, shape (num_segments,). Radii are constant within each segment and exclude the wall thickness.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

constant classmethod
constant(radius, num_segments: int)

Broadcast one radius to an explicitly sized segment array.

Parameters:

Name Type Description Default
radius float | Array

Positive inner radius in metres.

required
num_segments int

Number of host segments to receive the radius.

required

Returns:

Name Type Description
result CircularLumenParams

CircularLumenParams with radius array shaped (num_segments,).

validate_structure
validate_structure()

Validate parameter shapes and connectivity.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values
validate_values()

Validate concrete parameter values.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

PiecewiseLinearRoutingDiscretization

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.PiecewiseLinearRoutingDiscretization[PiecewiseLinearRoutingDiscretization]

              

              click soromox.actuation.threadlike.PiecewiseLinearRoutingDiscretization href "" "soromox.actuation.threadlike.PiecewiseLinearRoutingDiscretization"
            

Piecewise linear slope basis, independent of the host strain basis.

Nodal values describe transverse offset derivatives along the backbone. Integrating this basis gives piecewise quadratic offsets.

Attributes:

Name Type Description
elements_per_segment int

Number of uniform slope elements in each segment.

quadrature_order int

Gauss points per element for length integration.

constraint_samples_per_element int

Gauss points per element for wall constraints.

validation_samples_per_element int

Uniform checking intervals per element; both endpoints are included, giving one more point than intervals.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

ShortestPathRouting

Bases: ConfigurationDependentThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.ShortestPathRouting[ShortestPathRouting]
              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.threadlike.ShortestPathRouting
                                soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
                



              click soromox.actuation.threadlike.ShortestPathRouting href "" "soromox.actuation.threadlike.ShortestPathRouting"
              click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Shortest feasible paths through hollow sections and prescribed guides.

A path represents one physical tendon or filament. A span is the portion between two prescribed guides, optimized inside one or more continuous hollow sections. Adjacent spans of a path are connected by a straight cable. A lumen is the hollow interior available to the filament.

The host supplies material strains, their basis, and joint guide kinematics. Floating bases and moving joints are supported. Spans must end at moving joints so the upstream and downstream guide offsets can be prescribed. Derivatives solve the converged KKT equations for a fixed active set. Slack, friction, joint obstacle geometry, and rod bending stiffness are excluded.

Attributes:

Name Type Description
params ShortestPathRoutingParams

Guide offsets, span topology, and circular lumen dimensions.

discretization PiecewiseLinearRoutingDiscretization

Piecewise linear slope mesh and sampling counts.

solver_options RoutingSolverOptions

Physical feasibility, solver, and sensitivity tolerances.

References

Mathew, A. T., Alkayas, A. Y., Alshehhi, A. A. S., Adamu, Y. A., Taha, T., & Renda, F. (2026). A Differentiable Framework for Hollow Tendon-Driven Continuum Robots With Implicit Internal Routing. IEEE Transactions on Robotics, 42, 3009-3027. doi:10.1109/TRO.2026.3714660.

num_paths property
num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

spans property
spans

Return the shared span parameters.

Returns:

Name Type Description
result RoutingSpanParams

RoutingSpanParams containing guide offsets and span-to-path connectivity.

path_lengths
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_velocity_jacobian
path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

with_params
with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot
validate_structure_for_robot(robot)

Check host topology and span compatibility.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid host topology or unsupported span crossings raise an exception.

validate_values_for_robot
validate_values_for_robot(robot)

Validate concrete host and guide geometry.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid concrete host or guide geometry raises ValueError.

solve_routing
solve_routing(robot, configuration, *, initial_guess=None)

Solve all spans and return lengths, coefficients, and diagnostics.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host implementing the material routing interface.

required
configuration Array

Host generalized coordinates.

required
initial_guess RoutingSolution | None

Previous RoutingSolution with identical topology.

None

Returns:

Name Type Description
result RoutingSolution

A RoutingSolution. Inspect converged and dense wall violations before using a route. Invalid input geometry raises eagerly.

span_offsets
span_offsets(solution: RoutingSolution, span_index: int, points: Array)

Sample material-frame offsets at global backbone coordinates.

Parameters:

Name Type Description Default
solution RoutingSolution

RoutingSolution containing resolved spans and solver diagnostics.

required
span_index int

Zero-based index of the requested span.

required
points Array

Global reference backbone sample coordinates in metres, shape (points,).

required

Returns:

Name Type Description
result Array

Material-frame offsets in metres with shape (points, 3).

span_positions
span_positions(robot, configuration, solution, span_index, fractions)

Sample an optimized span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying forward kinematics.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution

Resolved routing at this configuration.

required
span_index int

Static span index.

required
fractions Array

One-dimensional fractions of the backbone interval.

required

Returns:

Name Type Description
result Array

World positions in metres, shape (num_samples, 3).

path_length_jacobian
path_length_jacobian(robot, configuration, solution: RoutingSolution | None = None)

Evaluate the optimal length gradient at an already solved route.

The envelope identity applies because the material-frame endpoint and wall constraints are independent of configuration. The caller must supply a converged solution for this robot, configuration, and routing. On a fixed base host, positive tensions produce -jacobian.T @ tension. Use the velocity Jacobian to compute forces on floating base hosts.

This computes a partial derivative holding routing coefficients fixed. Differentiating this method again requires the supplied solution to retain its dependence on configuration through solve_routing. This implements the paper's tangent derivative (B2) integrated against the unit tangent, equivalently the transpose of (B5), with the envelope identity (26). It does not invoke autodiff to evaluate this Jacobian.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host implementing the material routing interface.

required
configuration Array

Generalized coordinates, shape (num_coordinates,).

required
solution RoutingSolution | None

Converged routing for this geometry and configuration. Omission solves the route once.

None

Returns:

Name Type Description
result Array

Length Jacobian, shape (num_paths, num_coordinates). Floating base columns vanish. Failed span solves and collapsed moving guide connections produce NaNs in the affected path row. Spatial floating systems use quaternion configuration coordinates; to obtain forces in velocity coordinates, use :meth:path_velocity_jacobian.

ShortestPathRoutingParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.ShortestPathRoutingParams[ShortestPathRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.ShortestPathRoutingParams
                


              click soromox.actuation.threadlike.ShortestPathRoutingParams href "" "soromox.actuation.threadlike.ShortestPathRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Compose shared guide geometry with a circular containment domain.

Attributes:

Name Type Description
spans RoutingSpanParams

Guides and connectivity shared across routing strategies.

domain CircularLumenParams

Circular lumen radii, with one value per host segment.

num_paths property
num_paths: int

Return the number of physical filaments represented by the guides.

Returns:

Type Description
int

Number of paths, each corresponding to one actuator channel.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

validate_structure
validate_structure()

Validate parameter shapes and connectivity.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values
validate_values()

Validate concrete parameter values.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

assert_same_topology
assert_same_topology(other)

Check that a replacement preserves topology.

Parameters:

Name Type Description Default
other BaseSystemParams

Replacement parameters whose static topology must match this object.

required

Returns:

Name Type Description
result None

None. Changed parameter types, shapes, or connectivity raise ValueError.

replace
replace(**updates)

Replace numeric parameters while preserving topology.

Parameters:

Name Type Description Default
updates Any

Named parameter replacements; numeric geometry can change while topology is retained.

{}

Returns:

Name Type Description
result ShortestPathRoutingParams

New parameter object with validated geometry and unchanged static topology.

StraightSpanRouting

Bases: ConfigurationDependentThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.StraightSpanRouting[StraightSpanRouting]
              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.threadlike.StraightSpanRouting
                                soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
                



              click soromox.actuation.threadlike.StraightSpanRouting href "" "soromox.actuation.threadlike.StraightSpanRouting"
              click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Straight filaments between guides that move with the robot.

A path is one physical filament. A span is the straight portion between two prescribed guides. Adjacent spans include their joint guide connection. The user must ensure that wall contact is irrelevant throughout operation. Guide kinematics determine the path directly. The model describes taut frictionless tendons and ideal straight axial members with negligible bending stiffness, operating below their buckling load.

Attributes:

Name Type Description
params RoutingSpanParams

Shared guide offsets and span connectivity.

num_paths property
num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

spans property
spans

Return the shared guide geometry and connectivity parameters.

Returns:

Name Type Description
result RoutingSpanParams

This strategy's guide geometry.

path_lengths
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_velocity_jacobian
path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

with_params
with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot
validate_structure_for_robot(robot) -> None

Validate segment bounds and prescribed guides at moving joints.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with static segment topology.

required

Raises:

Type Description
ValueError

Span connectivity is incompatible with the host.

validate_values_for_robot
validate_values_for_robot(robot) -> None

Validate guide geometry and positive finite segment lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with material frame conventions.

required

Raises:

Type Description
ValueError

Host lengths or guide offsets are invalid.

solve_routing
solve_routing(robot, configuration, *, initial_guess=None, backend=None)

Resolve straight spans and their analytical length derivatives.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying local segment and joint guide kinematics.

required
configuration Array

Configuration, shape (num_coordinates,).

required
initial_guess RoutingSolution | None

Unused; accepted for the common routing interface.

None
backend str | None

Per-call override: "auto", "jax", or "warp". None inherits robot.backend; hosts without a preference use JAX. Automatic selection uses Warp on GPU and JAX on CPU. Warp uses the optional warp-lang package for native segment kinematics, span geometry, joint connections, and path derivatives. Differentiation through the solve uses JAX.

None

Returns:

Name Type Description
result RoutingSolution

StraightSpanSolution entries. Nonfinite or collapsed spans report failed convergence and NaN derivatives.

Raises:

Type Description
ValueError

If the backend, configuration shape, or routing parameters are invalid, or Warp is requested without JAX 64-bit mode.

ImportError

If Warp is requested and warp-lang is unavailable.

path_length_jacobian
path_length_jacobian(robot, configuration, solution=None)

Return the analytical derivative of a resolved path family.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying joint guide kinematics.

required
configuration Array

Configuration matching the solution.

required
solution RoutingSolution | None

Result returned by this strategy. Omission solves the route once.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_coordinates), with zero base columns. Invalid spans or collapsed moving connections yield NaNs.

actuation_matrix
actuation_matrix(robot, configuration, *, backend=None)

Evaluate -J_velocity.T without reconstructing world guide positions.

Parameters:

Name Type Description Default
robot SoftRobot

PlanarPCS, PCS, or GVS host.

required
configuration Array

Configuration, shape (num_coordinates,).

required
backend str | None

Execution override, following :meth:solve_routing.

None

Returns:

Name Type Description
result Array

Matrix of shape (num_velocities, num_paths). Invalid geometry produces NaN internal rows for the affected paths. Floating base rows are zero because routing is base-invariant.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Return the length-conjugate effort map using the selected backend.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Frictionless runtime transmission model.

required

Returns:

Name Type Description
result Array

Force map with shape (robot.num_velocities, num_paths) before applying actuator signs and scales.

Raises:

Type Description
ValueError

The supplied friction model is not frictionless.

actuation_force
actuation_force(robot, configuration, tensions, *, backend=None)

Evaluate tendon forces directly without reconstructing world geometry.

Parameters:

Name Type Description Default
robot SoftRobot

PlanarPCS, PCS, or GVS host.

required
configuration Array

Configuration, shape (num_coordinates,).

required
tensions Array

Signed filament loads, shape (num_paths,); positive is tension and negative is ideal axial compression below buckling.

required
backend str | None

Execution override, following :meth:solve_routing.

None

Returns:

Name Type Description
result Array

Generalized force, shape (num_velocities,). Warp skips world geometry and does not materialize an actuation matrix.

span_positions
span_positions(robot, configuration, solution, span_index, fractions)

Interpolate a straight span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Unused host for the common sampling interface.

required
configuration Array

Unused configuration associated with the solution.

required
solution RoutingSolution

Routing containing world endpoint positions.

required
span_index int

Static span index.

required
fractions Array

One-dimensional interpolation fractions in [0, 1].

required

Returns:

Name Type Description
result Array

World positions in metres, shape (num_samples, 3).

linear_threadlike_routing

linear_threadlike_routing(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Evaluate linear material-frame routing offsets.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Material-frame offsets params.intercept + params.slope * s with

Array

shape (3,) or (num_paths, 3).

linear_threadlike_routing_derivative

linear_threadlike_routing_derivative(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Evaluate the first derivative of a linear routing offset.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa, used to preserve dtype and tracing.

required

Returns:

Type Description
Array

Constant slopes with shape (3,) or (num_paths, 3).

linear_threadlike_routing_second_derivative

linear_threadlike_routing_second_derivative(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Return the zero second derivative of a linear routing offset.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa, used to preserve output dtype and tracing.

required

Returns:

Type Description
Array

Zeros with the same shape as params.slope.

base

Strategy contract shared by fixed and configuration-dependent routing.

BaseThreadlikeRouting

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

              

              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Supply physical path geometry independently of actuator sign and scale.

Transmissions delegate to this contract rather than robot-specific hooks. Path lengths are in metres. Velocity Jacobians include zero floating-base columns for internal paths. Each strategy retains its geometry, solver settings, and parameter type.

Attributes:

Name Type Description
params BaseSystemParams

Numerical geometry and static topology of the routing strategy.

num_paths abstractmethod property
num_paths: int

Return the number of physical filaments in the routing family.

Returns:

Type Description
int

Number of paths, each corresponding to one actuator channel.

path_lengths abstractmethod
path_lengths(robot: SoftRobot, q: Array) -> Array

Evaluate the physical length of every routed path.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the strategy's required kinematics.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Physical lengths in metres with shape (self.num_paths,), before

Array

applying actuator coordinate signs or scales.

path_velocity_jacobian abstractmethod
path_velocity_jacobian(robot: SoftRobot, q: Array) -> Array

Map generalized velocities to physical path-length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the strategy's required kinematics.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Jacobian with shape (self.num_paths, robot.num_velocities).

Array

Multiplication by generalized velocity gives length rates in metres

Array

per second. Internal paths have zero floating-base columns.

path_positions abstractmethod
path_positions(robot: SoftRobot, q: Array, s: Array) -> Array

Sample each path at a reference backbone station.

Guided strategies parameterize each span by its backbone interval. At a moving joint, the station selects the upstream guide; use the strategy's span sampling API to represent both guides and their cable connection explicitly.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host defining world-frame path positions.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
s Array

Scalar reference backbone station in metres, clamped to each path's endpoints.

required

Returns:

Type Description
Array

World positions in metres with shape (self.num_paths, 2) for

Array

planar hosts or (self.num_paths, 3) for spatial hosts.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

with_params abstractmethod
with_params(params: BaseSystemParams) -> BaseThreadlikeRouting

Replace numerical geometry while preserving topology and settings.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement parameters of the strategy's existing type, with the same path count and connectivity.

required

Returns:

Type Description
BaseThreadlikeRouting

Routing with updated parameter leaves and preserved runtime

BaseThreadlikeRouting

callbacks, discretization, and solver settings where applicable.

Raises:

Type Description
TypeError

The replacement parameter type is incompatible.

ValueError

Parameters are invalid or change routing topology.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot abstractmethod
validate_structure_for_robot(robot: SoftRobot) -> None

Check host compatibility without reading traced parameter values.

Parameters:

Name Type Description Default
robot SoftRobot

Host whose kinematic interface and segment topology must support this routing strategy.

required

Raises:

Type Description
TypeError

The host lacks a required interface.

ValueError

Routing shapes or connectivity are incompatible with the host.

validate_values_for_robot abstractmethod
validate_values_for_robot(robot: SoftRobot) -> None

Check concrete routing geometry against the host.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying physical geometry. Call this check with concrete numerical values, after structure validation.

required

Raises:

Type Description
ValueError

Numerical geometry violates a strategy or host restriction, such as nonplanar offsets on a planar robot.

components

Transmissions, active actuators, and passive mechanics for all routing strategies.

ThreadlikeTransmissionParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.components.ThreadlikeTransmissionParams[ThreadlikeTransmissionParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.components.ThreadlikeTransmissionParams
                


              click soromox.actuation.threadlike.components.ThreadlikeTransmissionParams href "" "soromox.actuation.threadlike.components.ThreadlikeTransmissionParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Routing, work-coordinate scale, and friction parameters per path.

__check_init__
__check_init__() -> None

Validate newly constructed transmission parameters.

validate_structure
validate_structure() -> None

Validate threadlike transmission parameter structure.

validate_values
validate_values() -> None

Validate eager nested routing and friction values.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ThreadlikeTransmission
ThreadlikeTransmission(params: ThreadlikeTransmissionParams, *, routing: BaseThreadlikeRouting | None = None, friction: ThreadlikeFriction | None = None)

Bases: Transmission


              flowchart TD
              soromox.actuation.threadlike.components.ThreadlikeTransmission[ThreadlikeTransmission]
              soromox.actuation.core.Transmission[Transmission]

                              soromox.actuation.core.Transmission --> soromox.actuation.threadlike.components.ThreadlikeTransmission
                


              click soromox.actuation.threadlike.components.ThreadlikeTransmission href "" "soromox.actuation.threadlike.components.ThreadlikeTransmission"
              click soromox.actuation.core.Transmission href "" "soromox.actuation.core.Transmission"
            

Map scaled path lengths and anchor efforts to robot coordinates.

Construct a runtime transmission from matching parameter objects.

Parameters:

Name Type Description Default
params ThreadlikeTransmissionParams

Nested routing, coordinate-scale, and friction parameters.

required
routing BaseThreadlikeRouting | None

Runtime strategy, including any custom callbacks or solver settings. Omission reconstructs the built-in strategy from its parameter type using default settings.

None
friction ThreadlikeFriction | None

Runtime effort-ratio law. Frictionless behavior is reconstructed automatically when this argument is omitted.

None
num_channels property
num_channels: int

Return the number of independently routed paths.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return scaled routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate coordinates with shape (self.num_channels,).

coordinate_jacobian
coordinate_jacobian(robot: SoftRobot, q: Array) -> Array

Return the scaled path-coordinate Jacobian.

The Jacobian maps generalized velocity to actuator-coordinate velocity as yd_a = J_a(q) @ qd.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_a Array

Coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

actuation_matrix
actuation_matrix(robot: SoftRobot, q: Array) -> Array

Return the anchor-effort to generalized-force map.

Friction weights each local contribution by its surviving effort ratio, so this matrix need not equal :meth:coordinate_jacobian transposed.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
A Array

Actuation matrix with shape (robot.num_velocities, self.num_channels).

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return unscaled physical routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.num_channels,).

path_length_jacobian
path_length_jacobian(robot: SoftRobot, q: Array) -> Array

Return the unscaled physical path-length Jacobian.

This Jacobian maps generalized velocity to physical path-length rate.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_l Array

Path-length Jacobian with shape (self.num_channels, robot.num_velocities).

path_velocities
path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return unscaled physical path-length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.num_channels,).

path_poses
path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.num_channels, 2) for planar

Array

hosts or (self.num_channels, 3) for spatial hosts.

with_params

Return a copy carrying replacement transmission parameter leaves.

update_params
update_params(**updates: Any) -> ThreadlikeTransmission

Return a copy with replaced transmission parameter leaves.

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Map generalized velocities to transmission-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the transmission is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Transmission-coordinate velocities with shape (self.num_channels,).

ThreadlikeActuatorParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.components.ThreadlikeActuatorParams[ThreadlikeActuatorParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.components.ThreadlikeActuatorParams
                


              click soromox.actuation.threadlike.components.ThreadlikeActuatorParams href "" "soromox.actuation.threadlike.components.ThreadlikeActuatorParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Physical and control parameters for a threadlike actuator family.

__check_init__
__check_init__() -> None

Validate newly constructed threadlike-actuator parameters.

validate_structure
validate_structure() -> None

Validate threadlike actuator parameter structure.

validate_values
validate_values() -> None

Validate eager nested threadlike transmission values.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ThreadlikeActuator
ThreadlikeActuator(*, params: ThreadlikeActuatorParams, routing: BaseThreadlikeRouting | None = None, friction: ThreadlikeFriction | None = None, labels: tuple[str, ...], units: str | tuple[str, ...], name: str, kind: ThreadlikeKind)

Bases: Actuator


              flowchart TD
              soromox.actuation.threadlike.components.ThreadlikeActuator[ThreadlikeActuator]
              soromox.actuation.core.Actuator[Actuator]

                              soromox.actuation.core.Actuator --> soromox.actuation.threadlike.components.ThreadlikeActuator
                


              click soromox.actuation.threadlike.components.ThreadlikeActuator href "" "soromox.actuation.threadlike.components.ThreadlikeActuator"
              click soromox.actuation.core.Actuator href "" "soromox.actuation.core.Actuator"
            

Vectorized threadlike actuator with modality-specific presets.

Construct a vectorized threadlike actuator.

Prefer the modality-specific constructors such as :meth:tendons or :meth:push_rods when their effort sign conventions apply.

params property

Return the actuator parameter tree.

transmission property
transmission: ThreadlikeTransmission

Return the threadlike transmission.

effort_model property
effort_model: DirectEffort

Return the direct commanded-effort model.

metadata property
metadata: ActuatorMetadata

Return channel labels, units, kind, and bounds.

tendons classmethod
tendons(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct tension-only tendons with shortening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized tendon actuator with one channel per path.

push_rods classmethod
push_rods(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct compression push rods with lengthening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized push-rod actuator with one channel per path.

muscles classmethod
muscles(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct tensile muscles with shortening-positive coordinates.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized muscle actuator with one channel per path.

pressure_chambers classmethod
pressure_chambers(routings: BaseThreadlikeRouting | ThreadlikeRoutingParameters, *, effective_areas: Array, labels: tuple[str, ...] | None = None, friction: ThreadlikeFriction | None = None) -> ThreadlikeActuator

Construct pressure chambers scaled by their effective areas.

Parameters:

Name Type Description Default
routings BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
effective_areas Array

Effective area of each chamber with shape (num_paths,).

required
labels tuple[str, ...] | None

Optional label for each routed path.

None
friction ThreadlikeFriction | None

Optional active effort-loss model.

None

Returns:

Type Description
ThreadlikeActuator

Vectorized pressure-chamber actuator with one channel per path.

with_params
with_params(params: BaseSystemParams) -> ThreadlikeActuator

Return a copy carrying replacement actuator parameter leaves.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement threadlike-actuator parameters.

required

Returns:

Type Description
ThreadlikeActuator

Actuator with updated differentiable parameter leaves.

Raises:

Type Description
TypeError

If params has the wrong parameter type.

ValueError

If params changes the routing topology.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate routing and friction structure for the host robot.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete routing and friction values for the host robot.

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return physical routed-path lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.num_channels,).

path_velocities
path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return physical routed-path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.num_channels,).

path_poses
path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.num_channels, 2) for planar

Array

hosts or (self.num_channels, 3) for spatial hosts.

coordinates
coordinates(robot: SoftRobot, q: Array) -> Array

Return this actuator's work-conjugate coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
y_a Array

Work-conjugate actuator coordinates with shape (self.num_channels,).

velocities
velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this actuator's work-conjugate coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Name Type Description
yd_a Array

Actuator-coordinate velocities with shape (self.num_channels,).

efforts
efforts(robot: SoftRobot, q: Array, control: Array, qd: Array | None = None, *, coordinate_jacobian: Array | None = None) -> Array

Map controls to work-conjugate efforts for this actuator.

Only transmission coordinates and velocities required by the installed effort model are evaluated. A precomputed coordinate Jacobian may be supplied to reuse it when evaluating actuator-coordinate velocities.

Parameters:

Name Type Description Default
robot SoftRobot

Soft robot on which the actuator is installed.

required
q Array

Generalized coordinates of shape (robot.num_coordinates,).

required
control Array

Controls for this actuator with shape (self.num_channels,).

required
qd Array | None

Optional generalized velocities of shape (robot.num_velocities,). If omitted for a velocity-dependent effort model, zero generalized velocity is used.

None
coordinate_jacobian Array | None

Optional precomputed coordinate Jacobian with shape (self.num_channels, robot.num_velocities).

None

Returns:

Name Type Description
e Array

Work-conjugate actuator efforts with shape (self.num_channels,).

Raises:

Type Description
ValueError

If coordinate_jacobian has an incompatible shape.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

ThreadlikeImpedanceParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.components.ThreadlikeImpedanceParams[ThreadlikeImpedanceParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.components.ThreadlikeImpedanceParams
                


              click soromox.actuation.threadlike.components.ThreadlikeImpedanceParams href "" "soromox.actuation.threadlike.components.ThreadlikeImpedanceParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Spring-damper parameters for passive routed paths.

__check_init__
__check_init__() -> None

Validate newly constructed impedance parameters.

validate_structure
validate_structure() -> None

Validate threadlike impedance parameter structure.

validate_values
validate_values() -> None

Validate eager nested threadlike routing values.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ThreadlikeImpedance
ThreadlikeImpedance(*, routing: BaseThreadlikeRouting | ThreadlikeRoutingParameters, stiffness: Array, damping: Array, rest_length: Array, name: str = 'passive_threadlike')

Bases: PassiveElement


              flowchart TD
              soromox.actuation.threadlike.components.ThreadlikeImpedance[ThreadlikeImpedance]
              soromox.actuation.core.PassiveElement[PassiveElement]

                              soromox.actuation.core.PassiveElement --> soromox.actuation.threadlike.components.ThreadlikeImpedance
                


              click soromox.actuation.threadlike.components.ThreadlikeImpedance href "" "soromox.actuation.threadlike.components.ThreadlikeImpedance"
              click soromox.actuation.core.PassiveElement href "" "soromox.actuation.core.PassiveElement"
            

Passive spring-damper mechanics along threadlike paths.

Construct passive spring-damper paths.

Parameters:

Name Type Description Default
routing BaseThreadlikeRouting | ThreadlikeRoutingParameters

Fixed, straight-span, or shortest-path routing geometry.

required
stiffness Array

One axial stiffness per path.

required
damping Array

One axial damping coefficient per path.

required
rest_length Array

One undeformed length per path.

required
name str

Human-readable passive-element name.

'passive_threadlike'
params property

Return the passive element parameters.

with_params
with_params(params: BaseSystemParams) -> ThreadlikeImpedance

Return a copy carrying replacement impedance parameters.

Parameters:

Name Type Description Default
params BaseSystemParams

Replacement threadlike-impedance parameters.

required

Returns:

Type Description
ThreadlikeImpedance

Passive element with updated differentiable parameter leaves.

Raises:

Type Description
TypeError

If params has the wrong parameter type.

ValueError

If params changes the routing topology.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate routing structure for the host robot.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate concrete routing values for the host robot.

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return the raw lengths of the passive routed paths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Path lengths with shape (self.routing.num_paths,).

path_length_jacobian
path_length_jacobian(robot: SoftRobot, q: Array) -> Array

Return the Jacobian of passive physical path lengths.

The Jacobian maps generalized velocity to passive path-length rate.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required

Returns:

Name Type Description
J_l Array

Path-length Jacobian with shape (self.routing.num_paths, robot.num_velocities).

path_velocities
path_velocities(robot: SoftRobot, q: Array, qd: Array) -> Array

Return the raw length rates of the passive routed paths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
qd Array

Generalized velocities with shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Path-length rates with shape (self.routing.num_paths,).

path_poses
path_poses(robot: SoftRobot, q: Array, s: Array) -> Array

Return passive routed-path positions at a backbone abscissa.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum robot hosting the routing.

required
q Array

Generalized coordinates with shape (robot.num_coordinates,).

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Path positions with shape (self.routing.num_paths, 2) for

Array

planar hosts or (self.routing.num_paths, 3) for spatial hosts.

elastic_force
elastic_force(robot: SoftRobot, q: Array) -> Array

Return conservative generalized spring force from the paths.

damping_matrix
damping_matrix(robot: SoftRobot, q: Array) -> Array

Return generalized viscous damping from the routed paths.

elastic_energy
elastic_energy(robot: SoftRobot, q: Array) -> Array

Return elastic energy stored in the routed springs.

validate_for_robot
validate_for_robot(robot: SoftRobot) -> None

Validate robot compatibility without concretizing dynamic leaves.

passive_force
passive_force(robot: SoftRobot, q: Array, qd: Array) -> Array

Return this element's elastic and damping effort.

Parameters:

Name Type Description Default
robot SoftRobot

Robot on which the passive element is installed.

required
q Array

Configuration, shape (robot.num_coordinates,).

required
qd Array

Generalized velocity, shape (robot.num_velocities,).

required

Returns:

Type Description
Array

Required passive effort, shape (robot.num_velocities,). Its

Array

negative is the force applied by the element to the robot.

fixed_routing

Fixed material-frame routing for threadlike continuum actuators.

BaseThreadlikeRoutingParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams[BaseThreadlikeRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams
                


              click soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams href "" "soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Base PyTree contract for vectorized threadlike routing parameters.

num_paths property
num_paths: int

Return the number of routed paths represented by the parameters.

start_segment_index_array property
start_segment_index_array: Array

Return the first active segment of every routed path.

Returns:

Type Description
Array

Start indices with shape (self.num_paths,).

end_segment_index_array property
end_segment_index_array: Array

Return the last active segment of every routed path.

Returns:

Type Description
Array

End indices with shape (self.num_paths,).

validate_structure_for_robot
validate_structure_for_robot(num_segments: int) -> None

Validate path spans against a host robot's segment count.

Parameters:

Name Type Description Default
num_segments int

Number of continuum body segments in the host robot.

required

Raises:

Type Description
ValueError

If a path span falls outside the host robot or its start index follows its end index.

assert_same_topology
assert_same_topology(other: BaseThreadlikeRoutingParams) -> None

Reject a replacement that changes routing type, count, or spans.

Parameters:

Name Type Description Default
other BaseThreadlikeRoutingParams

Candidate replacement routing parameters.

required

Raises:

Type Description
ValueError

If other changes the parameter type, number of paths, or segment spans.

replace
replace(**updates: Any) -> BaseThreadlikeRoutingParams

Replace numeric fields while keeping routing topology immutable.

validate_structure
validate_structure() -> None

Validate statically observable parameter structure.

Returns:

Type Description
None

None. Subclasses override this hook to raise on invalid types,

None

shapes, PyTree layout, or static topology. Implementations must be

None

safe when array leaves are JAX tracers.

validate_values
validate_values() -> None

Validate eager value-dependent parameter invariants.

Returns:

Type Description
None

None. Subclasses override this hook for finiteness, physical

None

domains, symmetry, and other checks requiring concrete values.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

LinearThreadlikeRoutingParams

Bases: BaseThreadlikeRoutingParams


              flowchart TD
              soromox.actuation.threadlike.fixed_routing.LinearThreadlikeRoutingParams[LinearThreadlikeRoutingParams]
              soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams[BaseThreadlikeRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams --> soromox.actuation.threadlike.fixed_routing.LinearThreadlikeRoutingParams
                                soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams
                



              click soromox.actuation.threadlike.fixed_routing.LinearThreadlikeRoutingParams href "" "soromox.actuation.threadlike.fixed_routing.LinearThreadlikeRoutingParams"
              click soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams href "" "soromox.actuation.threadlike.fixed_routing.BaseThreadlikeRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Batched linear material-frame routing and contiguous segment spans.

intercept and slope have shape (num_paths, 3) in the local material frame. Because SoRoMoX aligns the backbone with the local x-axis, their x-components must be zero; the remaining components describe the path within each material-frame cross-section.

num_paths property
num_paths: int

Return the number of linear paths.

start_segment_index_array property
start_segment_index_array: Array

Return the first active segment of every routed path.

Returns:

Type Description
Array

Start indices with shape (self.num_paths,).

end_segment_index_array property
end_segment_index_array: Array

Return the last active segment of every routed path.

Returns:

Type Description
Array

End indices with shape (self.num_paths,).

__check_init__
__check_init__() -> None

Validate newly constructed linear-routing parameters.

empty classmethod

Construct an empty linear-routing parameter batch.

validate_structure
validate_structure() -> None

Validate linear-routing array shapes and segment-span topology.

validate_values
validate_values() -> None

Validate eager linear-routing values.

replace
replace(**updates: Any) -> BaseThreadlikeRoutingParams

Replace numeric fields while keeping routing topology immutable.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

validate_structure_for_robot
validate_structure_for_robot(num_segments: int) -> None

Validate path spans against a host robot's segment count.

Parameters:

Name Type Description Default
num_segments int

Number of continuum body segments in the host robot.

required

Raises:

Type Description
ValueError

If a path span falls outside the host robot or its start index follows its end index.

assert_same_topology
assert_same_topology(other: BaseThreadlikeRoutingParams) -> None

Reject a replacement that changes routing type, count, or spans.

Parameters:

Name Type Description Default
other BaseThreadlikeRoutingParams

Candidate replacement routing parameters.

required

Raises:

Type Description
ValueError

If other changes the parameter type, number of paths, or segment spans.

ThreadlikeRouting

Bases: BaseThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.fixed_routing.ThreadlikeRouting[ThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.fixed_routing.ThreadlikeRouting
                


              click soromox.actuation.threadlike.fixed_routing.ThreadlikeRouting href "" "soromox.actuation.threadlike.fixed_routing.ThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Runtime routing object for a batched fixed material-frame path family.

num_paths property
num_paths: int

Return the number of paths represented by the routing family.

has_analytical_second_derivative property
has_analytical_second_derivative: bool

Return whether the routing supplies the derivative needed for turn.

Returns:

Type Description
bool

Whether an explicit second-derivative function is installed or all

bool

routing callbacks are the built-in linear functions.

linear classmethod
linear(*, intercept: Array, slope: Array | float = 0.0, start_segment_index: int | tuple[int, ...] | Array = 0, end_segment_index: int | tuple[int, ...] | Array = 0) -> ThreadlikeRouting

Construct linear cross-section paths in the local material frame.

The final array axis is [x, y, z]. Local x follows the backbone, so the x-components of intercept and slope must both be zero.

Parameters:

Name Type Description Default
intercept Array

Offset at zero backbone abscissa with shape (3,) or (num_paths, 3).

required
slope Array | float

Constant offset derivative, either scalar or shaped (3,) or (num_paths, 3).

0.0
start_segment_index int | tuple[int, ...] | Array

First segment traversed by each path.

0
end_segment_index int | tuple[int, ...] | Array

Last segment traversed by each path.

0

Returns:

Type Description
ThreadlikeRouting

Vectorized linear routing family.

offset
offset(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Material-frame offset with shape (3,).

derivative
derivative(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset derivative.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

First backbone-abscissa derivative with shape (3,).

second_derivative
second_derivative(path_params: BaseThreadlikeRoutingParams, s: Array) -> Array

Evaluate one path's material-frame offset second derivative.

Parameters:

Name Type Description Default
path_params BaseThreadlikeRoutingParams

Parameters of one routed path.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Second backbone-abscissa derivative with shape (3,).

Raises:

Type Description
ValueError

If a custom routing does not provide an analytical second_derivative_fn.

with_params

Return a routing with new values and unchanged runtime functions.

update_params
update_params(**updates: Any) -> ThreadlikeRouting

Return a routing with selected parameter leaves replaced.

validate_structure_for_robot
validate_structure_for_robot(robot: SoftRobot) -> None

Validate the fixed path topology and host hooks.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing integration hooks and segment topology.

required

Raises:

Type Description
TypeError

The host lacks the required integration or segment data.

ValueError

A path span exceeds the host or a routing callback returns offsets with an incompatible shape.

validate_values_for_robot
validate_values_for_robot(robot: SoftRobot) -> None

Validate material offsets, including the planar restriction.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with concrete segment lengths and material frame conventions.

required

Raises:

Type Description
ValueError

Routing parameters are invalid or sampled offsets leave the local-y direction required by a planar host.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Validate the derivatives required by a fixed-path friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model paired with this routing.

required

Raises:

Type Description
ValueError

Nonzero friction requires an analytical second derivative that the routing does not provide.

path_lengths
path_lengths(robot: SoftRobot, q: Array) -> Array

Return physical path lengths, independent of rigid base motion.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing length integration.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Physical lengths in metres with shape (self.num_paths,). Actuator coordinate signs and scales are not applied.

path_velocity_jacobian
path_velocity_jacobian(robot: SoftRobot, q: Array) -> Array

Return length-rate derivatives with zero floating-base columns.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing length derivatives.

required
q Array

Configuration with shape (robot.num_coordinates,).

required

Returns:

Type Description
Array

Jacobian with shape (self.num_paths, robot.num_velocities). Multiplication by generalized velocity gives physical path length rates in metres per second.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Integrate length-conjugate efforts with optional fixed-path friction.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying the fixed-routing force integral.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this routing.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths). Floating-base rows are zero; actuator signs and scales have not been applied.

Raises:

Type Description
ValueError

The routing lacks the analytical derivatives required by the friction model.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array) -> Array

Return world positions with stations clamped to each path's ends.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host supplying fixed-routing world positions.

required
q Array

Configuration with shape (robot.num_coordinates,), including the runtime base pose for floating hosts.

required
s Array

Scalar reference backbone station in metres.

required

Returns:

Type Description
Array

World positions in metres with shape (self.num_paths, 2) for planar hosts or (self.num_paths, 3) for spatial hosts.

linear_threadlike_routing
linear_threadlike_routing(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Evaluate linear material-frame routing offsets.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa.

required

Returns:

Type Description
Array

Material-frame offsets params.intercept + params.slope * s with

Array

shape (3,) or (num_paths, 3).

linear_threadlike_routing_derivative
linear_threadlike_routing_derivative(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Evaluate the first derivative of a linear routing offset.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa, used to preserve dtype and tracing.

required

Returns:

Type Description
Array

Constant slopes with shape (3,) or (num_paths, 3).

linear_threadlike_routing_second_derivative
linear_threadlike_routing_second_derivative(params: LinearThreadlikeRoutingParams, s: Array) -> Array

Return the zero second derivative of a linear routing offset.

Parameters:

Name Type Description Default
params LinearThreadlikeRoutingParams

Linear routing parameters for one path or a path batch.

required
s Array

Scalar backbone abscissa, used to preserve output dtype and tracing.

required

Returns:

Type Description
Array

Zeros with the same shape as params.slope.

routing

Shared geometry, solutions, and interfaces for configuration-dependent routing.

RoutingSpanParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.routing.RoutingSpanParams[RoutingSpanParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.routing.RoutingSpanParams
                


              click soromox.actuation.threadlike.routing.RoutingSpanParams href "" "soromox.actuation.threadlike.routing.RoutingSpanParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Shared endpoints and topology, with one row per guided span.

Offsets have shape (num_spans, 3) in metres and local [0, y, z] order. A path is one physical filament, associated with one actuator channel. A span is the portion between prescribed guides inside one or more continuous sections. Segment indices are inclusive. Spans of each path must be ordered and contiguous; a numerical segment boundary inside a span does not add a guide. Adjacent spans are connected by a straight cable between their prescribed exit and entry guides.

Parameters live alongside their routing strategy, following the existing threadlike actuation API. This shared class also serves other strategies.

Attributes:

Name Type Description
start_offset Array

Entry guide offsets, shape (num_spans, 3), in metres in each entry segment's material frame. Longitudinal entries are zero.

end_offset Array

Exit guide offsets, shape (num_spans, 3), in metres in each exit segment's material frame.

span_path_index tuple[int, ...]

Physical path assigned to each span. Indices are contiguous from zero; multiple spans can belong to the same path.

start_segment_index tuple[int, ...]

Inclusive entry segment for each span.

end_segment_index tuple[int, ...]

Inclusive exit segment for each span.

num_spans property
num_spans: int

Return the number of spans.

Returns:

Name Type Description
result int

Number of guided portions represented by the topology.

num_paths property
num_paths: int

Return the number of physical paths.

Returns:

Name Type Description
result int

Number of physical filament paths represented by the topology.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

validate_structure
validate_structure()

Validate shapes and immutable connectivity without reading tracers.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values
validate_values()

Validate finite transverse guide offsets.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

validate_structure_for_robot
validate_structure_for_robot(robot)

Check span bounds against the host segment count.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid host topology or unsupported span crossings raise an exception.

validate_values_for_robot
validate_values_for_robot(robot)

Check transverse geometry in aligned continuum segment frames.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid concrete host or guide geometry raises ValueError.

assert_same_topology
assert_same_topology(other)

Reject changes in span connectivity or parameter type.

Parameters:

Name Type Description Default
other BaseSystemParams

Replacement parameters whose static topology must match this object.

required

Returns:

Name Type Description
result None

None. Changed parameter types, shapes, or connectivity raise ValueError.

replace
replace(**updates: Any)

Replace numeric geometry while retaining span topology.

Parameters:

Name Type Description Default
updates Any

Named parameter replacements; numeric geometry can change while topology is retained.

{}

Returns:

Name Type Description
result RoutingSpanParams

New parameter object with validated geometry and unchanged static topology.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

RoutingSpanSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.routing.RoutingSpanSolution[RoutingSpanSolution]

              

              click soromox.actuation.threadlike.routing.RoutingSpanSolution href "" "soromox.actuation.threadlike.routing.RoutingSpanSolution"
            

One solved span and normalized KKT diagnostics.

Coefficients are nodal transverse slopes d(offset)/ds, shaped (nodes, 2) in space or (nodes, 1) in the plane. Multipliers use normalized objectives/constraints and the nonpositive wall convention. dense_wall_violation is measured in metres. Convergence also requires the continuous interpolation bound to meet the physical wall tolerance.

Attributes:

Name Type Description
coefficients Array

Physical transverse offset slopes, shape (nodes, 1 or 2).

knots Array

Global reference backbone coordinates in metres, shape (nodes,).

length Array

Integrated span length in metres.

equality_multipliers Array

Endpoint constraint multipliers, shape (1 or 2,).

inequality_multipliers Array

Wall multipliers, shape (wall_samples,).

active_mask Array

Active sampled wall constraints, shape (wall_samples,).

converged Array

Scalar boolean from independent optimality and feasibility checks.

iterations Array

Scalar SLSQP iteration count.

primal_residual Array

Maximum normalized endpoint or wall constraint violation.

stationarity_residual Array

Maximum absolute normalized Lagrangian gradient.

complementarity_residual Array

Maximum absolute wall residual times multiplier.

dense_wall_violation Array

Maximum sampled penetration in metres on the checking grid.

wall_violation_bound Array

Conservative upper bound on penetration between checking points, in metres, using the quadratic offset interpolation error on each element. Included in convergence acceptance.

StraightSpanSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.routing.StraightSpanSolution[StraightSpanSolution]

              

              click soromox.actuation.threadlike.routing.StraightSpanSolution href "" "soromox.actuation.threadlike.routing.StraightSpanSolution"
            

A straight span between prescribed guides, with no optimization state.

Attributes:

Name Type Description
start_position Array

World entry guide, shape (3,), in metres.

end_position Array

World exit guide, shape (3,), in metres.

length Array

Distance between guides in metres.

length_jacobian Array

Analytical configuration derivative, shape (num_coordinates,), with zero base columns.

converged Array

Whether endpoints are finite and the span has positive length.

RoutingSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.routing.RoutingSolution[RoutingSolution]

              

              click soromox.actuation.threadlike.routing.RoutingSolution href "" "soromox.actuation.threadlike.routing.RoutingSolution"
            

Solved spans and connecting guides, grouped into physical filament paths.

Attributes:

Name Type Description
spans tuple[RoutingSpanSolution | StraightSpanSolution, ...]

Resolved portions between prescribed guides, in input span order.

path_lengths Array

Total lengths in metres, shape (num_paths,), including straight connections between adjacent spans of the same path.

guides tuple[RoutingGuideSolution, ...]

Straight connections in downstream span order. An empty tuple means every physical path consists of a single span.

length_jacobian Array | None

Optional cached path derivatives in configuration coordinates, including connecting guides. Straight routing supplies this during its shared geometry evaluation.

converged property
converged

Check the independent convergence diagnostics.

Returns:

Name Type Description
result Array

Scalar boolean indicating that every span satisfies the solve and physical clearance checks and guide lengths are finite.

RoutingGuideSolution

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.routing.RoutingGuideSolution[RoutingGuideSolution]

              

              click soromox.actuation.threadlike.routing.RoutingGuideSolution href "" "soromox.actuation.threadlike.routing.RoutingGuideSolution"
            

Straight connection between prescribed guides on adjacent spans.

Attributes:

Name Type Description
downstream_span int

Index of the span entered after this connection.

length Array

Cable length in metres, including separation due to joint motion.

displacement Array

Downstream guide minus upstream guide in the upstream material frame, shape (3,).

differentiable Array

Whether the connection has a configuration derivative. Always coincident guides have zero length and derivative. A moving connection collapsing to zero length has an undefined derivative.

ConfigurationDependentThreadlikeRouting

Bases: BaseThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
                


              click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Interface for configuration-dependent filament routing.

A path represents one physical filament; a span is a portion between prescribed guides. Strategies return resolved geometry; optimizers also return their state explicitly for warm starts.

Attributes:

Name Type Description
params BaseSystemParams

Strategy parameters containing numerical geometry and static topology.

spans RoutingSpanParams

Shared guide geometry and mapping of spans to physical paths.

num_paths property
num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

spans abstractmethod property

Return shared endpoints and connectivity.

Returns:

Name Type Description
result RoutingSpanParams

RoutingSpanParams containing guide offsets and span-to-path connectivity.

path_lengths
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_length_jacobian abstractmethod
path_length_jacobian(robot, configuration, solution=None)

Evaluate the analytical length derivative at a resolved route.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying guide and material kinematics.

required
configuration Array

Host configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution for this routing and configuration; omission resolves the route once.

None

Returns:

Name Type Description
result Array

Length Jacobian, shape (num_paths, num_coordinates).

path_velocity_jacobian
path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

span_positions abstractmethod
span_positions(robot, configuration, solution, span_index, fractions)

Sample a resolved span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying forward kinematics.

required
configuration Array

Host configuration, shape (num_coordinates,).

required
solution RoutingSolution

Solution at this configuration.

required
span_index int

Static span index.

required
fractions Array

One-dimensional sample fractions in [0, 1].

required

Returns:

Name Type Description
result Array

World positions, shape (num_samples, 3), in metres. Fractions parameterize the backbone interval for optimized routes and the straight line for straight spans.

with_params
with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

validate_structure_for_robot
validate_structure_for_robot(robot) -> None

Validate segment bounds and prescribed guides at moving joints.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with static segment topology.

required

Raises:

Type Description
ValueError

Span connectivity is incompatible with the host.

validate_values_for_robot
validate_values_for_robot(robot) -> None

Validate guide geometry and positive finite segment lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with material frame conventions.

required

Raises:

Type Description
ValueError

Host lengths or guide offsets are invalid.

solve_routing abstractmethod
solve_routing(robot, configuration, *, initial_guess=None) -> RoutingSolution

Resolve all physical paths for a robot configuration.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required
configuration Array

Generalized configuration, shape (robot.num_coordinates,).

required
initial_guess RoutingSolution | None

Previous RoutingSolution with matching span topology, or None.

None

Returns:

Name Type Description
result RoutingSolution

RoutingSolution with resolved spans, guide connections, and total path lengths.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

shortest_path

Configuration-dependent shortest paths inside circular continuum lumens.

CircularLumenParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.shortest_path.CircularLumenParams[CircularLumenParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.shortest_path.CircularLumenParams
                


              click soromox.actuation.threadlike.shortest_path.CircularLumenParams href "" "soromox.actuation.threadlike.shortest_path.CircularLumenParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Circular hollow interiors available to the routed filament.

The lumen is the empty passage inside a hollow section, bounded by its inner wall. It is centered on the backbone in every material cross section.

Attributes:

Name Type Description
inner_radius Array

Positive inner radii in metres, shape (num_segments,). Radii are constant within each segment and exclude the wall thickness.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

constant classmethod
constant(radius, num_segments: int)

Broadcast one radius to an explicitly sized segment array.

Parameters:

Name Type Description Default
radius float | Array

Positive inner radius in metres.

required
num_segments int

Number of host segments to receive the radius.

required

Returns:

Name Type Description
result CircularLumenParams

CircularLumenParams with radius array shaped (num_segments,).

validate_structure
validate_structure()

Validate parameter shapes and connectivity.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values
validate_values()

Validate concrete parameter values.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

replace
replace(**updates: Any) -> BaseSystemParams

Return an immutable copy with selected fields replaced.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and their replacement values. Nested parameter components should first be replaced with their own replace method, then supplied as a top-level field.

{}

Returns:

Type Description
BaseSystemParams

A validated parameter PyTree of the same concrete class.

Raises:

Type Description
KeyError

If any update names an unknown parameter field.

TypeError

If a replacement cannot be inserted into the PyTree.

ValueError

If validation of the resulting parameters fails.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

ShortestPathRoutingParams

Bases: BaseSystemParams


              flowchart TD
              soromox.actuation.threadlike.shortest_path.ShortestPathRoutingParams[ShortestPathRoutingParams]
              soromox.systems.params.BaseSystemParams[BaseSystemParams]

                              soromox.systems.params.BaseSystemParams --> soromox.actuation.threadlike.shortest_path.ShortestPathRoutingParams
                


              click soromox.actuation.threadlike.shortest_path.ShortestPathRoutingParams href "" "soromox.actuation.threadlike.shortest_path.ShortestPathRoutingParams"
              click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
            

Compose shared guide geometry with a circular containment domain.

Attributes:

Name Type Description
spans RoutingSpanParams

Guides and connectivity shared across routing strategies.

domain CircularLumenParams

Circular lumen radii, with one value per host segment.

num_paths property
num_paths: int

Return the number of physical filaments represented by the guides.

Returns:

Type Description
int

Number of paths, each corresponding to one actuator channel.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

validate_structure
validate_structure()

Validate parameter shapes and connectivity.

Returns:

Name Type Description
result None

None. Invalid shapes or connectivity raise ValueError or TypeError.

validate_values
validate_values()

Validate concrete parameter values.

Returns:

Name Type Description
result None

None. Invalid concrete geometry raises ValueError.

assert_same_topology
assert_same_topology(other)

Check that a replacement preserves topology.

Parameters:

Name Type Description Default
other BaseSystemParams

Replacement parameters whose static topology must match this object.

required

Returns:

Name Type Description
result None

None. Changed parameter types, shapes, or connectivity raise ValueError.

replace
replace(**updates)

Replace numeric parameters while preserving topology.

Parameters:

Name Type Description Default
updates Any

Named parameter replacements; numeric geometry can change while topology is retained.

{}

Returns:

Name Type Description
result ShortestPathRoutingParams

New parameter object with validated geometry and unchanged static topology.

validate
validate() -> None

Validate both parameter structure and eager numeric values.

validate_for_update
validate_for_update() -> None

Validate values when concrete and structure when dynamically traced.

validate_structure_compatibility
validate_structure_compatibility(structure: Any) -> None

Validate statically observable compatibility with a model structure.

validate_value_compatibility
validate_value_compatibility(structure: Any) -> None

Validate eager value compatibility with a model structure.

validate_against_structure
validate_against_structure(structure: Any) -> None

Validate parameters fully against static construction choices.

Parameters:

Name Type Description Default
structure Any

System-specific static structure to validate against.

required

Returns:

Type Description
None

None after successful validation.

Raises:

Type Description
ValueError

If intrinsic or structure-dependent validation fails.

validate_for_update_against_structure
validate_for_update_against_structure(structure: Any) -> None

Validate concrete values and traced structure against a model.

PiecewiseLinearRoutingDiscretization

Bases: Module


              flowchart TD
              soromox.actuation.threadlike.shortest_path.PiecewiseLinearRoutingDiscretization[PiecewiseLinearRoutingDiscretization]

              

              click soromox.actuation.threadlike.shortest_path.PiecewiseLinearRoutingDiscretization href "" "soromox.actuation.threadlike.shortest_path.PiecewiseLinearRoutingDiscretization"
            

Piecewise linear slope basis, independent of the host strain basis.

Nodal values describe transverse offset derivatives along the backbone. Integrating this basis gives piecewise quadratic offsets.

Attributes:

Name Type Description
elements_per_segment int

Number of uniform slope elements in each segment.

quadrature_order int

Gauss points per element for length integration.

constraint_samples_per_element int

Gauss points per element for wall constraints.

validation_samples_per_element int

Uniform checking intervals per element; both endpoints are included, giving one more point than intervals.

__check_init__
__check_init__()

Validate parameters after construction.

Returns:

Name Type Description
result None

None. Invalid parameter values raise ValueError or TypeError.

ShortestPathRouting

Bases: ConfigurationDependentThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.shortest_path.ShortestPathRouting[ShortestPathRouting]
              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.threadlike.shortest_path.ShortestPathRouting
                                soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
                



              click soromox.actuation.threadlike.shortest_path.ShortestPathRouting href "" "soromox.actuation.threadlike.shortest_path.ShortestPathRouting"
              click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Shortest feasible paths through hollow sections and prescribed guides.

A path represents one physical tendon or filament. A span is the portion between two prescribed guides, optimized inside one or more continuous hollow sections. Adjacent spans of a path are connected by a straight cable. A lumen is the hollow interior available to the filament.

The host supplies material strains, their basis, and joint guide kinematics. Floating bases and moving joints are supported. Spans must end at moving joints so the upstream and downstream guide offsets can be prescribed. Derivatives solve the converged KKT equations for a fixed active set. Slack, friction, joint obstacle geometry, and rod bending stiffness are excluded.

Attributes:

Name Type Description
params ShortestPathRoutingParams

Guide offsets, span topology, and circular lumen dimensions.

discretization PiecewiseLinearRoutingDiscretization

Piecewise linear slope mesh and sampling counts.

solver_options RoutingSolverOptions

Physical feasibility, solver, and sensitivity tolerances.

References

Mathew, A. T., Alkayas, A. Y., Alshehhi, A. A. S., Adamu, Y. A., Taha, T., & Renda, F. (2026). A Differentiable Framework for Hollow Tendon-Driven Continuum Robots With Implicit Internal Routing. IEEE Transactions on Robotics, 42, 3009-3027. doi:10.1109/TRO.2026.3714660.

spans property
spans

Return the shared span parameters.

Returns:

Name Type Description
result RoutingSpanParams

RoutingSpanParams containing guide offsets and span-to-path connectivity.

num_paths property
num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

validate_structure_for_robot
validate_structure_for_robot(robot)

Check host topology and span compatibility.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid host topology or unsupported span crossings raise an exception.

validate_values_for_robot
validate_values_for_robot(robot)

Validate concrete host and guide geometry.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host providing material strains and guide kinematics.

required

Returns:

Name Type Description
result None

None. Invalid concrete host or guide geometry raises ValueError.

solve_routing
solve_routing(robot, configuration, *, initial_guess=None)

Solve all spans and return lengths, coefficients, and diagnostics.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host implementing the material routing interface.

required
configuration Array

Host generalized coordinates.

required
initial_guess RoutingSolution | None

Previous RoutingSolution with identical topology.

None

Returns:

Name Type Description
result RoutingSolution

A RoutingSolution. Inspect converged and dense wall violations before using a route. Invalid input geometry raises eagerly.

span_offsets
span_offsets(solution: RoutingSolution, span_index: int, points: Array)

Sample material-frame offsets at global backbone coordinates.

Parameters:

Name Type Description Default
solution RoutingSolution

RoutingSolution containing resolved spans and solver diagnostics.

required
span_index int

Zero-based index of the requested span.

required
points Array

Global reference backbone sample coordinates in metres, shape (points,).

required

Returns:

Name Type Description
result Array

Material-frame offsets in metres with shape (points, 3).

span_positions
span_positions(robot, configuration, solution, span_index, fractions)

Sample an optimized span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying forward kinematics.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution

Resolved routing at this configuration.

required
span_index int

Static span index.

required
fractions Array

One-dimensional fractions of the backbone interval.

required

Returns:

Name Type Description
result Array

World positions in metres, shape (num_samples, 3).

path_length_jacobian
path_length_jacobian(robot, configuration, solution: RoutingSolution | None = None)

Evaluate the optimal length gradient at an already solved route.

The envelope identity applies because the material-frame endpoint and wall constraints are independent of configuration. The caller must supply a converged solution for this robot, configuration, and routing. On a fixed base host, positive tensions produce -jacobian.T @ tension. Use the velocity Jacobian to compute forces on floating base hosts.

This computes a partial derivative holding routing coefficients fixed. Differentiating this method again requires the supplied solution to retain its dependence on configuration through solve_routing. This implements the paper's tangent derivative (B2) integrated against the unit tangent, equivalently the transpose of (B5), with the envelope identity (26). It does not invoke autodiff to evaluate this Jacobian.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host implementing the material routing interface.

required
configuration Array

Generalized coordinates, shape (num_coordinates,).

required
solution RoutingSolution | None

Converged routing for this geometry and configuration. Omission solves the route once.

None

Returns:

Name Type Description
result Array

Length Jacobian, shape (num_paths, num_coordinates). Floating base columns vanish. Failed span solves and collapsed moving guide connections produce NaNs in the affected path row. Spatial floating systems use quaternion configuration coordinates; to obtain forces in velocity coordinates, use :meth:path_velocity_jacobian.

path_lengths
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_velocity_jacobian
path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Map length-conjugate efforts to generalized forces before scaling.

Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving the generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Runtime effort-loss model supported by this strategy.

required

Returns:

Type Description
Array

Force map with shape (robot.num_velocities, self.num_paths).

Array

The default implementation returns the transpose of the physical

Array

length-rate Jacobian.

Raises:

Type Description
ValueError

The strategy does not support the friction model.

with_params
with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

straight_span

Closed-form routing between prescribed guides without wall contact.

StraightSpanRouting

Bases: ConfigurationDependentThreadlikeRouting


              flowchart TD
              soromox.actuation.threadlike.straight_span.StraightSpanRouting[StraightSpanRouting]
              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
              soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]

                              soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.threadlike.straight_span.StraightSpanRouting
                                soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
                



              click soromox.actuation.threadlike.straight_span.StraightSpanRouting href "" "soromox.actuation.threadlike.straight_span.StraightSpanRouting"
              click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
              click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
            

Straight filaments between guides that move with the robot.

A path is one physical filament. A span is the straight portion between two prescribed guides. Adjacent spans include their joint guide connection. The user must ensure that wall contact is irrelevant throughout operation. Guide kinematics determine the path directly. The model describes taut frictionless tendons and ideal straight axial members with negligible bending stiffness, operating below their buckling load.

Attributes:

Name Type Description
params RoutingSpanParams

Shared guide offsets and span connectivity.

spans property
spans

Return the shared guide geometry and connectivity parameters.

Returns:

Name Type Description
result RoutingSpanParams

This strategy's guide geometry.

num_paths property
num_paths: int

Return the number of physical paths rather than guided spans.

Returns:

Type Description
int

Number of filaments, each corresponding to one actuator channel.

solve_routing
solve_routing(robot, configuration, *, initial_guess=None, backend=None)

Resolve straight spans and their analytical length derivatives.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying local segment and joint guide kinematics.

required
configuration Array

Configuration, shape (num_coordinates,).

required
initial_guess RoutingSolution | None

Unused; accepted for the common routing interface.

None
backend str | None

Per-call override: "auto", "jax", or "warp". None inherits robot.backend; hosts without a preference use JAX. Automatic selection uses Warp on GPU and JAX on CPU. Warp uses the optional warp-lang package for native segment kinematics, span geometry, joint connections, and path derivatives. Differentiation through the solve uses JAX.

None

Returns:

Name Type Description
result RoutingSolution

StraightSpanSolution entries. Nonfinite or collapsed spans report failed convergence and NaN derivatives.

Raises:

Type Description
ValueError

If the backend, configuration shape, or routing parameters are invalid, or Warp is requested without JAX 64-bit mode.

ImportError

If Warp is requested and warp-lang is unavailable.

path_length_jacobian
path_length_jacobian(robot, configuration, solution=None)

Return the analytical derivative of a resolved path family.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying joint guide kinematics.

required
configuration Array

Configuration matching the solution.

required
solution RoutingSolution | None

Result returned by this strategy. Omission solves the route once.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_coordinates), with zero base columns. Invalid spans or collapsed moving connections yield NaNs.

actuation_matrix
actuation_matrix(robot, configuration, *, backend=None)

Evaluate -J_velocity.T without reconstructing world guide positions.

Parameters:

Name Type Description Default
robot SoftRobot

PlanarPCS, PCS, or GVS host.

required
configuration Array

Configuration, shape (num_coordinates,).

required
backend str | None

Execution override, following :meth:solve_routing.

None

Returns:

Name Type Description
result Array

Matrix of shape (num_velocities, num_paths). Invalid geometry produces NaN internal rows for the affected paths. Floating base rows are zero because routing is base-invariant.

path_force_matrix
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array

Return the length-conjugate effort map using the selected backend.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host receiving generalized forces.

required
q Array

Configuration with shape (robot.num_coordinates,).

required
friction ThreadlikeFriction

Frictionless runtime transmission model.

required

Returns:

Name Type Description
result Array

Force map with shape (robot.num_velocities, num_paths) before applying actuator signs and scales.

Raises:

Type Description
ValueError

The supplied friction model is not frictionless.

actuation_force
actuation_force(robot, configuration, tensions, *, backend=None)

Evaluate tendon forces directly without reconstructing world geometry.

Parameters:

Name Type Description Default
robot SoftRobot

PlanarPCS, PCS, or GVS host.

required
configuration Array

Configuration, shape (num_coordinates,).

required
tensions Array

Signed filament loads, shape (num_paths,); positive is tension and negative is ideal axial compression below buckling.

required
backend str | None

Execution override, following :meth:solve_routing.

None

Returns:

Name Type Description
result Array

Generalized force, shape (num_velocities,). Warp skips world geometry and does not materialize an actuation matrix.

span_positions
span_positions(robot, configuration, solution, span_index, fractions)

Interpolate a straight span in world coordinates.

Parameters:

Name Type Description Default
robot SoftRobot

Unused host for the common sampling interface.

required
configuration Array

Unused configuration associated with the solution.

required
solution RoutingSolution

Routing containing world endpoint positions.

required
span_index int

Static span index.

required
fractions Array

One-dimensional interpolation fractions in [0, 1].

required

Returns:

Name Type Description
result Array

World positions in metres, shape (num_samples, 3).

path_lengths
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array

Return physical lengths, solving once if no solution is supplied.

Parameters:

Name Type Description Default
robot SoftRobot

Host defining the route geometry.

required
configuration Array

Configuration with shape (num_coordinates,).

required
solution RoutingSolution | None

Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call.

None

Returns:

Name Type Description
result Array

Lengths in metres with shape (num_paths,). Paths containing failed spans return NaN. Use solve_routing to inspect diagnostics and provide explicit warm starts.

path_velocity_jacobian
path_velocity_jacobian(robot, configuration, solution=None)

Map host velocities to path length rates.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying base coordinate and velocity dimensions.

required
configuration Array

Configuration, shape (num_coordinates,).

required
solution RoutingSolution | None

Solution at this configuration; omitted solutions are computed once for this call.

None

Returns:

Name Type Description
result Array

Jacobian, shape (num_paths, num_velocities). Positive filament tensions produce generalized forces -jacobian.T @ tension.

path_positions
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array

Return one world position per path at a reference backbone station.

Parameters:

Name Type Description Default
robot SoftRobot

Host supplying kinematics and segment lengths.

required
q Array

Configuration with shape (num_coordinates,).

required
s Array

Scalar reference backbone station in metres.

required
solution RoutingSolution | None

Optional solution for these exact inputs.

None

Returns:

Name Type Description
result Array

Positions with shape (num_paths, 2 or 3) in metres. Stations clamp to path endpoints. Within a straight span they interpolate along its chord; optimized spans use their material offsets. At shared boundaries the upstream span is selected. Explicit span sampling includes both sides of a moving joint's guide connection.

validate_friction
validate_friction(friction: ThreadlikeFriction) -> None

Check whether this strategy supports the supplied friction model.

Parameters:

Name Type Description Default
friction ThreadlikeFriction

Runtime effort-loss model to pair with the routing.

required

Raises:

Type Description
ValueError

The model is not frictionless. Strategies implementing friction override this check with their own requirements.

with_params
with_params(params)

Replace numerical geometry while retaining routing topology.

Parameters:

Name Type Description Default
params RoutingSpanParams | ShortestPathRoutingParams

Parameters of the same type and topology as this strategy's current parameters.

required

Returns:

Name Type Description
result ConfigurationDependentThreadlikeRouting

Strategy with validated replacement geometry and unchanged algorithm settings.

update_params
update_params(**updates: Any) -> BaseThreadlikeRouting

Replace selected geometry parameters through validated replacement.

Parameters:

Name Type Description Default
**updates Any

Parameter field names and replacement values accepted by this strategy's parameter object.

{}

Returns:

Type Description
BaseThreadlikeRouting

Routing with the requested numerical changes and unchanged topology.

Raises:

Type Description
TypeError

A field name or replacement type is unsupported.

ValueError

A replacement is invalid or changes routing topology.

validate_structure_for_robot
validate_structure_for_robot(robot) -> None

Validate segment bounds and prescribed guides at moving joints.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with static segment topology.

required

Raises:

Type Description
ValueError

Span connectivity is incompatible with the host.

validate_values_for_robot
validate_values_for_robot(robot) -> None

Validate guide geometry and positive finite segment lengths.

Parameters:

Name Type Description Default
robot SoftRobot

Continuum host with material frame conventions.

required

Raises:

Type Description
ValueError

Host lengths or guide offsets are invalid.