Parameters¶
Shared link, joint, cross-section, and isotropic-material mechanics are described in Continuum Robot Components. Construction, immutable replacement, and gradient-based workflows are covered in Parameters, Updates, and Optimization.
Actuator and passive-element parameters follow the same immutable replacement style through indexed robot delegates. See Actuation parameter updates.
System parameters are represented as typed Equinox PyTrees. Shared continuum
link, joint, cross-section, material params, and construction specs live in
soromox.systems.components. System params and static structures remain next
to their system family.
Overview¶
Each system separates dynamic numeric values from static model structure:
- Params objects store JAX arrays that may be optimized, differentiated, vmapped, and replaced without changing the PyTree layout.
- Structure objects store static choices such as quadrature counts, active strain masks, GVS joint/basis/cross-section choices, and padding sizes. Changing structure means constructing a new system and may recompile jitted methods.
- Spec objects are ergonomic construction inputs. Shared
LinkSpecandJointSpecobjects live insoromox.systems.components;GVSSegmentandStrainBasisSpecremain GVS-specific. Factory methods split specs into runtime params and static structures.
The top-level soromox.systems package re-exports the public params,
structures, and specs for convenient imports. Internally, concrete containers
are family-local:
| System family | Dynamic params | Static structures | Construction specs |
|---|---|---|---|
| Shared components | soromox.systems.components |
- | LinkSpec, JointSpec |
| PCS | soromox.systems.pcs.params |
soromox.systems.pcs.structures |
shared LinkSpec |
| GVS | soromox.systems.gvs.params |
soromox.systems.gvs.structures |
shared specs plus soromox.systems.gvs.specs |
| Pendulum | soromox.systems.pendulum.params |
- | - |
| Articulated | soromox.systems.articulated.params |
- | - |
The public construction pattern is:
robot = PCS.from_links(links, structure=PCSStructure(...))
robot = robot.update_link_params(length=new_length)
robot = robot.with_params(new_params)
Same-shape, same-dtype parameter updates preserve the JAX compilation layout.
Changing the number of segments, tendons, active strains, GVS basis layout, or
quadrature layout is a structural change and requires reconstruction.
Pass the complete PyTree to with_params(...) as a dynamic argument inside
eqx.filter_jit; use
with_actuator_params(...) and
with_passive_element_params(...) for installed components. See
Compiled update contract
for a compiled example and the eager-versus-traced validation boundary.
For GVS specifically, GVS.from_segments(...) is the recommended constructor.
It accepts user-facing segment specs, stores canonical link and joint matrices
in GVSParams, and stores stripped static choices in GVSStructure.
IsotropicMaterialParams remains a separate caller-owned optimization PyTree,
so runtime and material representations are not duplicated.
Validation¶
BaseSystemParams always runs tracer-safe structural validation. Parameter
trees containing dynamic tracers skip concrete numeric checks, while eager and
closed-over concrete trees run validate_values() eagerly or at JAX trace time.
Subclasses implement these two phases in validate_structure() and
validate_values().
Naming¶
Typed params use singular physical quantity names. A field name denotes the
quantity for one indexed entity; array axes describe batching. For example,
length stores one length per segment or link when its shape is (num_segments,)
or (num_links,).
| Field | Meaning |
|---|---|
length |
Per-segment or per-link length |
cross_section.coefficients |
Batched cross-section profile coefficients |
density |
Per-segment material density |
stiffness |
Canonical per-link or per-joint generalized stiffness matrices |
damping |
Canonical per-link or per-joint generalized damping matrices |
gravity |
Gravity vector |
reference_strain |
Reference strain vector |
joint_rest_configuration |
Joint coordinates where elastic joint force is zero |
Young's modulus, either shear modulus or Poisson's ratio, and optional material
damping use the separate IsotropicMaterialParams fields young_modulus,
shear_modulus, poisson_ratio, and material_damping_coefficient. See the
linked components page for their mapping to canonical matrices and the user
guide for optimization examples.
World Frame, Mounting, and Gravity Defaults¶
Soft-robot parameter objects use Earth gravity when gravity is omitted.
Mounting is not a physical parameter: fixed robots resolve it from the
constructor's base_pose, while floating robots receive it in the runtime
configuration. Vertical is world y for planar systems and world z for spatial
systems. Gravity is always expressed in the inertial/world frame; changing the
base mounting does not rotate the gravity vector.
| Mounting constructor | Planar backbone | Spatial backbone | Default gravity |
|---|---|---|---|
horizontal |
+x | +x | negative vertical |
upright |
+y | +z | negative vertical |
hanging |
-y | -z | negative vertical |
The exact default values are:
- Planar upright pose:
[pi / 2, 0, 0]; gravity:[0, -9.81]m/s². - Spatial upright pose:
[0, -sqrt(0.5), 0, sqrt(0.5), 0, 0, 0]; gravity:[0, 0, -9.81]m/s². - Planar poses use
[theta, x, y]. Spatial poses use scalar-last Hamilton quaternions in[qx, qy, qz, qw, x, y, z]order.
Omitting both the robot constructor's base_pose and the parameter tree's
gravity selects the defaults. For example, the factory below constructs an
upright PlanarPCS under Earth gravity:
Use the shared pose utilities to make another common fixed mounting explicit:
from soromox.utils.geometry import poses
horizontal = PlanarPCS.from_links(
planar_links, base_pose=poses.planar_mounting_pose("horizontal")
)
upright = PlanarPCS.from_links(
planar_links,
base_pose=poses.planar_mounting_pose("upright", jnp.array([0.2, 0.1])),
)
hanging = PCS.from_links(
links,
base_pose=poses.spatial_mounting_pose(
"hanging", jnp.array([0.0, 0.0, 0.5])
),
)
Pass an explicit vector for custom or zero gravity. Pass an explicit
base_pose to the robot constructor for arbitrary fixed orientations:
zero_gravity = PCS.from_links(links, gravity=jnp.zeros(3))
custom = PlanarPCS.from_links(
planar_links,
gravity=jnp.array([1.0, -9.7]),
base_pose=jnp.array([0.3, 0.2, 0.1]),
)
Calling replace(gravity=None) restores dimension-appropriate Earth gravity.
Use robot.with_fixed_base_pose(...) to change an existing fixed mounting;
floating robots reject that operation.
Threadlike Actuation Parameters¶
Continuum routed actuation uses ThreadlikeRouting and explicit active or
passive components. The leading array axis indexes paths, so each path can have
distinct offsets, slopes, and a contiguous segment span.
import jax.numpy as jnp
from soromox.actuation import (
ThreadlikeActuator,
ThreadlikeImpedance,
ThreadlikeRouting,
)
active_routing = ThreadlikeRouting.linear(
intercept=jnp.array([[0.0, 0.01, 0.0], [0.0, -0.01, 0.0]]),
slope=jnp.array([[0.0, 0.0, 0.0], [0.0, 0.002, 0.0]]),
start_segment_index=(0, 0),
end_segment_index=(0, 1),
)
active_tendons = ThreadlikeActuator.tendons(active_routing)
passive_routing = ThreadlikeRouting.linear(
intercept=jnp.array([[0.0, 0.005, 0.004], [0.0, -0.005, 0.004]]),
slope=jnp.zeros((2, 3)),
start_segment_index=(0, 0),
end_segment_index=(0, 1),
)
passive_impedance = ThreadlikeImpedance(
routing=passive_routing,
stiffness=jnp.array([10.0, 25.0]),
damping=jnp.array([0.1, 0.3]),
rest_length=jnp.array([0.2, 0.21]),
)
The number of paths and their segment-span topology are structural. Changing either requires reconstructing the component and robot; numeric coefficients and mechanical parameters use immutable component updates.
Structure Naming¶
The public static objects are named PCSStructure, GVSStructure, and
PlanarHSAStructure. Topology was considered, but it is too narrow for
objects that also contain quadrature counts, active strain masks, basis padding,
and numerical evaluation choices. Layout was also considered, but it reads as
array-shape-only. Structure is the least misleading umbrella for static model
choices that affect compilation.
Example¶
import jax.numpy as jnp
from soromox.systems import LinkSpec, PCS, PCSStructure
links = [
LinkSpec.circular(
length=0.1,
radius=0.01,
density=1000.0,
young_modulus=1e6,
shear_modulus=1e5,
material_damping_coefficient=1e4,
reference_strain=[0.0, 0.0, 0.0, 1.0, 0.0, 0.0],
)
for _ in range(2)
]
robot = PCS.from_links(links, structure=PCSStructure(num_gauss_points=5))
updated_robot = robot.update_link_params(length=jnp.array([0.12, 0.1]))
API Reference¶
soromox.systems.params
¶
BaseSystemParams
¶
Bases: Module
flowchart TD
soromox.systems.params.BaseSystemParams[BaseSystemParams]
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Base class for dynamic system parameters stored as JAX PyTrees.
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.
BaseSoftRobotParams
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Common dynamic parameters, with gravity expressed in the world frame.
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.
BaseContinuumSoftRobotParams
¶
Bases: BaseSoftRobotParams
flowchart TD
soromox.systems.params.BaseContinuumSoftRobotParams[BaseContinuumSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseContinuumSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.params.BaseContinuumSoftRobotParams href "" "soromox.systems.params.BaseContinuumSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Shared dynamic parameters for continuum soft robots.
Concrete continuum systems expose their batched physical values through a
shared ContinuumLinkParams field named link. The field is declared
by concrete subclasses to keep this base module independent from the
reusable component package.
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.
BaseArticulatedSoftRobotParams
¶
Bases: BaseSoftRobotParams
flowchart TD
soromox.systems.params.BaseArticulatedSoftRobotParams[BaseArticulatedSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseArticulatedSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.params.BaseArticulatedSoftRobotParams href "" "soromox.systems.params.BaseArticulatedSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Shared dynamic parameters for articulated systems.
The leading axis indexes joints/links. Stiffness, damping, and reference
coordinates are dynamic arrays so optimization can update them without
changing the system structure. joint_rest_configuration is the joint
coordinate at which the elastic joint force is zero.
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.
validate_planar_base_pose
¶
Validate a planar base pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Parameter name used in error messages. |
required |
value
|
Array
|
Planar pose array with shape |
required |
Returns:
| Type | Description |
|---|---|
None
|
None. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the shape is not |
validate_quaternion_base_pose
¶
validate_quaternion_base_pose(name: str, value: Array, expected_shape: tuple[int, ...], *, min_norm: float = 1e-12) -> None
Validate a scalar-last quaternion base pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
name
|
str
|
Parameter name used in error messages. |
required |
value
|
Array
|
Base pose array whose first four entries are a scalar-last
Hamilton quaternion in |
required |
expected_shape
|
tuple[int, ...]
|
Required full pose shape, typically |
required |
min_norm
|
float
|
Minimum allowed Euclidean norm for the quaternion component. |
1e-12
|
Parameter objects are checked for finite entries and nonzero quaternion norm. Transform helpers still avoid zero-norm division to keep runtime code finite.
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If the shape is wrong, any entry is non-finite, or the quaternion component is zero or numerically too small to normalize safely. |
soromox.systems.pcs.params
¶
PCSParams
¶
Bases: BaseContinuumSoftRobotParams
flowchart TD
soromox.systems.pcs.params.PCSParams[PCSParams]
soromox.systems.params.BaseContinuumSoftRobotParams[BaseContinuumSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseContinuumSoftRobotParams --> soromox.systems.pcs.params.PCSParams
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseContinuumSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.pcs.params.PCSParams href "" "soromox.systems.pcs.params.PCSParams"
click soromox.systems.params.BaseContinuumSoftRobotParams href "" "soromox.systems.params.BaseContinuumSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Dynamic parameters for the spatial PCS model.
Per-link runtime values live in the shared link component. Its
stiffness and damping fields are canonical generalized matrices with
shape (num_links, 6, 6). Isotropic Young, shear, and material-damping
values are separate construction or optimization variables and can be mapped
into these matrices explicitly. Fixed mounting belongs to the constructed
model and floating pose belongs to runtime configuration state.
validate_structure
¶
Validate spatial PCS parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If link fields, reference strain, canonical matrices, cross-section coefficients, or gravity have invalid shapes. |
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.
PlanarPCSParams
¶
Bases: BaseContinuumSoftRobotParams
flowchart TD
soromox.systems.pcs.params.PlanarPCSParams[PlanarPCSParams]
soromox.systems.params.BaseContinuumSoftRobotParams[BaseContinuumSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseContinuumSoftRobotParams --> soromox.systems.pcs.params.PlanarPCSParams
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseContinuumSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.pcs.params.PlanarPCSParams href "" "soromox.systems.pcs.params.PlanarPCSParams"
click soromox.systems.params.BaseContinuumSoftRobotParams href "" "soromox.systems.params.BaseContinuumSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Dynamic parameters for the planar PCS model.
The leading axis of fields in link indexes planar constant-strain
segments. Its canonical generalized stiffness and damping matrices have
shape (num_links, 3, 3). Isotropic material parameters are mapped
explicitly into canonical link matrices rather than duplicated in this
runtime parameter tree. Fixed mounting belongs to the constructed model and
floating pose belongs to runtime configuration state.
validate_structure
¶
Validate planar PCS parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If link fields, reference strain, canonical matrices, cross-section coefficients, or gravity have invalid shapes. |
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.
ISupportParams
¶
Bases: PCSParams
flowchart TD
soromox.systems.pcs.params.ISupportParams[ISupportParams]
soromox.systems.pcs.params.PCSParams[PCSParams]
soromox.systems.params.BaseContinuumSoftRobotParams[BaseContinuumSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.pcs.params.PCSParams --> soromox.systems.pcs.params.ISupportParams
soromox.systems.params.BaseContinuumSoftRobotParams --> soromox.systems.pcs.params.PCSParams
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseContinuumSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.pcs.params.ISupportParams href "" "soromox.systems.pcs.params.ISupportParams"
click soromox.systems.pcs.params.PCSParams href "" "soromox.systems.pcs.params.PCSParams"
click soromox.systems.params.BaseContinuumSoftRobotParams href "" "soromox.systems.params.BaseContinuumSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Dynamic parameters for the I-SUPPORT spatial pneumatic PCS model.
The leading axis of the shared PCS link fields indexes every physical
rigid or pneumatic segment in robot order. ISupport expands these fields
into the internal PCS layout using ISupportStructure. Chamber fields
index only pneumatic segments, in their order of appearance. Chamber
azimuth is right-handed about local +X, measured from +Y toward +Z; array
index j is pressure channel j. If chamber_azimuth_angles is
omitted, ISupport uses 0, 120, and 240 degrees for every pneumatic
segment. chamber_effective_pressure_area scales each routed chamber-path
length into its pressure-conjugate equivalent-volume coordinate. It contains
one value per pneumatic segment and is shared by all chambers in that
segment. When omitted, it is derived as
pi * (chamber_outer_radius**2 - chamber_inner_radius**2). Stiffness and
damping are supplied as canonical per-link generalized matrices.
pcs_segment_lengths optionally stores flattened PCS segment lengths in
the order defined by ISupportStructure.pcs_segment_counts. If omitted,
each pneumatic segment is split into equal-length PCS segments. The entries
assigned to each pneumatic segment must sum to the corresponding
length entry when the model is constructed.
Segment types are defined by ISupportStructure.rigid_segment_selector.
validate_structure
¶
Validate array shapes independently of runtime chamber values.
validate_values
¶
Validate eager PCS and pneumatic chamber values.
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If inherited PCS values, chamber radii, effective areas, segment lengths, or chamber azimuths are invalid. |
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.
PlanarHSAParams
¶
Bases: BaseSoftRobotParams
flowchart TD
soromox.systems.pcs.params.PlanarHSAParams[PlanarHSAParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.pcs.params.PlanarHSAParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.pcs.params.PlanarHSAParams href "" "soromox.systems.pcs.params.PlanarHSAParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Dynamic parameters for planar HSA systems.
Field names denote one segment/platform quantity; leading axes store the batched values. Arrays store length, rod geometry, reference strain components, platform/cap dimensions, end-effector offset, and optional hysteresis coefficients used by the numerical HSA model. Fixed mounting belongs to the constructed model and floating pose belongs to runtime configuration state.
from_npz
classmethod
¶
from_npz(path: str | Path) -> PlanarHSAParams
Load planar HSA parameters from an explicit .npz file 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.
soromox.systems.pcs.structures
¶
PCSStructure
¶
Bases: Module
flowchart TD
soromox.systems.pcs.structures.PCSStructure[PCSStructure]
click soromox.systems.pcs.structures.PCSStructure href "" "soromox.systems.pcs.structures.PCSStructure"
Static spatial PCS layout that determines JAX compilation structure.
Attributes:
| Name | Type | Description |
|---|---|---|
num_gauss_points |
int
|
Number of Gauss points per constant-strain link. |
strain_selector |
Array | None
|
Optional boolean selector with six entries per link.
|
scale_rotational_basis_by_length |
bool
|
Whether rotational strain coordinates are normalized by their link length. |
PlanarPCSStructure
¶
Bases: Module
flowchart TD
soromox.systems.pcs.structures.PlanarPCSStructure[PlanarPCSStructure]
click soromox.systems.pcs.structures.PlanarPCSStructure href "" "soromox.systems.pcs.structures.PlanarPCSStructure"
Static planar PCS layout.
Attributes:
| Name | Type | Description |
|---|---|---|
num_gauss_points |
int
|
Number of Gauss points per constant-strain link. |
strain_selector |
Array | None
|
Optional boolean selector with three entries per link.
|
scale_rotational_basis_by_length |
bool
|
Whether the rotational strain coordinate is normalized by its link length. |
PlanarHSAStructure
¶
Bases: Module
flowchart TD
soromox.systems.pcs.structures.PlanarHSAStructure[PlanarHSAStructure]
click soromox.systems.pcs.structures.PlanarHSAStructure href "" "soromox.systems.pcs.structures.PlanarHSAStructure"
Static numerical layout choices for planar HSA PCS systems.
ISupportStructure
¶
Bases: PCSStructure
flowchart TD
soromox.systems.pcs.structures.ISupportStructure[ISupportStructure]
soromox.systems.pcs.structures.PCSStructure[PCSStructure]
soromox.systems.pcs.structures.PCSStructure --> soromox.systems.pcs.structures.ISupportStructure
click soromox.systems.pcs.structures.ISupportStructure href "" "soromox.systems.pcs.structures.ISupportStructure"
click soromox.systems.pcs.structures.PCSStructure href "" "soromox.systems.pcs.structures.PCSStructure"
Static I-SUPPORT PCS layout.
pcs_segment_counts defines how many constant-strain PCS segments are
used for each physical pneumatic segment, in pneumatic-segment order. A
scalar count applies the same count to every pneumatic segment. Child
lengths live in ISupportParams.pcs_segment_lengths.
rigid_segment_selector has one entry per physical segment in
ISupportParams. True marks a rigid segment and False a pneumatic
segment. When omitted, segment types alternate from a rigid segment at index
zero. If strain_selector is provided, it is interpreted on the expanded
PCS layout; rigid-segment strains are always deactivated.
Attributes:
| Name | Type | Description |
|---|---|---|
pcs_segment_counts |
tuple[int, ...] | None
|
Optional number of PCS subdivisions for each pneumatic segment. A one-element tuple is broadcast. |
rigid_segment_selector |
tuple[bool, ...] | None
|
Optional physical-segment mask in which
|
soromox.systems.gvs.params
¶
Typed dynamic parameters for the geometric variable-strain system.
GVSParams
¶
Bases: BaseSoftRobotParams
flowchart TD
soromox.systems.gvs.params.GVSParams[GVSParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.gvs.params.GVSParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.gvs.params.GVSParams href "" "soromox.systems.gvs.params.GVSParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Canonical dynamic parameters for a GVS model.
Attributes:
| Name | Type | Description |
|---|---|---|
link |
ContinuumLinkParams
|
Batched continuum-link parameters. Link stiffness and damping use the padded generalized-coordinate dimension configured by the GVS structure. |
joint |
JointParams
|
Batched joint stiffness and damping matrices using the same
padded generalized-coordinate dimension as |
gravity |
Array | None
|
Gravity vector with shape |
validate_structure
¶
Validate intrinsic GVS parameter structure.
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If a component shape is invalid, link and joint batch shapes disagree, reference strains do not have six components, or the gravity array has an invalid shape. |
validate_structure_compatibility
¶
validate_structure_compatibility(structure: GVSStructure) -> None
Validate dynamic array shapes against a static padded GVS layout.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
structure
|
GVSStructure
|
Static :class: |
required |
Returns:
| Type | Description |
|---|---|
None
|
|
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
ValueError
|
If the structure is empty or any parameter batch, padded matrix, cross-section coefficient array, basis DOF, or quadrature setting is structurally inconsistent. |
validate_value_compatibility
¶
validate_value_compatibility(structure: GVSStructure) -> None
Validate eager geometry values against the static GVS layout.
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_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.
HelicoidalBackboneParams
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.gvs.params.HelicoidalBackboneParams[HelicoidalBackboneParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.gvs.params.HelicoidalBackboneParams
click soromox.systems.gvs.params.HelicoidalBackboneParams href "" "soromox.systems.gvs.params.HelicoidalBackboneParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Endpoint sectional stiffnesses for one segment in its backbone material frame.
The coefficients describe the equivalent rod's effective lattice response.
Local x is longitudinal and y/z are transverse, with component order
[twist, bend_y, bend_z, extension, shear_y, shear_z]. Individual helical
strands' properties must first be reduced to this backbone constitutive law.
Compliance varies linearly over normalized reference backbone arc length
u = s/L, measured from the segment's proximal end:
C(u) = (1-u)/stiffness_base + u/stiffness_tip. The sectional stiffness
is diag(1/C(u)). Equal endpoint values give constant stiffness.
All six endpoint entries must be finite and positive. Active strains are
selected by the segment's strain basis.
Pass this object to with_constitutive_params for Gauss projection.
Reapplying it after a length change preserves the endpoint stiffnesses and
stretches the profile over the new length. Numeric updates reuse compilation
with fixed shapes and dtypes.
Attributes:
| Name | Type | Description |
|---|---|---|
stiffness_base |
Array
|
Diagonal sectional stiffness at the segment's proximal
end, shape |
stiffness_tip |
Array
|
Diagonal sectional stiffness at the segment's distal end, with the same shape, component order, frame, and units. |
damping_time_constant |
Array
|
Kelvin-Voigt time constant [s], either a scalar
shared by all strains or shape |
admissible_strains |
tuple[bool, ...]
|
Six static flags in native strain order. Active basis strains must be admissible. Helix conversion marks inadmissible shear entries false; their endpoint values are finite padding. Numeric replacements preserve these restrictions. |
from_compliance
classmethod
¶
from_compliance(*, compliance: Array, compliance_gradient: Array, length: Array, damping_time_constant: Array, admissible_strains: tuple[bool, ...] = (True,) * 6) -> Self
Convert an affine compliance law to endpoint stiffnesses.
Evaluates C(s) = compliance + (L-s)*compliance_gradient at both
ends. The supplied length is used for conversion; the returned
object stores endpoint stiffnesses. Subsequent length changes preserve
those values when the law is reprojected.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
compliance
|
Array
|
Distal backbone-frame compliance, shape |
required |
compliance_gradient
|
Array
|
Compliance variation per unit reference distance
from the distal end, shape |
required |
length
|
Array
|
Positive scalar reference backbone length [m]. |
required |
damping_time_constant
|
Array
|
Effective backbone time constant [s], either
a scalar or shape |
required |
admissible_strains
|
tuple[bool, ...]
|
Static flags identifying admissible basis strains. |
(True,) * 6
|
Returns:
| Type | Description |
|---|---|
Self
|
Endpoint parameters reproducing the supplied law at this length. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If shapes are incompatible, length is invalid, compliance is not finite and positive throughout a link, or damping is invalid. |
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.
HelicoidalHelixParams
¶
Bases: BaseSystemParams
flowchart TD
soromox.systems.gvs.params.HelicoidalHelixParams[HelicoidalHelixParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseSystemParams --> soromox.systems.gvs.params.HelicoidalHelixParams
click soromox.systems.gvs.params.HelicoidalHelixParams href "" "soromox.systems.gvs.params.HelicoidalHelixParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Helix-domain material and geometry for one soft helicoidal segment.
Two equally spaced winding families share a constant strand cross-section normal to each strand's tangent. The segment backbone is straight along local x in its printed reference configuration. Each strand frame has x along its tangent, y along the projected outward radial direction, and z completing a right-handed frame. All lengths are in metres and angles in radians.
to_backbone() linearizes the unloaded lattice, solves six unit-load cases at
the soft segment tip relative to its fixed base, then fits the reference
toolkit's affine bending-compliance and constant torsion/extension law. Both
compliance measurement points are the soft segment ends.
This eager preparation step is independent of the runtime GVS strain basis.
Recompute it after material or geometry updates; prepared matrices can be
installed with compilation reuse when structure/shapes/dtypes stay fixed.
Run the sparse reduction eagerly, outside JAX transformations.
Attributes:
| Name | Type | Description |
|---|---|---|
length |
Array
|
Soft segment's reference backbone length [m]. |
radius_base |
Array
|
Helix centreline radius at the base [m]. |
radius_tip |
Array
|
Helix centreline radius at the tip [m]; linear taper in between. |
num_turns |
Array
|
Number of revolutions each strand makes around the backbone
over |
density |
Array
|
Strand material mass density [kg/m³]. Strand volumes are summed additively, neglecting overlap at fused crossings. |
young_modulus |
Array
|
Strand material Young's modulus [Pa]. |
shear_modulus |
Array
|
Strand material shear modulus [Pa]. |
strand_cross_section |
StrandCrossSection | None
|
Optional strand cross-section geometry retained by the shape constructors. Direct property-only construction leaves it unset. |
strand_constitutive_law |
RodConstitutiveLaw
|
Static strand shear/torsion choices. Defaults use effective shear and Saint-Venant torsion, with Marshall for rectangles. Cowper shear uses Poisson ratio E/(2G)-1. |
strand_area_override |
Array | None
|
Optional calibrated material area [m²]. |
strand_second_moments_override |
Array | None
|
Optional calibrated principal y/z area
moments, shape |
strand_torsion_constant_override |
Array | None
|
Optional calibrated torsion constant [m⁴]. |
strand_shear_factors_override |
Array | None
|
Optional calibrated y/z shear factors,
shape |
helices_per_direction |
int
|
Positive number of strands in each winding family. |
phase |
Array
|
Base azimuth of the first negative-winding strand [rad]. |
winding_family_phase_offset |
Array
|
Base azimuth of the first positive-winding strand relative to the first negative-winding strand [rad]. For example, π/6 separates the two families by 30° at the segment base. |
fusion_stiffness_multiplier |
Array
|
Dimensionless multiplier of the stiffness of fused strand crossings, computed from material moduli and a square contact patch of side sqrt(strand_area). Larger values make the connections stiffer; 1 uses the contact-patch estimate. |
tip_attachment_stiffness_multiplier |
Array
|
Stiffness of each strand's attachment to the tip ring relative to a fused crossing. The reference uses 10; strand bases are rigidly attached. |
damping_time_constant |
Array
|
Effective backbone Kelvin-Voigt time constant [s],
either a scalar or shape |
References
CharlesQueen (2026). helicoid-toolkit, spec/identify.py, lattice/assembly2.py and rod/equiv_rod.py, revision 76c659d. https://github.com/CharlesQueen/helicoid-toolkit
Qin et al. (2026). Cosserat Modeling of Trimmed Helicoid Soft Arms with a Separated-Section Constitutive Law. arXiv:2609.25264. https://arxiv.org/abs/2609.25264
strand_cross_section_properties
property
¶
strand_cross_section_properties: RodCrossSectionProperties
Resolve current geometry, material and law, then apply calibration overrides.
Derived quantities follow parameter updates without caching. Calibrated shear factors multiply the resolved material area to give effective areas.
strand_second_moments
property
¶
Resolved principal y/z area moments [m⁴].
replace
¶
Replace geometry, material, static law or calibration fields together.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
object
|
Parameter fields to replace. Set an override to |
{}
|
Returns:
| Type | Description |
|---|---|
Self
|
A validated helix parameter object with the requested changes. |
from_cross_section
classmethod
¶
from_cross_section(strand_cross_section: StrandCrossSection, **kwargs) -> Self
Derive mechanical properties and retain geometry for visualization.
Geometry, material and the strand law determine the current properties.
Optional strand_*_override keywords supply calibrated properties.
Other keywords specify lattice geometry, material and fusion.
circular
classmethod
¶
Construct solid circular strands, retaining their radius [m].
circular_hollow
classmethod
¶
Construct circular tubes from outer radius and wall thickness [m].
rectangular
classmethod
¶
Construct solid rectangular strands with height along y, width along z [m].
rectangular_hollow
classmethod
¶
Construct hollow rectangular strands with height along y, width along z.
Dimensions are in metres. The default strand law uses Marshall torsion and Jourawski effective shear areas. Calibration overrides can supply individual sectional properties.
sectional_inertia
¶
Evaluate strand inertia per reference backbone length at positions s.
Sum strand-normal section inertias after rotating into the backbone frame and shifting to its centreline. The arc-length factor converts strand length to backbone length. Each section moves with its backbone material frame. Strand volumes are additive at crossings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
Array
|
Reference backbone arc positions [m], scalar or array, in [0, length]. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Angular-first spatial inertia, shape |
Array
|
coupling and translational blocks have units kg m, kg and kg/m. |
Array
|
Supports JAX differentiation and compilation. |
to_backbone
¶
to_backbone() -> HelicoidalBackboneParams
Fit endpoint stiffnesses and admissible strains for this segment.
Run eagerly on the CPU after material or geometry updates. The returned
admissible_strains identifies which strains the fitted law supports;
use it when choosing the segment's strain basis. Inadmissible residual
shear constrains both shear strains. An inadmissible bending, torsion,
or extension fit raises ValueError.
reduction_diagnostics
¶
Run the reduction and return diagnostics for inspecting the fit.
Returns:
| Type | Description |
|---|---|
dict[str, Array | float]
|
A dictionary containing |
dict[str, Array | float]
|
compliance at the soft tip relative to its fixed base, in native |
dict[str, Array | float]
|
|
dict[str, Array | float]
|
to tip moments/forces; block units are 1/(N m), 1/N and m/N. |
dict[str, Array | float]
|
|
dict[str, Array | float]
|
after subtracting fitted bending [m/N]; values <= 1e-9 constrain |
dict[str, Array | float]
|
shear. |
dict[str, Array | float]
|
before symmetrization, measuring numerical solve accuracy. |
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.
soromox.systems.gvs.structures
¶
GVSLinkStructure
¶
Bases: Module
flowchart TD
soromox.systems.gvs.structures.GVSLinkStructure[GVSLinkStructure]
click soromox.systems.gvs.structures.GVSLinkStructure href "" "soromox.systems.gvs.structures.GVSLinkStructure"
Static link choices for one GVS segment.
This stores only choices that affect compilation or dispatch. Numeric link
values such as length, material constants, and cross-section dimensions live
in GVSParams.link.
Attributes:
| Name | Type | Description |
|---|---|---|
cross_section_geometry |
CrossSectionGeometry
|
Static cross-section boundary family. |
cross_section_profile_types |
tuple[ProfileType, ...]
|
Profile type for each geometry dimension. |
cross_section_profile_parameter_counts |
tuple[int, ...]
|
Number of packed coefficients consumed by each geometry dimension. |
hollow |
bool
|
Whether an additional wall-thickness profile defines a cavity. |
constitutive_law |
RodConstitutiveLaw
|
Static transverse-shear and torsion choices. |
GVSJointStructure
¶
Bases: Module
flowchart TD
soromox.systems.gvs.structures.GVSJointStructure[GVSJointStructure]
click soromox.systems.gvs.structures.GVSJointStructure href "" "soromox.systems.gvs.structures.GVSJointStructure"
Static joint choices for one GVS segment.
Joint stiffness and damping are dynamic and live in GVSParams.joint.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Joint family name. |
axis |
str
|
Material-frame axis for axis-based joints. |
plane |
str
|
Motion plane for planar joints. |
pitch |
float
|
Translation per radian for a helical joint. |
GVSStrainBasisStructure
¶
Bases: Module
flowchart TD
soromox.systems.gvs.structures.GVSStrainBasisStructure[GVSStrainBasisStructure]
click soromox.systems.gvs.structures.GVSStrainBasisStructure href "" "soromox.systems.gvs.structures.GVSStrainBasisStructure"
Static strain-basis choices for one GVS segment.
Reference strain is dynamic and lives in GVSParams.link.reference_strain.
Attributes:
| Name | Type | Description |
|---|---|---|
type |
str
|
Variable-strain basis family. |
strain_selector |
tuple[Any, ...]
|
Six-element active-strain mask. |
basis_order |
tuple[Any, ...]
|
Six-element basis-order tuple. |
GVSSegmentStructure
¶
Bases: Module
flowchart TD
soromox.systems.gvs.structures.GVSSegmentStructure[GVSSegmentStructure]
click soromox.systems.gvs.structures.GVSSegmentStructure href "" "soromox.systems.gvs.structures.GVSSegmentStructure"
Static structure for one GVS segment.
Attributes:
| Name | Type | Description |
|---|---|---|
link |
GVSLinkStructure
|
Static link geometry and profile choices. |
joint |
GVSJointStructure
|
Static joint kinematic choices. |
basis |
GVSStrainBasisStructure
|
Static link strain-basis choices. |
num_gauss_points |
int
|
Number of Gauss points used for segment quadrature. |
GVSStructure
¶
Bases: Module
flowchart TD
soromox.systems.gvs.structures.GVSStructure[GVSStructure]
click soromox.systems.gvs.structures.GVSStructure href "" "soromox.systems.gvs.structures.GVSStructure"
Static GVS segment structure and padded layout choices.
segments stores stripped static segment structures: joint families, basis
families/orders/active masks, quadrature counts, and cross-section families.
Dynamic numeric values live in GVSParams.
Attributes:
| Name | Type | Description |
|---|---|---|
segments |
tuple[GVSSegmentStructure, ...]
|
Non-empty tuple of static segment structures. |
max_dof |
int | None
|
Common padded link and joint generalized-coordinate dimension,
or |
max_num_gauss_points |
int | None
|
Common quadrature padding size, or |
scale_rotational_basis_by_length |
bool
|
Whether rotational strain-basis rows are divided by link length. |
soromox.systems.pendulum.params
¶
PendulumParams
¶
Bases: BaseArticulatedSoftRobotParams
flowchart TD
soromox.systems.pendulum.params.PendulumParams[PendulumParams]
soromox.systems.params.BaseArticulatedSoftRobotParams[BaseArticulatedSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseArticulatedSoftRobotParams --> soromox.systems.pendulum.params.PendulumParams
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseArticulatedSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.pendulum.params.PendulumParams href "" "soromox.systems.pendulum.params.PendulumParams"
click soromox.systems.params.BaseArticulatedSoftRobotParams href "" "soromox.systems.params.BaseArticulatedSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Dynamic parameters for planar pendulum chains.
The leading axis indexes links/joints. moment_inertia and
center_of_mass_length are per link, while stiffness and damping are
generalized-coordinate matrices inherited from the articulated base class.
Fixed mounting belongs to the constructed model and floating pose belongs
to runtime configuration state.
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.
soromox.systems.articulated.params
¶
ArticulatedSoftRobotParams
¶
ArticulatedSoftRobotParams(*, joint_screw: Array, parent_to_joint_transform: Array, tip_position: Array, center_of_mass_position: Array, mass: Array, center_of_mass_inertia: Array, gravity: Array | None = None, joint_stiffness: Array, joint_damping: Array, joint_rest_configuration: Array, radius: Array)
Bases: BaseArticulatedSoftRobotParams
flowchart TD
soromox.systems.articulated.params.ArticulatedSoftRobotParams[ArticulatedSoftRobotParams]
soromox.systems.params.BaseArticulatedSoftRobotParams[BaseArticulatedSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.params.BaseArticulatedSoftRobotParams --> soromox.systems.articulated.params.ArticulatedSoftRobotParams
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseArticulatedSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.articulated.params.ArticulatedSoftRobotParams href "" "soromox.systems.articulated.params.ArticulatedSoftRobotParams"
click soromox.systems.params.BaseArticulatedSoftRobotParams href "" "soromox.systems.params.BaseArticulatedSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Dynamic parameters for spatial articulated soft robots.
Per-joint screw axes and transforms define the dynamic link geometry used by the articulated model. The number of joints is fixed by array shapes. Fixed mounting belongs to the constructed model and floating pose belongs to runtime configuration state.
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.
McKibbenActuatedUMArmParams
¶
McKibbenActuatedUMArmParams(*, joint_screw: Array, parent_to_joint_transform: Array, tip_position: Array, center_of_mass_position: Array, mass: Array, center_of_mass_inertia: Array, gravity: Array | None = None, joint_stiffness: Array, joint_damping: Array, joint_rest_configuration: Array, radius: Array, joint_armature: Array)
Bases: ArticulatedSoftRobotParams
flowchart TD
soromox.systems.articulated.params.McKibbenActuatedUMArmParams[McKibbenActuatedUMArmParams]
soromox.systems.articulated.params.ArticulatedSoftRobotParams[ArticulatedSoftRobotParams]
soromox.systems.params.BaseArticulatedSoftRobotParams[BaseArticulatedSoftRobotParams]
soromox.systems.params.BaseSoftRobotParams[BaseSoftRobotParams]
soromox.systems.params.BaseSystemParams[BaseSystemParams]
soromox.systems.articulated.params.ArticulatedSoftRobotParams --> soromox.systems.articulated.params.McKibbenActuatedUMArmParams
soromox.systems.params.BaseArticulatedSoftRobotParams --> soromox.systems.articulated.params.ArticulatedSoftRobotParams
soromox.systems.params.BaseSoftRobotParams --> soromox.systems.params.BaseArticulatedSoftRobotParams
soromox.systems.params.BaseSystemParams --> soromox.systems.params.BaseSoftRobotParams
click soromox.systems.articulated.params.McKibbenActuatedUMArmParams href "" "soromox.systems.articulated.params.McKibbenActuatedUMArmParams"
click soromox.systems.articulated.params.ArticulatedSoftRobotParams href "" "soromox.systems.articulated.params.ArticulatedSoftRobotParams"
click soromox.systems.params.BaseArticulatedSoftRobotParams href "" "soromox.systems.params.BaseArticulatedSoftRobotParams"
click soromox.systems.params.BaseSoftRobotParams href "" "soromox.systems.params.BaseSoftRobotParams"
click soromox.systems.params.BaseSystemParams href "" "soromox.systems.params.BaseSystemParams"
Dynamic parameters for the articulated UMArm body.
These parameters contain the rigid-link dynamics, compliant-joint mechanics,
visualization radii, base pose, gravity, and per-joint rotor armature. The
McKibben attachment geometry and pneumatic constitutive parameters belong to
:class:soromox.actuation.ArticulatedMcKibbenActuatorParams, so body and
actuator parameters can be updated independently.
from_cached_npz
classmethod
¶
from_cached_npz(path: str | Path) -> McKibbenActuatedUMArmParams
Load the articulated UMArm body from the existing cache format.
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.