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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
validate_structure_for_robot
¶
validate_structure_for_robot(robot: SoftRobot) -> None
Validate tracer-safe component compatibility with robot.
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
¶
Return actuator effort for the current control and transmission state.
IdentityActuator
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
IdentityTransmission
¶
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Identity map from generalized to actuator-coordinate
velocities with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Identity actuation matrix with shape
|
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 |
required |
qd
|
Array
|
Generalized velocity, shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Required passive effort, shape |
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.
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Coordinate Jacobian with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure_compatibility
¶
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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure_compatibility
¶
Validate the coefficient shape against the path count.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
num_paths
|
int
|
Number of paths in the routing family. |
required |
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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
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 eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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 |
is_frictionless |
bool
|
Whether the ratio is identically one. |
__check_init__
¶
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
¶
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
¶
with_params(params: BaseThreadlikeFrictionParams) -> ThreadlikeFriction
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Matrix mapping generalized velocities to actuator-coordinate
velocities, with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
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 |
reference_configuration |
Array
|
Generalized configuration |
coordinate_offset |
Array
|
Per-channel actuator coordinate |
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 |
{}
|
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 eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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 |
None
|
coordinate_offset
|
Array | float
|
Actuator coordinate |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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 |
required |
qd
|
Array
|
Generalized velocity, shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Required passive effort, shape |
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 |
None
|
coordinate_offset
|
Array | float
|
Tendon deformation |
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
¶
Return generalized elastic force from the routed joint tendons.
damping_matrix
¶
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
local_segments
¶
Return group-local fixed/moving endpoint segments.
Returns:
| Type | Description |
|---|---|
Array
|
Array with shape |
Array
|
Endpoint axis 2 is ordered as |
segments
¶
Return world-space actuator endpoint segments for rendering.
Returns:
| Type | Description |
|---|---|
Array
|
Array with shape |
Array
|
ordered as |
effective_lengths
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Coordinate Jacobian with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
axial_forces
¶
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
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
¶
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical lengths in metres with shape |
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
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 |
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 |
Array
|
planar hosts or |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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
¶
Return the number of routed paths represented by the parameters.
start_segment_index_array
property
¶
Return the first active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
Start indices with shape |
end_segment_index_array
property
¶
Return the last active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
End indices with shape |
validate_structure
¶
Validate statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure_for_robot
¶
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 |
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 |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
constant
classmethod
¶
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
|
validate_structure
¶
Validate parameter shapes and connectivity.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate concrete parameter values.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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
¶
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
¶
spans: RoutingSpanParams
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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 |
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 |
path_length_jacobian
abstractmethod
¶
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
span_positions
abstractmethod
¶
Sample a resolved span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Host configuration, shape |
required |
solution
|
RoutingSolution
|
Solution at this configuration. |
required |
span_index
|
int
|
Static span index. |
required |
fractions
|
Array
|
One-dimensional sample fractions in |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions, shape |
with_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 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 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
|
required |
initial_guess
|
RoutingSolution | None
|
Previous RoutingSolution with
matching span topology, or
|
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
¶
Return the first active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
Start indices with shape |
end_segment_index_array
property
¶
Return the last active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
End indices with shape |
replace
¶
replace(**updates: Any) -> BaseThreadlikeRoutingParams
Replace numeric fields while keeping routing topology immutable.
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure_for_robot
¶
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 |
empty
classmethod
¶
empty() -> LinearThreadlikeRoutingParams
Construct an empty linear-routing parameter batch.
validate_structure
¶
Validate linear-routing array shapes and segment-span topology.
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__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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 |
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 |
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
¶
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__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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 |
end_offset |
Array
|
Exit guide offsets, shape |
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
¶
Return the number of spans.
Returns:
| Name | Type | Description |
|---|---|---|
result |
int
|
Number of guided portions represented by the topology. |
num_paths
property
¶
Return the number of physical paths.
Returns:
| Name | Type | Description |
|---|---|---|
result |
int
|
Number of physical filament paths represented by the topology. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure
¶
Validate shapes and immutable connectivity without reading tracers.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate finite transverse guide offsets.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure_for_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
|
|
validate_values_for_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
|
|
assert_same_topology
¶
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
|
|
replace
¶
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 |
knots |
Array
|
Global reference backbone coordinates in metres, shape |
length |
Array
|
Integrated span length in metres. |
equality_multipliers |
Array
|
Endpoint constraint multipliers, shape |
inequality_multipliers |
Array
|
Wall multipliers, shape |
active_mask |
Array
|
Active sampled wall constraints, shape |
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
¶
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
¶
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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
¶
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
¶
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
|
|
validate_values_for_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
|
|
solve_routing
¶
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 |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSolution
|
A |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Material-frame offsets in metres with shape |
span_positions
¶
Sample an optimized span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Configuration, shape |
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 |
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
|
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 |
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
¶
Return the number of physical filaments represented by the guides.
Returns:
| Type | Description |
|---|---|
int
|
Number of paths, each corresponding to one actuator channel. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure
¶
Validate parameter shapes and connectivity.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate concrete parameter values.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
assert_same_topology
¶
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
|
|
replace
¶
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
¶
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
¶
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
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
¶
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 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 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
¶
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 |
required |
initial_guess
|
RoutingSolution | None
|
Unused; accepted for the common routing interface. |
None
|
backend
|
str | None
|
Per-call override: |
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 |
path_length_jacobian
¶
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 |
actuation_matrix
¶
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 |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Matrix of shape |
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 |
required |
friction
|
ThreadlikeFriction
|
Frictionless runtime transmission model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Force map with shape |
Raises:
| Type | Description |
|---|---|
ValueError
|
The supplied friction model is not frictionless. |
actuation_force
¶
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 |
required |
tensions
|
Array
|
Signed filament loads, shape |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Generalized force, shape |
span_positions
¶
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 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions in metres, shape |
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 |
end_position |
Array
|
World exit guide, shape |
length |
Array
|
Distance between guides in metres. |
length_jacobian |
Array
|
Analytical configuration derivative, shape
|
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.
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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
|
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 |
ValueError
|
If |
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
hosts or |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate newly constructed threadlike-actuator parameters.
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'
|
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 |
required |
qd
|
Array
|
Generalized velocity, shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Required passive effort, shape |
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 |
ValueError
|
If |
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_l |
Array
|
Path-length Jacobian with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
planar hosts or |
elastic_force
¶
elastic_force(robot: SoftRobot, q: Array) -> Array
Return conservative generalized spring force from the paths.
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate threadlike impedance parameter structure.
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.
has_analytical_second_derivative
property
¶
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 |
required |
slope
|
Array | float
|
Constant offset derivative, either scalar or shaped |
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 |
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 |
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 |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a custom routing does not provide an analytical
|
with_params
¶
with_params(params: BaseThreadlikeRoutingParams) -> ThreadlikeRouting
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical lengths in metres with shape |
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this routing. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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 |
required |
s
|
Array
|
Scalar reference backbone station in metres. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
World positions in metres with shape |
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
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate coordinates with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Coordinate Jacobian with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_l |
Array
|
Path-length Jacobian with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
hosts or |
with_params
¶
with_params(params: ThreadlikeTransmissionParams) -> ThreadlikeTransmission
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate threadlike transmission parameter structure.
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 |
required |
accumulated_turn
|
Array
|
Unsigned turn |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Effort ratio in |
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 |
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 |
required |
linear_strain
|
Array
|
Constant material linear strain |
required |
offset
|
Array
|
Material-frame routing offset |
required |
offset_derivative
|
Array
|
Backbone-abscissa derivative |
required |
offset_second_derivative
|
Array
|
Backbone-abscissa derivative |
required |
eps
|
Array | float
|
Threshold below which a collapsed tangent uses the finite zero convention. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Nonnegative turn rate |
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 |
required |
linear_strain
|
Array
|
Material linear strain |
required |
offset
|
Array
|
Material-frame routing offset |
required |
offset_derivative
|
Array
|
Backbone-abscissa derivative |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Material-frame path tangent |
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 |
required |
linear_strain
|
Array
|
Material linear strain |
required |
angular_strain_derivative
|
Array
|
Backbone-abscissa derivative |
required |
linear_strain_derivative
|
Array
|
Backbone-abscissa derivative |
required |
offset
|
Array
|
Material-frame routing offset |
required |
offset_derivative
|
Array
|
Backbone-abscissa derivative |
required |
offset_second_derivative
|
Array
|
Backbone-abscissa derivative |
required |
eps
|
Array | float
|
Threshold used for a collapsed tangent. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Nonnegative turn rate |
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 |
Array
|
shape |
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 |
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 |
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.
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Coordinate Jacobian with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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
¶
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 |
required |
qd
|
Array
|
Generalized velocity, shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Required passive effort, shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
validate_structure_for_robot
¶
validate_structure_for_robot(robot: SoftRobot) -> None
Validate tracer-safe component compatibility with robot.
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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
IdentityTransmission
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Identity map from generalized to actuator-coordinate
velocities with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Identity actuation matrix with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
IdentityActuator
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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 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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
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 eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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. |
validate_structure_compatibility
¶
Validate the coefficient shape against the path count.
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 |
{}
|
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 statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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 |
is_frictionless |
bool
|
Whether the ratio is identically one. |
__check_init__
¶
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
¶
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
¶
with_params(params: BaseThreadlikeFrictionParams) -> ThreadlikeFriction
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 |
required |
linear_strain
|
Array
|
Material linear strain |
required |
offset
|
Array
|
Material-frame routing offset |
required |
offset_derivative
|
Array
|
Backbone-abscissa derivative |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Material-frame path tangent |
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 |
required |
linear_strain
|
Array
|
Material linear strain |
required |
angular_strain_derivative
|
Array
|
Backbone-abscissa derivative |
required |
linear_strain_derivative
|
Array
|
Backbone-abscissa derivative |
required |
offset
|
Array
|
Material-frame routing offset |
required |
offset_derivative
|
Array
|
Backbone-abscissa derivative |
required |
offset_second_derivative
|
Array
|
Backbone-abscissa derivative |
required |
eps
|
Array | float
|
Threshold used for a collapsed tangent. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Nonnegative turn rate |
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 |
required |
linear_strain
|
Array
|
Constant material linear strain |
required |
offset
|
Array
|
Material-frame routing offset |
required |
offset_derivative
|
Array
|
Backbone-abscissa derivative |
required |
offset_second_derivative
|
Array
|
Backbone-abscissa derivative |
required |
eps
|
Array | float
|
Threshold below which a collapsed tangent uses the finite zero convention. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Nonnegative turn rate |
threadlike_turning_angle
¶
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 |
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 |
required |
boundary_turn_fn
|
Callable[[Array], Array]
|
Function accepting a left segment index and returning
one-sided tangent angles shaped |
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 |
required |
normalized_weights
|
Array
|
Corresponding quadrature weights with the same
shape as |
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 |
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 |
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 |
required |
accumulated_turn
|
Array
|
Unsigned turn |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Effort ratio in |
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 |
reference_configuration |
Array
|
Generalized configuration |
coordinate_offset |
Array
|
Per-channel actuator coordinate |
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 |
{}
|
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 eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Matrix mapping generalized velocities to actuator-coordinate
velocities, with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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 |
None
|
coordinate_offset
|
Array | float
|
Actuator coordinate |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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 |
None
|
coordinate_offset
|
Array | float
|
Tendon deformation |
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
¶
Return generalized elastic force from the routed joint tendons.
damping_matrix
¶
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 |
required |
qd
|
Array
|
Generalized velocity, shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Required passive effort, shape |
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.
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
¶
Return group-local fixed/moving endpoint segments.
Returns:
| Type | Description |
|---|---|
Array
|
Array with shape |
Array
|
Endpoint axis 2 is ordered as |
segments
¶
Return world-space actuator endpoint segments for rendering.
Returns:
| Type | Description |
|---|---|
Array
|
Array with shape |
Array
|
ordered as |
effective_lengths
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Coordinate Jacobian with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
axial_forces
¶
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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.
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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
¶
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical lengths in metres with shape |
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
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 |
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 |
Array
|
planar hosts or |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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.
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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
|
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 |
ValueError
|
If |
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
hosts or |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate newly constructed threadlike-actuator parameters.
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'
|
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 |
required |
qd
|
Array
|
Generalized velocity, shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Required passive effort, shape |
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 |
ValueError
|
If |
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_l |
Array
|
Path-length Jacobian with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
planar hosts or |
elastic_force
¶
elastic_force(robot: SoftRobot, q: Array) -> Array
Return conservative generalized spring force from the paths.
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate threadlike impedance parameter structure.
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
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate coordinates with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Coordinate Jacobian with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_l |
Array
|
Path-length Jacobian with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
hosts or |
with_params
¶
with_params(params: ThreadlikeTransmissionParams) -> ThreadlikeTransmission
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure
¶
Validate threadlike transmission parameter structure.
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
¶
Return the number of routed paths represented by the parameters.
start_segment_index_array
property
¶
Return the first active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
Start indices with shape |
end_segment_index_array
property
¶
Return the last active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
End indices with shape |
validate_structure
¶
Validate statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure_for_robot
¶
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 |
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
¶
Return the first active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
Start indices with shape |
end_segment_index_array
property
¶
Return the last active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
End indices with shape |
replace
¶
replace(**updates: Any) -> BaseThreadlikeRoutingParams
Replace numeric fields while keeping routing topology immutable.
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure_for_robot
¶
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 |
empty
classmethod
¶
empty() -> LinearThreadlikeRoutingParams
Construct an empty linear-routing parameter batch.
validate_structure
¶
Validate linear-routing array shapes and segment-span topology.
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.
has_analytical_second_derivative
property
¶
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 |
required |
slope
|
Array | float
|
Constant offset derivative, either scalar or shaped |
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 |
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 |
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 |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a custom routing does not provide an analytical
|
with_params
¶
with_params(params: BaseThreadlikeRoutingParams) -> ThreadlikeRouting
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical lengths in metres with shape |
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this routing. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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 |
required |
s
|
Array
|
Scalar reference backbone station in metres. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
World positions in metres with shape |
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
¶
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
¶
spans: RoutingSpanParams
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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 |
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 |
path_length_jacobian
abstractmethod
¶
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
span_positions
abstractmethod
¶
Sample a resolved span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Host configuration, shape |
required |
solution
|
RoutingSolution
|
Solution at this configuration. |
required |
span_index
|
int
|
Static span index. |
required |
fractions
|
Array
|
One-dimensional sample fractions in |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions, shape |
with_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 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 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
|
required |
initial_guess
|
RoutingSolution | None
|
Previous RoutingSolution with
matching span topology, or
|
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 |
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 |
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
¶
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 |
end_offset |
Array
|
Exit guide offsets, shape |
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
¶
Return the number of spans.
Returns:
| Name | Type | Description |
|---|---|---|
result |
int
|
Number of guided portions represented by the topology. |
num_paths
property
¶
Return the number of physical paths.
Returns:
| Name | Type | Description |
|---|---|---|
result |
int
|
Number of physical filament paths represented by the topology. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure
¶
Validate shapes and immutable connectivity without reading tracers.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate finite transverse guide offsets.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure_for_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
|
|
validate_values_for_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
|
|
assert_same_topology
¶
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
|
|
replace
¶
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 |
knots |
Array
|
Global reference backbone coordinates in metres, shape |
length |
Array
|
Integrated span length in metres. |
equality_multipliers |
Array
|
Endpoint constraint multipliers, shape |
inequality_multipliers |
Array
|
Wall multipliers, shape |
active_mask |
Array
|
Active sampled wall constraints, shape |
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 |
end_position |
Array
|
World exit guide, shape |
length |
Array
|
Distance between guides in metres. |
length_jacobian |
Array
|
Analytical configuration derivative, shape
|
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 |
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
constant
classmethod
¶
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
|
validate_structure
¶
Validate parameter shapes and connectivity.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate concrete parameter values.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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
¶
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
¶
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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
¶
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
¶
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
|
|
validate_values_for_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
|
|
solve_routing
¶
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 |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSolution
|
A |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Material-frame offsets in metres with shape |
span_positions
¶
Sample an optimized span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Configuration, shape |
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 |
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
|
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 |
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
¶
Return the number of physical filaments represented by the guides.
Returns:
| Type | Description |
|---|---|
int
|
Number of paths, each corresponding to one actuator channel. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure
¶
Validate parameter shapes and connectivity.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate concrete parameter values.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
assert_same_topology
¶
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
|
|
replace
¶
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
¶
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
¶
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
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
¶
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 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 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
¶
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 |
required |
initial_guess
|
RoutingSolution | None
|
Unused; accepted for the common routing interface. |
None
|
backend
|
str | None
|
Per-call override: |
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 |
path_length_jacobian
¶
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 |
actuation_matrix
¶
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 |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Matrix of shape |
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 |
required |
friction
|
ThreadlikeFriction
|
Frictionless runtime transmission model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Force map with shape |
Raises:
| Type | Description |
|---|---|
ValueError
|
The supplied friction model is not frictionless. |
actuation_force
¶
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 |
required |
tensions
|
Array
|
Signed filament loads, shape |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Generalized force, shape |
span_positions
¶
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 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions in metres, shape |
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 |
Array
|
shape |
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 |
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 |
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
¶
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical lengths in metres with shape |
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
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 |
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 |
Array
|
planar hosts or |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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.
validate_structure
¶
Validate threadlike transmission parameter structure.
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate coordinates with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_a |
Array
|
Coordinate Jacobian with shape
|
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
A |
Array
|
Actuation matrix with shape
|
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_l |
Array
|
Path-length Jacobian with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
hosts or |
with_params
¶
with_params(params: ThreadlikeTransmissionParams) -> ThreadlikeTransmission
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Transmission-coordinate velocities with shape
|
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__
¶
Validate newly constructed threadlike-actuator 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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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.
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
|
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 |
ValueError
|
If |
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
hosts or |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Work-conjugate actuator coordinates with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities with shape
|
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 |
required |
control
|
Array
|
Controls for this actuator with shape
|
required |
qd
|
Array | None
|
Optional generalized velocities of shape
|
None
|
coordinate_jacobian
|
Array | None
|
Optional precomputed coordinate Jacobian with
shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts with shape
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
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.
validate_structure
¶
Validate threadlike impedance parameter structure.
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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'
|
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 |
ValueError
|
If |
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
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path lengths with shape |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_l |
Array
|
Path-length Jacobian with shape
|
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
|
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path-length rates with shape |
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
|
required |
s
|
Array
|
Scalar backbone abscissa. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Path positions with shape |
Array
|
planar hosts or |
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 |
required |
qd
|
Array
|
Generalized velocity, shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Required passive effort, shape |
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
¶
Return the number of routed paths represented by the parameters.
start_segment_index_array
property
¶
Return the first active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
Start indices with shape |
end_segment_index_array
property
¶
Return the last active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
End indices with shape |
validate_structure_for_robot
¶
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 |
replace
¶
replace(**updates: Any) -> BaseThreadlikeRoutingParams
Replace numeric fields while keeping routing topology immutable.
validate_structure
¶
Validate statically observable parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
shapes, PyTree layout, or static topology. Implementations must be |
None
|
safe when array leaves are JAX tracers. |
validate_values
¶
Validate eager value-dependent parameter invariants.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
domains, symmetry, and other checks requiring concrete values. |
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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.
start_segment_index_array
property
¶
Return the first active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
Start indices with shape |
end_segment_index_array
property
¶
Return the last active segment of every routed path.
Returns:
| Type | Description |
|---|---|
Array
|
End indices with shape |
empty
classmethod
¶
empty() -> LinearThreadlikeRoutingParams
Construct an empty linear-routing parameter batch.
validate_structure
¶
Validate linear-routing array shapes and segment-span topology.
replace
¶
replace(**updates: Any) -> BaseThreadlikeRoutingParams
Replace numeric fields while keeping routing topology immutable.
validate_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
Validate concrete values and traced structure against a model.
validate_structure_for_robot
¶
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 |
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.
has_analytical_second_derivative
property
¶
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 |
required |
slope
|
Array | float
|
Constant offset derivative, either scalar or shaped |
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 |
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 |
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 |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a custom routing does not provide an analytical
|
with_params
¶
with_params(params: BaseThreadlikeRoutingParams) -> ThreadlikeRouting
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical lengths in metres with shape |
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 |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this routing. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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 |
required |
s
|
Array
|
Scalar reference backbone station in metres. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
World positions in metres with shape |
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 |
Array
|
shape |
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 |
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 |
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 |
end_offset |
Array
|
Exit guide offsets, shape |
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
¶
Return the number of spans.
Returns:
| Name | Type | Description |
|---|---|---|
result |
int
|
Number of guided portions represented by the topology. |
num_paths
property
¶
Return the number of physical paths.
Returns:
| Name | Type | Description |
|---|---|---|
result |
int
|
Number of physical filament paths represented by the topology. |
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure
¶
Validate shapes and immutable connectivity without reading tracers.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate finite transverse guide offsets.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure_for_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
|
|
validate_values_for_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
|
|
assert_same_topology
¶
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
|
|
replace
¶
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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 |
knots |
Array
|
Global reference backbone coordinates in metres, shape |
length |
Array
|
Integrated span length in metres. |
equality_multipliers |
Array
|
Endpoint constraint multipliers, shape |
inequality_multipliers |
Array
|
Wall multipliers, shape |
active_mask |
Array
|
Active sampled wall constraints, shape |
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 |
end_position |
Array
|
World exit guide, shape |
length |
Array
|
Distance between guides in metres. |
length_jacobian |
Array
|
Analytical configuration derivative, shape
|
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 |
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
¶
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 |
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
¶
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
¶
spans: RoutingSpanParams
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 |
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 |
path_length_jacobian
abstractmethod
¶
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
span_positions
abstractmethod
¶
Sample a resolved span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Host configuration, shape |
required |
solution
|
RoutingSolution
|
Solution at this configuration. |
required |
span_index
|
int
|
Static span index. |
required |
fractions
|
Array
|
One-dimensional sample fractions in |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions, shape |
with_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 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 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
|
required |
initial_guess
|
RoutingSolution | None
|
Previous RoutingSolution with
matching span topology, or
|
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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 |
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
constant
classmethod
¶
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
|
validate_structure
¶
Validate parameter shapes and connectivity.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate concrete parameter values.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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 |
{}
|
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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
¶
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__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_structure
¶
Validate parameter shapes and connectivity.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values
¶
Validate concrete parameter values.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
assert_same_topology
¶
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
|
|
replace
¶
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_for_update
¶
Validate values when concrete and structure when dynamically traced.
validate_structure_compatibility
¶
Validate statically observable compatibility with a model structure.
validate_value_compatibility
¶
Validate eager value compatibility with a model structure.
validate_against_structure
¶
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
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If intrinsic or structure-dependent validation fails. |
validate_for_update_against_structure
¶
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__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
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
¶
Return the shared span parameters.
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSpanParams
|
RoutingSpanParams containing guide offsets and span-to-path connectivity. |
num_paths
property
¶
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
¶
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
|
|
validate_values_for_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
|
|
solve_routing
¶
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 |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSolution
|
A |
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
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Material-frame offsets in metres with shape |
span_positions
¶
Sample an optimized span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Configuration, shape |
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 |
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
|
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 |
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
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 |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
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
¶
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
¶
Return the shared guide geometry and connectivity parameters.
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSpanParams
|
This strategy's guide geometry. |
num_paths
property
¶
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
¶
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 |
required |
initial_guess
|
RoutingSolution | None
|
Unused; accepted for the common routing interface. |
None
|
backend
|
str | None
|
Per-call override: |
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 |
path_length_jacobian
¶
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 |
actuation_matrix
¶
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 |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Matrix of shape |
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 |
required |
friction
|
ThreadlikeFriction
|
Frictionless runtime transmission model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Force map with shape |
Raises:
| Type | Description |
|---|---|
ValueError
|
The supplied friction model is not frictionless. |
actuation_force
¶
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 |
required |
tensions
|
Array
|
Signed filament loads, shape |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Generalized force, shape |
span_positions
¶
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 |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions in metres, shape |
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 |
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 |
path_velocity_jacobian
¶
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 |
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 |
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 |
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 |
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
¶
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 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. |