Planar HSA¶
Planar Handed Shearing Auxetics (HSA) is a specialized planar PCS system for multi-rod auxetic soft robots. It uses the common PCS propagation and dynamics interfaces while adding HSA-specific rod geometry, platform and cap bodies, underactuation, and optional Bouc--Wen hysteresis.
API Reference¶
soromox.systems.pcs.planar_hsa.PlanarHSA
¶
PlanarHSA(params: PlanarHSAParams, structure: PlanarHSAStructure | None = None, *, base_pose: Array | None = None, floating_base: bool = False, **kwargs: Any)
Bases: PlanarPCS
flowchart TD
soromox.systems.pcs.planar_hsa.PlanarHSA[PlanarHSA]
soromox.systems.pcs.planar_pcs.PlanarPCS[PlanarPCS]
soromox.systems.soft_robot.SoftRobot[SoftRobot]
soromox.systems.dynamical_system.DynamicalSystem[DynamicalSystem]
soromox.systems.pcs.planar_pcs.PlanarPCS --> soromox.systems.pcs.planar_hsa.PlanarHSA
soromox.systems.soft_robot.SoftRobot --> soromox.systems.pcs.planar_pcs.PlanarPCS
soromox.systems.dynamical_system.DynamicalSystem --> soromox.systems.soft_robot.SoftRobot
click soromox.systems.pcs.planar_hsa.PlanarHSA href "" "soromox.systems.pcs.planar_hsa.PlanarHSA"
click soromox.systems.pcs.planar_pcs.PlanarPCS href "" "soromox.systems.pcs.planar_pcs.PlanarPCS"
click soromox.systems.soft_robot.SoftRobot href "" "soromox.systems.soft_robot.SoftRobot"
click soromox.systems.dynamical_system.DynamicalSystem href "" "soromox.systems.dynamical_system.DynamicalSystem"
Kinematic and dynamic model for planar Handed Shearing Auxetics (HSA) robots.
The model uses a piecewise-constant virtual backbone with strain ordering
[kappa_b, sigma_sh, sigma_a] per segment: bending curvature, shear
strain, and axial strain. Physical rods are mapped to the virtual backbone
through their offsets, and rigid caps, platforms, and the payload are
included in forward kinematics and dynamics.
PlanarHSA reuses the planar PCS layout, SE(2) propagation, fixed Gauss--Legendre quadrature, strain selection, and differentiable-system interfaces. Kinematics, Jacobians, energies, forces, and forward dynamics are evaluated numerically with JAX and support JIT compilation. Optional underactuation maps motor inputs to rod forces, while optional Bouc--Wen hysteresis augments the elastic response.
Based on
Stölzle, M., Rus, D., & Della Santina, C. (2024). An experimental study of model-based control for planar handed shearing auxetics robots. In Experimental Robotics: The 18th International Symposium (pp. 153-167). Springer. https://doi.org/10.1007/978-3-031-63596-0_14
Attributes:
| Name | Type | Description |
|---|---|---|
num_segments |
Number of constant-strain segments. |
|
num_rods_per_segment |
int
|
Number of physical rods per segment. |
num_dofs |
int
|
Number of active strain coordinates. |
num_actuators |
Number of motor or direct-torque input channels. |
|
consider_underactuation |
bool
|
Whether motor-to-rod actuation is enabled. |
consider_hysteresis |
bool
|
Whether Bouc--Wen hysteresis is enabled. |
num_hysteresis |
int
|
Number of hysteresis state variables. |
B_xi |
Basis mapping active coordinates to virtual-backbone strains. |
|
L |
Flexible segment lengths. |
|
L_cum |
Cumulative flexible segment lengths. |
|
length |
Array
|
Total backbone length inherited from :class: |
rod_offset |
Array
|
Physical rod offsets from the virtual backbone. |
platform_dimension |
Array
|
Platform width, height, and depth per segment. |
proximal_cap_length |
Array
|
Rigid proximal cap lengths. |
distal_cap_length |
Array
|
Rigid distal cap lengths. |
end_effector_offset |
Array
|
End-effector pose offset |
xi_ref |
Runtime reference virtual-backbone strain inherited from
:class: |
|
phi_max |
Array
|
Motor limits for underactuated operation. |
hysteresis_basis |
Array
|
Basis mapping hysteresis states to full strains. |
hysteresis_alpha |
Array
|
Post-yield to pre-yield stiffness ratios. |
hysteresis_A |
Array
|
Bouc--Wen |
hysteresis_n |
Array
|
Bouc--Wen exponents. |
hysteresis_beta |
Array
|
Bouc--Wen |
hysteresis_gamma |
Array
|
Bouc--Wen |
Initialize a numerical planar HSA model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
PlanarHSAParams
|
Typed physical parameters for the HSA rods, rigid bodies, constitutive laws, and optional hysteresis model. |
required |
structure
|
PlanarHSAStructure | None
|
Numerical settings such as quadrature order, active
strain selection, and underactuation/hysteresis switches.
Defaults to :class: |
None
|
**kwargs
|
Any
|
Additional :class: |
{}
|
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
ValueError
|
If the typed parameters or numerical settings are invalid. |
tangent_eps
property
¶
Epsilon value for Lie algebra tangent computations.
Returns:
| Name | Type | Description |
|---|---|---|
Array |
Array
|
Epsilon value for Lie algebra tangent computations. |
num_base_coordinates
property
¶
Return the configuration-storage dimension of the base.
Returns:
| Type | Description |
|---|---|
int
|
Zero for fixed robots, three for planar floating robots, and seven |
int
|
for spatial floating robots. |
num_base_velocities
property
¶
Return the generalized-velocity dimension of the base.
Returns:
| Type | Description |
|---|---|
int
|
Zero for fixed robots, three for planar floating robots, and six |
int
|
for spatial floating robots. |
num_coordinates
property
¶
Return the total configuration dimension.
Returns:
| Type | Description |
|---|---|
int
|
|
num_velocities
property
¶
Return the total generalized-velocity dimension.
Returns:
| Type | Description |
|---|---|
int
|
|
num_auxiliary_states
property
¶
Return the number of trailing first-order auxiliary states.
Returns:
| Type | Description |
|---|---|
int
|
The hysteresis-state dimension, or zero for systems without |
int
|
auxiliary dynamics. |
state_size
property
¶
Return the flattened first-order state dimension.
Returns:
| Type | Description |
|---|---|
int
|
|
actuator_input_metadata
property
¶
actuator_input_metadata: tuple[ActuatorMetadata, ...]
Metadata groups in the same order used to concatenate controls.
segment_length
property
¶
Return the per-segment backbone lengths.
Returns:
| Type | Description |
|---|---|
Array
|
Array with shape |
is_planar
property
¶
Return whether the system is planar.
Returns:
| Type | Description |
|---|---|
bool
|
Always |
supports_articulated_tendon_routing
property
¶
Whether joint indices describe a serial articulated routing topology.
base_transform
property
¶
Return the homogeneous transform of the fixed/internal base pose.
Planar robots consume [theta, x, y] and return an SE(2) matrix with
shape (3, 3). Spatial robots consume
[qx, qy, qz, qw, x, y, z] and return an SE(3) matrix with shape
(4, 4). Spatial quaternions are scalar-last Hamilton quaternions.
with_params
¶
with_params(params: PlanarHSAParams) -> PlanarHSA
Return a model copy with all physical parameters replaced.
The number of segments and rods is part of the model structure. A change to either shape therefore requires constructing a new model; all other parameter changes refresh the state-independent caches on the returned copy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
PlanarHSAParams
|
Validated HSA parameters with the same segment and rod layout as this model. |
required |
Returns:
| Type | Description |
|---|---|
PlanarHSA
|
A new :class: |
Raises:
| Type | Description |
|---|---|
TypeError
|
If |
ValueError
|
If the segment or rod layout changes. |
update_params
¶
update_params(**updates: Array) -> PlanarHSA
Return a model copy with selected physical fields replaced.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Array
|
Field names and replacement values accepted by
:meth: |
{}
|
Returns:
| Type | Description |
|---|---|
PlanarHSA
|
A new model with refreshed numerical caches. |
cross_section_geometry
¶
Return a renderer-compatible cross-section descriptor.
HSA rods are represented by a circular section whose radius is the
largest rod offset in the segment containing s. The generalized
coordinates do not affect this geometric descriptor.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates. Accepted for the common renderer API. |
required |
s
|
Array
|
Arc-length coordinate along the flexible backbone. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A pair containing the circular-section enum and a one-element |
Array
|
array containing the section radius. |
virtual_to_physical_strains
¶
Map virtual-backbone strains to physical rod strains.
The virtual strain vector uses three components per segment. HSA rods share bending and shear strains, while the axial strain of a rod is shifted by its signed lateral offset and the segment curvature.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
vxi
|
Array
|
Virtual strains with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical rod strains with shape |
Array
|
|
physical_to_virtual_strains
¶
Map physical rod strains to the least-squares virtual strain.
The inverse uses the mean across rods and removes the offset-induced axial contribution from the virtual axial component.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pxi
|
Array
|
Physical rod strains with shape
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Virtual strains flattened to shape |
forward_kinematics_rod
¶
Return the pose of a physical rod centerline point.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
s
|
Array
|
Arc-length coordinate along the flexible backbone. |
required |
rod_idx
|
Array
|
Index of the rod within the segment containing |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Planar pose |
forward_kinematics_platform
¶
Return the pose of the platform belonging to one segment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
segment_idx
|
Array
|
Integer segment index. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Planar pose |
forward_kinematics_end_effector
¶
Return the pose of the HSA end effector.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
End-effector pose |
Array
|
the distal cap, platform, and configured end-effector offset. |
jacobian_end_effector
¶
Return the end-effector geometric Jacobian.
The row ordering is [x, y, theta] and the columns correspond to
the active generalized coordinates. The result maps generalized
velocities to the planar end-effector velocity in the inertial frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
jacobian_and_time_derivative_end_effector
¶
Return the end-effector Jacobian and its time derivative.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A pair |
Array
|
|
inverse_kinematics
¶
Solve one-segment constant-strain inverse kinematics.
The analytic solution accounts for the proximal and distal rigid geometry and returns active coordinates that reproduce the requested end-effector pose. As in the underlying model, this method is only defined for a single flexible segment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
chi_ee
|
Array
|
Desired end-effector pose |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Active generalized coordinates with shape |
Raises:
| Type | Description |
|---|---|
AssertionError
|
If the model has more than one segment. |
integration_kinematics
¶
Return quadrature poses, Jacobians, and Jacobian derivatives.
The returned quantities are assembled over the interior fixed Gauss--Legendre points of every flexible segment and are used by the numerical dynamics implementation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
|
Array
|
|
Array
|
arrays have shape |
inertia_matrix
¶
Return the active-coordinate generalized inertia matrix.
The matrix is assembled from the physical rods, rigid platforms, caps, and payload using the fixed Gauss--Legendre grid. It is symmetric and positive semidefinite up to numerical round-off.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Inertia matrix with shape |
coriolis_matrix
¶
Return the Christoffel-consistent Coriolis matrix.
The matrix is constructed analytically from the configuration
derivative of the inertia matrix. It satisfies the convention used
by :class:SoftRobot, namely that C(q, qd) @ qd is the convective
generalized force.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
qd
|
Array
|
Generalized velocities with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Coriolis matrix with shape |
stiffness_matrix
¶
Return the cached active-coordinate elastic stiffness matrix.
elastic_force
¶
Return the generalized elastic force at configuration q.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Elastic generalized force with shape |
damping_matrix
¶
Return the cached active-coordinate damping matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates. The HSA damping matrix is configuration independent, so this argument is unused. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Damping matrix with shape |
actuation_force
¶
Return generalized forces generated by HSA actuation.
With underactuation disabled, phi is interpreted directly as an
active generalized-force vector. With underactuation enabled, it is
interpreted as one motor rotation per physical rod and mapped through
the HSA rod stiffness and strain geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
phi
|
Array
|
Motor rotations or direct generalized forces, depending on
|
required |
qd
|
Array | None
|
Generalized velocities. Accepted for the common actuation API; HSA actuation is velocity independent. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Generalized actuation force with shape |
hysteresis_force
¶
Return the generalized force contributed by hysteresis state z.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates. The force depends only on the configured hysteresis state for this model. |
required |
z
|
Array
|
Hysteresis coordinates with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Generalized hysteresis force with shape |
dynamics_terms
¶
dynamics_terms(q: Array, qd: Array, *, backend: ExecutionBackend | None = None) -> tuple[Array, Array, Array]
Return inertia, convective, and gravitational dynamics terms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized coordinates with shape |
required |
qd
|
Array
|
Generalized velocities with shape |
required |
backend
|
ExecutionBackend | None
|
Optional backend override. PlanarHSA currently supports JAX execution only. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
A tuple |
Array
|
|
Raises:
| Type | Description |
|---|---|
NotImplementedError
|
If Warp execution is requested. |
forward_dynamics
¶
Compute the HSA first-order state derivative.
The state is [q, qd] without hysteresis and [q, qd, z] when
hysteresis is enabled. The supplied actuation tuple may contain the
motor/direct-force input and optionally an external generalized force.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t
|
Array
|
Simulation time. HSA dynamics are autonomous, so this argument is accepted but not used explicitly. |
required |
y
|
Array
|
State vector with shape |
required |
actuation_args
|
tuple | None
|
|
None
|
Returns:
| Type | Description |
|---|---|
Array
|
State derivative with the same shape as |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
project_state
¶
Project a state onto the robot's configuration manifold.
Fixed and planar systems return the original state without additional array operations. Spatial floating systems normalize the leading scalar-last quaternion while preserving velocity and auxiliary state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y
|
Array
|
State with trailing dimension |
required |
Returns:
| Type | Description |
|---|---|
Array
|
State with a unit floating-base quaternion when applicable. |
rollout_to
¶
rollout_to(initial_state: SystemState, u: Array | None = None, tau_ext: Array | None = None, environment_model: Callable[[SystemState], tuple[Array | None, Any | None]] | None = None, t1: float | Array = 10.0, solver_dt: float | Array = 0.0001, save_dt: float | Array | None = 0.01, save_ts: Array | Sequence[float] | None = None, solver: AbstractSolver | None = None, stepsize_controller: AbstractStepSizeController | None = ConstantStepSize(), max_steps: int | None = None) -> SystemState
Roll out the system dynamics in open loop using Diffrax.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_state
|
SystemState
|
Dataclass holding the initial time, system state vector (y), optional actuation (u), and optional control state. |
required |
u
|
Array | None
|
Constant actuation to apply throughout the rollout. If not provided,
falls back to |
None
|
tau_ext
|
Array | None
|
External forces/torques applied to the system (broadcast as constant). |
None
|
environment_model
|
Callable[[SystemState], tuple[Array | None, Any | None]] | None
|
Optional callable that accepts a |
None
|
t1
|
float | Array
|
Final time of the simulation, included in the saved trajectory. |
10.0
|
solver_dt
|
float | Array
|
Time step for the solver. |
0.0001
|
save_dt
|
float | Array | None
|
Time interval at which to save the solution when |
0.01
|
save_ts
|
Array | Sequence[float] | None
|
Explicit time points to be saved in the output. Must be within
[initial_state.t, t1]. Falls back to |
None
|
solver
|
AbstractSolver | None
|
Solver to use for the ODE integration. |
None
|
stepsize_controller
|
AbstractStepSizeController | None
|
Stepsize controller for the solver. |
ConstantStepSize()
|
max_steps
|
int | None
|
Maximum number of steps for the solver. |
None
|
Returns:
| Type | Description |
|---|---|
SystemState
|
SystemState PyTree containing time samples, system state trajectory, |
SystemState
|
actuation at each saved step, (optionally) the control state |
SystemState
|
trajectory, and (optionally) the environment state trajectory if |
SystemState
|
|
SystemState
|
leading time dimension aligned with |
rollout_closed_loop_to
¶
rollout_closed_loop_to(initial_state: SystemState, controller: Callable[[SystemState], tuple[Array, Any | None]], tau_ext: Array | None = None, environment_model: Callable[[SystemState], tuple[Array | None, Any | None]] | None = None, t1: float | Array = 10.0, solver_dt: float | Array = 0.0001, save_dt: float | Array | None = 0.01, save_ts: Array | Sequence[float] | None = None, solver: AbstractSolver | None = None, stepsize_controller: AbstractStepSizeController | None = ConstantStepSize(), max_steps: int | None = None) -> SystemState
Roll out the system dynamics in closed loop using Diffrax.
The provided controller is queried at every integration step with the current
system state (and optional control_state). Its actuation output is added to any
feed-forward actuation contained in initial_state.u.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_state
|
SystemState
|
Dataclass holding the initial time, system state vector (y), optional actuation (u), and optional control state. |
required |
controller
|
Callable[[SystemState], tuple[Array, Any | None]]
|
Callable that accepts a |
required |
tau_ext
|
Array | None
|
External forces/torques applied to the system (broadcast as constant). |
None
|
environment_model
|
Callable[[SystemState], tuple[Array | None, Any | None]] | None
|
Optional callable that accepts a |
None
|
t1
|
float | Array
|
Final time of the simulation, included in the saved trajectory. |
10.0
|
solver_dt
|
float | Array
|
Time step for the solver. |
0.0001
|
save_dt
|
float | Array | None
|
Time interval at which to save the solution when |
0.01
|
save_ts
|
Array | Sequence[float] | None
|
Explicit time points to be saved in the output. Must be within
[initial_state.t, t1]. Falls back to |
None
|
solver
|
AbstractSolver | None
|
Solver to use for the ODE integration. |
None
|
stepsize_controller
|
AbstractStepSizeController | None
|
Stepsize controller for the solver. |
ConstantStepSize()
|
max_steps
|
int | None
|
Maximum number of steps for the solver. |
None
|
Returns:
| Type | Description |
|---|---|
SystemState
|
SystemState PyTree containing time samples, system state trajectory, |
SystemState
|
actuation at each saved step, controller state trajectory, and |
SystemState
|
(optionally) the environment state trajectory if |
SystemState
|
|
SystemState
|
leading time dimension aligned with |
rollout_discrete_closed_loop_to
¶
rollout_discrete_closed_loop_to(initial_state: SystemState, controller: Callable[[SystemState], tuple[Array, Any | None]], tau_ext: Array | None = None, environment_model: Callable[[SystemState], tuple[Array | None, Any | None]] | None = None, duration: float = 10.0, solver_dt: float | Array = 0.0001, control_dt: float = 0.01, save_dt: float = 0.01, solver: AbstractSolver | None = None, stepsize_controller: AbstractStepSizeController | None = ConstantStepSize(), max_steps: int | None = None) -> SystemState
Roll out the system in discrete-time closed loop.
The controller is evaluated every control_dt seconds. Between control
evaluations the actuation is held constant and the system is integrated
with Diffrax (equivalent to repeatedly calling rollout_to over each
control interval).
The controller signature mirrors rollout_closed_loop_to. If it returns a
control_state_dot and initial_state.control_state is provided, the
control state is advanced with a forward-Euler step over the control period;
otherwise the control state is held constant between controller calls.
The rollout uses a regular time grid. For static tracing/compilation the
following constraints are enforced:
- duration is an integer multiple of control_dt.
- control_dt is an integer multiple of save_dt.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
initial_state
|
SystemState
|
initial time/state (and optional feedforward actuation/control state). |
required |
controller
|
Callable[[SystemState], tuple[Array, Any | None]]
|
callable returning |
required |
tau_ext
|
Array | None
|
constant external wrench/force applied during the rollout. |
None
|
environment_model
|
Callable[[SystemState], tuple[Array | None, Any | None]] | None
|
Optional callable returning
|
None
|
duration
|
float
|
simulation duration in seconds. |
10.0
|
solver_dt
|
float | Array
|
initial step size for the solver. |
0.0001
|
control_dt
|
float
|
sampling period for the controller. Must be positive. |
0.01
|
save_dt
|
float
|
save interval. Must be positive and evenly divide |
0.01
|
solver
|
AbstractSolver | None
|
Diffrax solver. |
None
|
stepsize_controller
|
AbstractStepSizeController | None
|
Diffrax stepsize controller. |
ConstantStepSize()
|
max_steps
|
int | None
|
maximum solver steps. |
None
|
Returns:
| Type | Description |
|---|---|
SystemState
|
SystemState PyTree containing time samples, system state trajectory, |
SystemState
|
actuation at each saved step, controller state trajectory, and |
SystemState
|
(optionally) the environment state trajectory if |
SystemState
|
|
SystemState
|
leading time dimension aligned with the regular save grid. |
pack_configuration
¶
Pack internal coordinates and a runtime base pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q_internal
|
Array
|
Internal coordinates with trailing dimension
|
required |
base_pose
|
Array | None
|
Required runtime pose for floating robots. Fixed robots reject this argument. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Total configuration with trailing dimension |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a required base pose is missing, a fixed robot is given a runtime pose, or a trailing dimension is invalid. |
split_configuration
¶
Split total configuration into base and internal coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Configuration with trailing dimension |
required |
Returns:
| Type | Description |
|---|---|
tuple[Array | None, Array]
|
|
pack_velocity
¶
Pack internal and floating-base generalized velocities.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
qd_internal
|
Array
|
Internal generalized velocity with trailing dimension
|
required |
base_velocity
|
Array | None
|
Optional world-frame base velocity. Omission uses zero for floating robots; fixed robots reject this argument. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Total generalized velocity with trailing dimension |
Array
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If a fixed robot is given a base velocity or a trailing dimension is invalid. |
split_velocity
¶
Split total velocity into base and internal components.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
v
|
Array
|
Generalized velocity with trailing dimension |
required |
Returns:
| Type | Description |
|---|---|
tuple[Array | None, Array]
|
|
pack_state
¶
Pack configuration, velocity, and optional auxiliary state.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Configuration with trailing dimension |
required |
v
|
Array
|
Velocity with trailing dimension |
required |
auxiliary_state
|
Array | None
|
Optional state with trailing dimension
|
None
|
Returns:
| Type | Description |
|---|---|
Array
|
State |
Array
|
dimension |
split_state
¶
Split a state with unequal configuration and velocity dimensions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
y
|
Array
|
State with trailing dimension |
required |
Returns:
| Type | Description |
|---|---|
tuple[Array, Array, Array]
|
|
normalize_configuration
¶
Normalize a floating spatial quaternion without changing hemisphere.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Configuration with trailing dimension |
required |
Returns:
| Type | Description |
|---|---|
Array
|
The unchanged input for fixed or planar robots, or a configuration |
Array
|
whose leading scalar-last quaternion has unit norm. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a concrete spatial quaternion is zero or non-finite. |
configuration_derivative
¶
Map generalized velocity to the derivative of stored coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Configuration with trailing dimension |
required |
v
|
Array
|
Velocity with trailing dimension |
required |
Returns:
| Type | Description |
|---|---|
Array
|
|
Array
|
angular velocity is world-frame and left-multiplies the quaternion. |
retract_configuration
¶
Retract a velocity-space increment onto configuration space.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Configuration with trailing dimension |
required |
delta_v
|
Array
|
Tangent increment with trailing dimension
|
required |
Returns:
| Type | Description |
|---|---|
Array
|
Updated configuration. Spatial rotation increments left-multiply |
Array
|
the scalar-last quaternion and the result is normalized. |
base_transform_from_configuration
¶
Convert the runtime or fixed base pose to homogeneous transforms.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Total configuration for floating robots or internal configuration for fixed robots. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A planar |
with_fixed_base_pose
¶
Return a fixed robot with a different mounting pose.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pose
|
Array
|
Planar pose with shape |
required |
Returns:
| Type | Description |
|---|---|
Self
|
A functionally updated robot with mounting-dependent caches refreshed. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the robot is floating or the pose is invalid. |
precompute
¶
Refresh state-independent matrices cached by the model.
Returns:
| Type | Description |
|---|---|
None
|
|
None
|
and active-coordinate matrices are replaced in place. |
with_actuator_params
¶
Return a robot with one actuator's complete parameter object replaced.
update_actuator_params
¶
Return a robot with selected fields of one actuator's params replaced.
with_passive_element_params
¶
Return a robot with one passive element's complete params replaced.
update_passive_element_params
¶
Return a robot with selected passive-element parameter fields replaced.
forward_kinematics
¶
forward_kinematics(q: Array, s: Array, *, backend: ExecutionBackend | None = None) -> Array
Compute a planar pose at one curvilinear abscissa.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape |
required |
s
|
Array
|
Scalar curvilinear abscissa. |
required |
backend
|
ExecutionBackend | None
|
Optional execution override. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Planar pose |
forward_kinematics_tips
¶
Compute the forward kinematics of the robot at the tips of all segments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
chi_tips |
Array
|
forward kinematics at each segment tip, shape (num_segments, 3) where each row is [theta, x, y]. |
forward_kinematics_abscissa_batched
¶
forward_kinematics_abscissa_batched(q: Array, s_ps: Array, *, backend: ExecutionBackend | None = None) -> Array
Compute planar poses at a batch of curvilinear abscissae.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape |
required |
s_ps
|
Array
|
Curvilinear abscissae with shape |
required |
backend
|
ExecutionBackend | None
|
Optional execution override. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Planar poses with shape |
forward_kinematics_arc_length_derivative
¶
Compute the arc-length derivative of the forward kinematics at s.
The returned tangent has the same shape and representation as
forward_kinematics(q, s).
forward_kinematics_and_arc_length_derivative
¶
Compute forward kinematics and its arc-length derivative at s.
Subclasses can override the protected hook to share intermediate
kinematic quantities between the primal pose and d pose / ds.
jacobian
¶
Compute the Jacobian of the forward kinematics at a point s along the robot.
The Jacobian maps configuration space velocities to operational space (Cartesian/task space) velocities at point s.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
s
|
Array
|
Position parameter along the robot structure. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J |
Array
|
Jacobian matrix of shape (n_pose_dim, num_velocities), where n_pose_dim depends on the robot type: - For 3D robots (PCS): 6 (angular velocity + linear velocity) - For planar robots (PlanarPCS, Pendulum): 3 (omega_z, v_x, v_y) |
jacobian_tips
¶
Compute inertial-frame Jacobians at all segment tips.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_tips |
Array
|
inertial-frame Jacobians at each segment tip, shape (num_segments, 3, num_active_strains). |
jacobian_abscissa_batched
¶
Compute inertial-frame Jacobians at multiple arc-length positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape
|
required |
s_ps
|
Array
|
Backbone coordinates with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Inertial-frame Jacobians with shape |
Array
|
|
jacobian_arc_length_derivative
¶
Compute the arc-length derivative of the Jacobian at s.
The returned derivative has the same shape and frame convention as
jacobian(q, s).
jacobian_and_arc_length_derivative
¶
Compute the Jacobian and its arc-length derivative at s.
Returns:
| Name | Type | Description |
|---|---|---|
J |
Array
|
Jacobian matrix of shape (n_pose_dim, num_velocities). |
Js |
Array
|
Arc-length derivative of the Jacobian with the same shape as |
jacobian_and_time_derivative
¶
Compute the Jacobian and its time derivative at a point s along the robot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
qd
|
Array
|
Generalized velocities of shape (num_velocities,). |
required |
s
|
Array
|
Position parameter along the robot structure. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J |
Array
|
Jacobian matrix of shape (n_pose_dim, num_velocities). |
Jd |
Array
|
Time derivative of the Jacobian, shape (n_pose_dim, num_velocities). |
jacobian_and_time_derivative_abscissa_batched
¶
jacobian_and_time_derivative_abscissa_batched(q: Array, qd: Array, s_ps: Array) -> tuple[Array, Array]
Compute batched inertial Jacobians and their time derivatives.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape
|
required |
qd
|
Array
|
Active generalized strain rates with shape
|
required |
s_ps
|
Array
|
Backbone coordinates with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A tuple |
Array
|
|
jacobian_bodyframe
¶
Compute the Jacobian of the forward kinematics at a point s along the robot in the body frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
s
|
Array
|
point coordinate along the robot in the interval [0, L]. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_local |
Array
|
Jacobian of the forward kinematics at point s in the body frame, shape (3, num_active_strains) |
jacobian_bodyframe_abscissa_batched
¶
Compute the Jacobian of the forward kinematics at a batch of points s_ps along the robot in the body frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
s_ps
|
Array
|
point coordinates along the robot in the interval [0, L] of shape (N,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_local_ps |
Array
|
Jacobians evaluated at all points, shape (N, 3, num_active_strains) |
jacobian_and_time_derivative_bodyframe
¶
Compute the Jacobian and its time-derivative for the forward kinematics at a point s along the robot in the body frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
qd
|
Array
|
time-derivative of the generalized coordinates of shape (num_active_strains,). |
required |
s
|
Array
|
point coordinate along the robot in the interval [0, L]. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_local |
Array
|
Jacobian of the forward kinematics at point s in the body frame, shape (3, num_active_strains) |
Jd_local |
Array
|
Time-derivative of the Jacobian at point s in the body frame, shape (3, num_active_strains) |
jacobian_and_time_derivative_bodyframe_abscissa_batched
¶
jacobian_and_time_derivative_bodyframe_abscissa_batched(q: Array, qd: Array, s_ps: Array) -> tuple[Array, Array]
Compute the Jacobian and its time-derivative for the forward kinematics at a batch of points s_ps along the robot in the body frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
qd
|
Array
|
time-derivative of the generalized coordinates of shape (num_active_strains,). |
required |
s_ps
|
Array
|
point coordinates along the robot in the interval [0, L] of shape (N,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_local_ps |
Array
|
Jacobians evaluated at all points, shape (N, 3, num_active_strains) |
Jd_local_ps |
Array
|
Time-derivative of the Jacobians, shape (N, 3, num_active_strains) |
gravitational_force
¶
Compute the gravitational force.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
G |
Array
|
Gravitational force of shape (num_velocities,). |
potential_force
¶
Compute the total conservative generalized force.
This is the sum of gravitational and elastic forces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tau_pot |
Array
|
Potential force of shape (num_velocities,). |
actuator_coordinates
¶
Return the installed transmissions' work-conjugate coordinates.
Coordinates are concatenated in actuator and channel order, matching
the columns of :meth:actuation_matrix and the entries returned by
:meth:actuator_efforts. Their physical units may differ between
actuator families, such as length for tendons or volume for pressure
actuation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
y_a |
Array
|
Actuator coordinates of shape |
actuator_velocities
¶
Return the installed transmissions' coordinate velocities.
Velocities are concatenated in actuator and channel order and satisfy
yd_a = A(q).T @ qd, where A(q) is the concatenated actuator
transmission matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape |
required |
qd
|
Array
|
Generalized velocities of shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
yd_a |
Array
|
Actuator-coordinate velocities of shape
|
actuation_matrix
¶
actuation_matrix(q: Array, *, backend: ExecutionBackend | None = None) -> Array
Return the actuator matrix through the selected execution backend.
actuator_efforts
¶
actuator_efforts(q: Array, u: Array, qd: Array | None = None, *, actuation_matrix: Array | None = None) -> Array
Map user controls to work-conjugate actuator efforts.
Controls and returned efforts follow the order of the installed
actuators. Effort models evaluate the actuator coordinates or
velocities only when those quantities are required. If an effort model
requires velocity and qd is omitted, zero generalized velocity is
used.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
u
|
Array
|
Actuator controls of shape (num_actuators,). |
required |
qd
|
Array | None
|
Optional generalized velocities of shape (num_velocities,). |
None
|
actuation_matrix
|
Array | None
|
Optional precomputed actuator transmission matrix
with shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
e |
Array
|
Work-conjugate actuator efforts of shape (num_actuators,). |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
passive_elastic_force
¶
Return the installed passive elements' elastic generalized force.
This method sums only composable passive-element contributions. System
implementations add the result to their intrinsic body elasticity when
evaluating :meth:elastic_force.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
tau_passive |
Array
|
Passive elastic generalized force of shape
|
passive_damping_matrix
¶
Return the installed passive elements' generalized damping matrix.
This method sums only composable passive-element contributions. System
implementations add the result to their intrinsic body damping when
evaluating :meth:damping_matrix.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
D_passive |
Array
|
Passive damping matrix of shape
|
passive_elastic_energy
¶
Return the installed passive elements' stored elastic energy.
This method sums only composable passive-element contributions. System implementations add the result to their intrinsic body strain energy when evaluating elastic or potential energy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape |
required |
Returns:
| Name | Type | Description |
|---|---|---|
U_passive |
Array
|
Scalar passive elastic energy. A robot without passive elements returns zero. |
kinetic_energy
¶
Compute the kinetic energy of the system.
Default implementation: T = 0.5 * qd^T * M(q) * qd
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
qd
|
Array
|
Generalized velocities of shape (num_velocities,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
T |
Array
|
Kinetic energy (scalar). |
gravitational_energy
¶
Compute the gravitational potential energy of the system.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
U_g |
Array
|
Gravitational potential energy (scalar). |
elastic_energy
¶
Compute the elastic potential energy stored in the system.
Default implementation: U_el = 0.5 * q^T * K * q
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
U_el |
Array
|
Elastic potential energy (scalar). |
potential_energy
¶
Compute the total potential energy of the system.
This is the sum of gravitational and elastic energy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
U |
Array
|
Total potential energy (scalar). |
total_energy
¶
Compute the total energy of the system.
This is the sum of kinetic and potential energy.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Generalized coordinates of shape (num_coordinates,). |
required |
qd
|
Array
|
Generalized velocities of shape (num_velocities,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
E |
Array
|
Total energy (scalar). |
params_from_links
staticmethod
¶
params_from_links(links: list[LinkSpec] | tuple[LinkSpec, ...], *, gravity: Array | None = None) -> PlanarPCSParams
Build planar PCS parameters from shared link specifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
links
|
list[LinkSpec] | tuple[LinkSpec, ...]
|
Non-empty sequence of constant, circular link
specifications. Each reference strain must have shape |
required |
gravity
|
Array | None
|
Optional planar gravity vector with shape |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
Validated |
PlanarPCSParams
|
class: |
PlanarPCSParams
|
stiffness and damping arrays of shape |
Raises:
| Type | Description |
|---|---|
ValueError
|
If no links are supplied; a link is not constant and
circular; a reference strain has the wrong shape; a material
source is incomplete; or an explicit matrix is not |
from_links
classmethod
¶
from_links(links: list[LinkSpec] | tuple[LinkSpec, ...], *, structure: PlanarPCSStructure | None = None, gravity: Array | None = None, base_pose: Array | None = None, **kwargs: Any) -> PlanarPCS
Construct a planar PCS model from shared link specifications.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
links
|
list[LinkSpec] | tuple[LinkSpec, ...]
|
Non-empty sequence of constant, circular link specifications. |
required |
structure
|
PlanarPCSStructure | None
|
Optional static planar PCS quadrature, strain-selection,
and rotational-scaling configuration. Defaults to
:class: |
None
|
gravity
|
Array | None
|
Optional planar gravity vector with shape |
None
|
base_pose
|
Array | None
|
Optional planar base pose |
None
|
**kwargs
|
Any
|
Additional keyword arguments forwarded to the PlanarPCS constructor, such as actuators or passive elements. |
{}
|
Returns:
| Type | Description |
|---|---|
PlanarPCS
|
A fully initialized planar PCS model. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If a structure or constructor argument has an invalid type. |
ValueError
|
If a link specification, static structure, parameter array, or attached component is invalid. |
update_link_params
¶
update_link_params(**updates: Any) -> PlanarPCS
Return a copy with selected continuum-link fields replaced.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Fields of :class: |
{}
|
Returns:
| Type | Description |
|---|---|
PlanarPCS
|
A new validated PlanarPCS model with refreshed dependent caches. |
Raises:
| Type | Description |
|---|---|
TypeError
|
If an unknown link field is supplied. |
ValueError
|
If a replacement is invalid or changes the static segment or strain layout. |
link_matrices_from_material
¶
link_matrices_from_material(material: IsotropicMaterialParams) -> tuple[Array, Array]
Map isotropic material variables to canonical planar link matrices.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
material
|
IsotropicMaterialParams
|
Scalar or per-segment Young's modulus, either shear modulus or Poisson's ratio, and optional material damping coefficient. Scalars are broadcast over all segments. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A tuple |
Array
|
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If a material field is not scalar or does not have
shape |
with_isotropic_material
¶
with_isotropic_material(material: IsotropicMaterialParams) -> Self
Return a copy whose link matrices are built from isotropic material.
The supplied material PyTree remains caller-owned and is not stored on the model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
material
|
IsotropicMaterialParams
|
Scalar or per-segment isotropic material variables. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
A new PlanarPCS model containing the generated canonical link |
Self
|
stiffness and damping matrices. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If a material field cannot be broadcast to one value per segment. |
classify_segment
¶
Classify the point along the robot to the corresponding segment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s
|
Array
|
point coordinate along the robot in the interval [0, L]. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
segment_idx |
Array
|
index of the segment where the point is located |
s_segment |
Array
|
point coordinate along the segment in the interval [0, l_segment] |
strain
¶
Compute the strain vector from the generalized coordinates.
Components use the rod material frame, whose local x-axis is the longitudinal backbone direction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Fixed-base generalized coordinates or total floating-base configuration. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
xi |
Array
|
strain vector of shape (num_active_strains,) |
jacobian_and_arc_length_derivative_bodyframe
¶
Compute a body-frame Jacobian and its arc-length derivative.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape
|
required |
s
|
Array
|
Scalar global backbone coordinate. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A tuple |
Array
|
derivative with respect to global arc length. Both arrays have |
tuple[Array, Array]
|
shape |
jacobian_arc_length_derivative_bodyframe
¶
Compute the body-frame Jacobian derivative with respect to arc length.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape
|
required |
s
|
Array
|
Scalar global backbone coordinate. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Arc-length derivative with shape |
Array
|
|
jacobian_inertialframe
¶
jacobian_inertialframe(q: Array, s: Array, *, backend: ExecutionBackend | None = None) -> Array
Compute an inertial Jacobian at one curvilinear abscissa.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape |
required |
s
|
Array
|
Scalar curvilinear abscissa. |
required |
backend
|
ExecutionBackend | None
|
Optional execution override. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Inertial Jacobian with shape |
jacobian_inertialframe_abscissa_batched
¶
jacobian_inertialframe_abscissa_batched(q: Array, s_ps: Array, *, backend: ExecutionBackend | None = None) -> Array
Compute inertial Jacobians at a batch of curvilinear abscissae.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape |
required |
s_ps
|
Array
|
Curvilinear abscissae with shape |
required |
backend
|
ExecutionBackend | None
|
Optional execution override. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Inertial-frame Jacobians with shape |
forward_kinematics_and_jacobian_inertialframe
¶
forward_kinematics_and_jacobian_inertialframe(q: Array, s: Array, *, backend: ExecutionBackend | None = None) -> tuple[Array, Array]
Compute a planar pose and inertial Jacobian in one traversal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape |
required |
s
|
Array
|
Scalar curvilinear abscissa. |
required |
backend
|
ExecutionBackend | None
|
Optional execution override. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
A pose with shape |
Array
|
|
forward_kinematics_and_jacobian_inertialframe_abscissa_batched
¶
forward_kinematics_and_jacobian_inertialframe_abscissa_batched(q: Array, s_ps: Array, *, backend: ExecutionBackend | None = None) -> tuple[Array, Array]
Compute fused planar poses and Jacobians for an abscissa batch.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape |
required |
s_ps
|
Array
|
Curvilinear abscissae with shape |
required |
backend
|
ExecutionBackend | None
|
Optional execution override. |
None
|
Returns:
| Type | Description |
|---|---|
Array
|
Poses with shape |
Array
|
|
jacobian_and_arc_length_derivative_inertialframe
¶
Compute an inertial-frame Jacobian and its arc-length derivative.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape
|
required |
s
|
Array
|
Scalar global backbone coordinate. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
A tuple |
Array
|
derivative with respect to global arc length. Both arrays have |
tuple[Array, Array]
|
shape |
jacobian_arc_length_derivative_inertialframe
¶
Compute the inertial Jacobian derivative with respect to arc length.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
Active generalized strains with shape
|
required |
s
|
Array
|
Scalar global backbone coordinate. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Arc-length derivative with shape |
Array
|
|
jacobian_and_time_derivative_inertialframe
¶
Compute the Jacobian and its time-derivative for the forward kinematics at a point s along the robot in the inertial frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
qd
|
Array
|
time-derivative of the generalized coordinates of shape (num_active_strains,). |
required |
s
|
Array
|
point coordinate along the robot in the interval [0, L]. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_global |
Array
|
Jacobian of the forward kinematics at point s in the inertial frame, shape (3, num_active_strains) |
Jd_global |
Array
|
Time-derivative of the Jacobian at point s in the inertial frame, shape (3, num_active_strains) |
jacobian_and_time_derivative_inertialframe_abscissa_batched
¶
jacobian_and_time_derivative_inertialframe_abscissa_batched(q: Array, qd: Array, s_ps: Array) -> tuple[Array, Array]
Compute the Jacobian and its time-derivative for the forward kinematics at a batch of points s_ps along the robot in the inertial frame.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
Array
|
generalized coordinates of shape (num_active_strains,). |
required |
qd
|
Array
|
time-derivative of the generalized coordinates of shape (num_active_strains,). |
required |
s_ps
|
Array
|
point coordinates along the robot in the interval [0, L] of shape (N,). |
required |
Returns:
| Name | Type | Description |
|---|---|---|
J_global_ps |
Array
|
Jacobians evaluated at all points, shape (N, 3, num_active_strains) |
Jd_global_ps |
Array
|
Time-derivative of the Jacobians, shape (N, 3, num_active_strains) |
Model Features¶
- Piecewise-constant virtual-backbone strain with numerical Cosserat rod quadrature
- Multiple physical rods per segment
- Rigid caps, platforms, and end-effector offsets
- Optional motor-to-rod underactuation
- Optional Bouc--Wen hysteresis
- JAX-native kinematics, Jacobians, energies, and dynamics
Reference¶
Stölzle, M., Rus, D., & Della Santina, C. (2024). An experimental study of model-based control for planar handed shearing auxetics robots. In Experimental Robotics: The 18th International Symposium (pp. 153–167). Springer. doi:10.1007/978-3-031-63596-0_14