Threadlike actuation¶
Threadlike paths describe axial force transmission through a continuum robot. Choose the routing strategy according to how the path is constrained:
- Fixed material routing:
ThreadlikeRoutingprescribes offsets along the backbone. - Straight spans between guides:
StraightSpanRoutingfollows prescribed guides when wall contact is irrelevant throughout operation. - Shortest paths inside a lumen:
ShortestPathRoutingresolves the path subject to circular wall constraints using SLSQP.
All three strategies implement BaseThreadlikeRouting and work with
ThreadlikeActuator, ThreadlikeTransmission, and ThreadlikeImpedance.
The routing supplies physical geometry; the transmission applies the actuator's
coordinate sign, scale, and supported friction model.
Fixed material routing¶
Threadlike actuation models paths embedded in a continuum robot's material frame. The same geometry supports pulling tendons, pushing rods, simplified contractile muscles, and pressure chambers represented by an equivalent axial volume coordinate. A path may span any contiguous inclusive range of body segments.
Threadlike-routing reference
The routing geometry follows:
Renda, F., Armanini, C., Mathew, A. T., & Boyer, F. (2022). Geometrically-Exact Inverse Kinematic Control of Soft Manipulators With General Threadlike Actuators' Routing. IEEE Robotics and Automation Letters, 7(3), 7311–7318. https://doi.org/10.1109/LRA.2022.3183248
A routing is a material-frame offset from the backbone. PCS, PlanarPCS, and
GVS combine that routing with their native strain kinematics to evaluate path
length, coordinate velocity, and generalized actuator force.
This strategy assumes fixed material-frame routing, one constant coordinate scale per path, and an optional static, direction-independent effort loss along active paths.
Routing¶
Linear routing¶
ThreadlikeRouting stores a vectorized path family. Linear paths use
where intercept and slope have shape (num_paths, 3) and use local
material-frame [x, y, z] order. The undeformed backbone follows local +x,
so both local-x components must be zero.
from soromox.actuation import ThreadlikeRouting
routing = ThreadlikeRouting.linear(
intercept=jnp.array([[0.0, 0.01, 0.0], [0.0, -0.01, 0.0]]),
slope=jnp.zeros((2, 3)),
start_segment_index=(0, 0),
end_segment_index=(1, 1),
)
Planar PCS uses the local y offset and requires the local x and z
components to be zero. Its material +x axis points along the undeformed
backbone, material +y is the transverse direction, and positive
kappa_z rotates +x toward +y (counter-clockwise in a right-handed
xy frame). Therefore a path at positive offset d_y has local tangent
In particular, a positive-y path lies on the inside of a
positive-curvature bend and shortens relative to the backbone.
Custom routing laws¶
A custom routing supplies immutable parameters and analytical offset functions. Friction also needs the second derivative; production code does not differentiate routing functions with autodiff.
import equinox as eqx
import jax
import jax.numpy as jnp
from soromox.actuation import BaseThreadlikeRoutingParams, ThreadlikeRouting
class SinusoidalRoutingParams(BaseThreadlikeRoutingParams):
amplitude: jax.Array
frequency: jax.Array
start_segment_index: tuple[int, ...] = eqx.field(static=True)
end_segment_index: tuple[int, ...] = eqx.field(static=True)
@property
def num_paths(self) -> int:
"""Return the number of paths in this parameter batch.
Returns:
Number of routed paths.
"""
return self.amplitude.shape[0]
def offset(params: SinusoidalRoutingParams, s: jax.Array) -> jax.Array:
"""Return material-frame sinusoidal routing offsets.
Args:
params: Batched sinusoidal routing parameters.
s: Scalar backbone abscissa.
Returns:
Material-frame offsets with shape ``(num_paths, 3)``.
"""
y = params.amplitude * jnp.sin(params.frequency * s)
return jnp.stack((jnp.zeros_like(y), y, jnp.zeros_like(y)), axis=-1)
def derivative(params: SinusoidalRoutingParams, s: jax.Array) -> jax.Array:
"""Return the first derivative of the routing offset.
Args:
params: Batched sinusoidal routing parameters.
s: Scalar backbone abscissa.
Returns:
First derivatives with shape ``(num_paths, 3)``.
"""
y_s = params.amplitude * params.frequency * jnp.cos(params.frequency * s)
return jnp.stack((jnp.zeros_like(y_s), y_s, jnp.zeros_like(y_s)), axis=-1)
def second_derivative(params: SinusoidalRoutingParams, s: jax.Array) -> jax.Array:
"""Return the second derivative of the routing offset.
Args:
params: Batched sinusoidal routing parameters.
s: Scalar backbone abscissa.
Returns:
Second derivatives with shape ``(num_paths, 3)``.
"""
y_ss = -(params.frequency**2) * params.amplitude * jnp.sin(
params.frequency * s
)
return jnp.stack((jnp.zeros_like(y_ss), y_ss, jnp.zeros_like(y_ss)), axis=-1)
routing = ThreadlikeRouting(
params=SinusoidalRoutingParams(
amplitude=jnp.array([0.01]),
frequency=jnp.array([20.0]),
start_segment_index=(0,),
end_segment_index=(1,),
),
offset_fn=offset,
derivative_fn=derivative,
second_derivative_fn=second_derivative,
)
Path count and segment spans are static topology. Updating either requires reconstructing the routing and robot.
Actuators and transmissions¶
The following APIs apply to all three routing strategies on PlanarPCS, PCS,
and GVS. Pass the routing object to an actuator preset and install the result
through the robot constructor's actuators argument.
Modality presets¶
Let \(\ell\) be raw physical path length. Presets choose the signed or scaled coordinate while positive input retains its named physical meaning.
| Preset | Coordinate | Positive effort | Unit |
|---|---|---|---|
tendons |
\(-\ell\) | tension/pulling | N |
push_rods |
\(+\ell\) | compression/pushing | N |
muscles |
\(-\ell\) | contraction/tension | N |
pressure_chambers |
\(A_\mathrm{eff}\ell\) | pressure | Pa |
Pressure and equivalent volume \(V=A_\mathrm{eff}\ell\) form a work-conjugate pair.
from soromox.actuation import ThreadlikeActuator
actuator = ThreadlikeActuator.tendons(routing)
robot = PCS(body_params, structure=structure, actuators=actuator)
Pass a tuple to combine routing strategies or modalities. Channels follow group order, then physical path order within each group.
Coordinates, Jacobians, and force maps¶
Raw geometry is separate from the actuator coordinate and force map:
actuator = robot.actuators[0]
lengths = actuator.path_lengths(robot, q)
length_rates = actuator.path_velocities(robot, q, qd)
path_length_jacobian = actuator.transmission.path_length_jacobian(robot, q)
points = actuator.path_poses(robot, q, s)
coordinates = robot.actuator_coordinates(q)
coordinate_jacobian = robot.actuator_coordinate_jacobian(q)
actuation_matrix = robot.actuation_matrix(q)
The two matrix contracts are
where coordinate_jacobian is the actuator-coordinate velocity map \(J_a\),
with shape (num_actuators, num_velocities), and actuation_matrix is \(A\)
with shape (num_velocities, num_actuators). For a lossless transmission, virtual work
gives \(A=J_a^T\). Friction can make them differ without changing path
coordinates or velocities.
The transmission's path_length_jacobian also maps generalized velocities to
length rates. A routing strategy's path_length_jacobian differentiates with
respect to configuration coordinates instead; use its path_velocity_jacobian
for forces when a spatial floating base has seven pose coordinates and six
velocity components.
Configuration-dependent queries resolve the routing at the supplied q.
For diagnostics, warm starts, or reuse across queries, use the
explicit solution API.
Continuum Capstan friction¶
ThreadlikeFriction.capstan(coefficient=mu) attenuates active threadlike effort
along increasing backbone abscissa, starting at each path's configured
anchor. It is available for fixed routing on PCS, PlanarPCS, and GVS.
Straight and shortest-path routing require frictionless transmission; installing
Capstan friction with either raises an error. The default
ThreadlikeFriction.frictionless() returns unit effort ratio.
Path-turn derivation¶
Let \(s\) be the backbone abscissa in the undeformed configuration, \(R(s)\in SO(3)\) the material orientation, \(p(s)\in\mathbb{R}^3\) the backbone position, and \(\xi=(\omega,v)\) the angular and linear Cosserat strain. Then
For material routing offset \(r(s)\), the spatial path is \(x(s)=p(s)+R(s)r(s)\). Its derivative is
Define \(\nu=\lVert a\rVert\), material unit tangent \(u=a/\nu\), and spatial unit tangent \(\hat t=Ru\). Analytical differentiation gives
Consequently,
turn_rate is \(\rho\), in radians per metre of undeformed backbone. It
includes both material-frame rotation and change of the tangent inside that
frame. Omitting \(u'\) is valid only when the normalized material tangent is
constant. Inside a PCS segment, \(\omega'=v'=0\), so SoRoMoX uses the
constant-strain specialization \(a'=\omega\times r'+r''\). Routing derivatives
can still make \(u'\ne0\). GVS retains the full expression and computes
\(\omega'\) and \(v'\) analytically from the derivative of its strain basis.
The accumulated_turn from anchor \(s_0\) is
SoRoMoX evaluates this integral using the host quadrature. Genuine one-sided tangent jumps introduced by a piecewise host discretization contribute their unsigned angle at the interface.
Relation to the cited discrete model¶
The exponential Capstan relation is established for ropes, belts, and tendons sliding over contact. SoRoMoX takes inspiration from a discrete spacer-disk tendon model:
Capstan-model reference
Feliu-Talegon, D., Alkayas, A. Y., Adamu, Y. A., Mathew, A. T., & Renda, F. (2025). Actuation Reading Insights: Estimating Shape and Forces in Tendon-Driven Slender Soft Robots. IEEE/ASME Transactions on Mechatronics, 30(6), 7878–7888. https://doi.org/10.1109/TMECH.2025.3581774
In that model, each disk obeys
SoRoMoX adapts that idea to distributed contact along an embedded continuum path:
This is not an implementation of discrete spacer disks. The current API does not represent discrete guide locations, guide radii, or individual guide reactions.
Generalized-force integration¶
The local routed-length gradient with respect to material-frame strain is \(\Phi_\xi=[r\times u;u]\). The actuator coordinate is \(y_a=c\ell\), with \(c=-1\) for tendons and contractile muscles, \(c=+1\) for push rods, and \(c=A_\mathrm{eff}\) for pressure chambers; see modality presets.
If \(B(s)\) maps generalized-coordinate variations to strain variations, the active force-map column for this path is
The ratio weights every quadrature contribution; it does not merely scale the final matrix. Distal contributions therefore receive less of the anchor effort than proximal contributions.
from soromox.actuation import ThreadlikeFriction
actuator = ThreadlikeActuator.tendons(
routing,
friction=ThreadlikeFriction.capstan(coefficient=0.2),
)
The coefficient may be a scalar shared by the family or an array of shape
(num_paths,).
Custom effort-ratio laws¶
Custom laws receive only explicit friction state, not a host-specific context:
from soromox.actuation import BaseThreadlikeFrictionParams, ThreadlikeFriction
class HyperbolicFrictionParams(BaseThreadlikeFrictionParams):
coefficient: Array
def hyperbolic_effort_ratio(
params: HyperbolicFrictionParams,
accumulated_turn: Array,
) -> Array:
"""Return a custom effort ratio as a function of accumulated turn.
Args:
params: Hyperbolic friction parameters.
accumulated_turn: Accumulated path turn with shape ``(num_paths,)``.
Returns:
Surviving effort ratios with shape ``(num_paths,)``.
"""
return 1.0 / (1.0 + params.coefficient * accumulated_turn)
friction = ThreadlikeFriction(
params=HyperbolicFrictionParams(coefficient=jnp.asarray(0.5)),
effort_ratio_fn=hyperbolic_effort_ratio,
is_frictionless=False,
)
Parameters are differentiable leaves; the law itself is static. A custom law should return values in \((0,1]\) and must not read the applied effort.
The current model uses the driven anchor-to-distal Capstan branch. It does not model sticking, direction-dependent backdriving, frictional hysteresis, or slack. Warp threadlike kernels currently accept only frictionless linear routing; automatic backend selection evaluates frictional actuation with JAX.
Passive paths¶
ThreadlikeImpedance implements conservative routed spring-damper mechanics:
from soromox.actuation import ThreadlikeImpedance
passive = ThreadlikeImpedance(
routing=passive_routing,
stiffness=jnp.array([50.0]),
damping=jnp.array([2.0]),
rest_length=jnp.array([0.19]),
)
It contributes elastic force, damping, and elastic energy without consuming an
active control channel. Its .routing attribute stays distinct from an active
actuator's .transmission; friction is intentionally active-only.
Parameter updates¶
Updates use immutable replacement. For example, to change fixed-path offsets:
params = robot.actuators[0].params
routing_params = params.transmission.routing.replace(intercept=new_intercepts)
transmission_params = params.transmission.replace(routing=routing_params)
robot = robot.update_actuator_params(0, transmission=transmission_params)
Routing coefficients, coordinate scales, friction coefficients, effort bounds,
and passive mechanical values are updateable. Path counts and segment spans are
static topology and require reconstruction. Runtime routing objects retain their
callbacks, mesh, and solver settings through these updates. Parameter-only
constructors infer the built-in strategy: RoutingSpanParams selects straight
routing and ShortestPathRoutingParams selects shortest-path routing with
default solver settings.
Rendering¶
Renderer adapters turn path queries into semantic visual layers. Generic
renderers draw swept geometry when a radius is configured and use polylines
otherwise. Installed configuration-dependent paths use one layer per physical
path, preserving unequal span counts and connecting guides. Their
path_poses(robot, q, s) query samples one station, clamped to each path's ends;
at a moving joint it selects the upstream guide. Use span sampling to represent
both sides of the connection. I-SUPPORT retains its detailed bellows renderer.
Configuration-dependent routing¶
Use these strategies when a filament can move relative to the backbone:
StraightSpanRoutingconnects prescribed guides with straight lines. Use it when you can guarantee that wall contact is irrelevant throughout operation.ShortestPathRoutingoptimizes each span inside a circular hollow passage (the lumen), usingslsqp-jax, which is installed with SoRoMoX.
Both support PlanarPCS, PCS, and GVS, including floating bases and prescribed guides at moving joints. They describe taut, frictionless filaments with negligible bending stiffness and inertia. Slack, friction, joint housing collisions, and elastic rod buckling require additional models.
Define guides and choose a strategy¶
A path is one physical filament. A span is its portion between two
prescribed guides. RoutingSpanParams contains the guides and their connectivity:
- Offsets have shape
(num_spans, 3), in local[0, y, z]order and metres. PlanarPCS requires zerozoffsets. - Segment indices are zero-based and inclusive.
- Spans of the same path must be ordered and contiguous. A segment transition inside a span does not add a guide.
span_path_indexgroups spans into paths numbered from zero.
For an existing one-segment robot and its configuration, start with:
import equinox as eqx
import jax
import jax.numpy as jnp
from soromox.actuation import (
CircularLumenParams,
RoutingSpanParams,
ShortestPathRouting,
ShortestPathRoutingParams,
StraightSpanRouting,
)
jax.config.update("jax_enable_x64", True)
spans = RoutingSpanParams(
start_offset=[[0.0, 0.002, 0.0]],
end_offset=[[0.0, 0.002, 0.0]],
span_path_index=(0,),
start_segment_index=(0,),
end_segment_index=(0,),
)
routing = StraightSpanRouting(spans)
With the optional warp-lang dependency, use
routing.solve_routing(robot, configuration, backend="warp") to evaluate straight
segment kinematics, span geometry, joint-guide connections, and analytical path
Jacobians with FP64 Warp kernels. Configuration batches, including nested
jax.vmap calls, share one set of launches with common model and guide parameters.
Each link is integrated once and relative intervals are shared across paths.
Differentiation through these APIs uses the JAX reference implementation.
The default, backend=None, inherits robot.backend. Use backend="jax" or
backend="warp" to override it per call. "auto" selects Warp on GPU and JAX
on CPU, following the shared execution policy. Hosts without a backend preference
use JAX. Measure your workload when choosing a backend.
For actuation without world endpoint reconstruction, use
routing.actuation_matrix(robot, configuration, backend="warp") or
routing.actuation_force(robot, configuration, tensions, backend="warp").
The latter accumulates forces directly without materializing an actuation matrix.
Matrix rows and force entries use generalized velocity coordinates, including
zero floating-base entries for valid routes. For installed actuator groups, use
backend="jax" or "auto" on the robot; fused robot Warp actuation kernels
currently accept fixed linear routing only.
The strategies share the soromox.actuation.threadlike namespace: components
contains the shared actuators and transmissions, base defines their routing
contract, and fixed_routing, straight_span, and shortest_path implement the
strategies. Shared span geometry and solutions live in routing. The Warp
backend mirrors the threadlike grouping: its fixed_routing module prepares data
and checks eligibility for linear fixed routing, while
straight_span evaluates free-space routing. Reusable continuum kinematics lives
in execution.warp.common.relative_kinematics.
A native Warp simulation can prepare reusable buffers once:
from soromox.execution.warp.actuation.threadlike import StraightSpanActuation
executor = StraightSpanActuation(robot, routing, batch_size=batch_size, device="cuda")
# q: contiguous FP64 Warp array (batch_size, robot.num_coordinates)
# tensions: contiguous FP64 Warp array (batch_size, routing.spans.num_paths)
force = executor.actuation_force(q, tensions)
force aliases the executor's output buffer. Calls launch only Warp kernels and
can be recorded in a CUDA graph after warming up the kernels. Keep the executor
and input buffers alive for graph replay. Use one executor per concurrent stream
and rebuild it after changing model or guide parameters. Construction uses the
SoRoMoX model data; steady-state calls perform no JAX evaluation or host transfers.
Native launches are forward-only. Use the JAX-facing methods above when gradients
through the actuation are needed.
To account for wall contact, use the same guides with a lumen radius per segment:
routing = ShortestPathRouting(
ShortestPathRoutingParams(
spans,
CircularLumenParams.constant(0.005, robot.num_segments),
)
)
inner_radius has shape (robot.num_segments,). Each guide must lie inside
its segment's lumen. Use FP64 for the default numerical tolerances.
with_params replaces numerical geometry while preserving topology; changing
path or segment connectivity requires constructing new routing parameters.
Solve, apply forces, and sample geometry¶
solve = eqx.filter_jit(routing.solve_routing)
solution = solve(robot, configuration)
if not bool(solution.converged):
raise RuntimeError("Routing did not converge")
lengths = solution.path_lengths
tension = jnp.full(spans.num_paths, 0.1)
jacobian = routing.path_velocity_jacobian(robot, configuration, solution)
force = -jacobian.T @ tension
positions = routing.span_positions(
robot, configuration, solution, 0, jnp.linspace(0.0, 1.0, 50)
)
path_lengths has one entry per physical path, including connections between
adjacent span guides. span_positions returns world coordinates in metres.
For optimized routes, span_offsets also samples material offsets at specified
backbone coordinates. Use a previous optimized solution as an explicit warm start:
The routing's path_lengths, path_length_jacobian, and
path_velocity_jacobian accept an optional solution to reuse a solve; omitting
it resolves the route once for that call.
path_length_jacobian differentiates lengths with respect to configuration
coordinates. Use path_velocity_jacobian for forces: spatial floating bases
have different numbers of pose coordinates and velocity components. Rigid base
motion contributes zero to internal path lengths and forces.
Guides at moving joints¶
Joints have no modeled thickness. End a span before each moving joint and start another after it, assigning both to the same path. A straight cable connects the upstream and downstream guides and contributes to length and force.
For one path through two sections, with guides at their transition:
offsets = [[0.0, 0.004, 0.0], [0.0, 0.004, 0.0]]
spans = RoutingSpanParams(
start_offset=offsets,
end_offset=offsets,
span_path_index=(0, 0),
start_segment_index=(0, 1),
end_segment_index=(0, 1),
)
Zero offsets give centered guides. At a rotational joint, centered guides remain
coincident and contribute zero connecting length and direct joint torque.
Offset guides can separate under rotation; translation can separate both kinds.
Inspect solution.guides for connection lengths and their differentiable flags.
A moving connection collapsing to zero length has no unique derivative; its
Jacobian row returns NaNs. Permanently coincident guides have zero derivatives.
Check accuracy¶
Always check solution.converged. Installed length and coordinate queries return
NaNs for failed spans; explicit solutions retain diagnostic length estimates.
Derivative and force queries also reject collapsed moving guide connections.
Straight spans check finite geometry and positive length; wall clearance is the
caller's responsibility. Optimized spans check endpoint error, optimality, and
wall containment independently of the optimizer's termination code.
RoutingSolverOptions separates the solver stopping tolerance from physical
limits: endpoint_tolerance defaults to 1e-8 m and wall_tolerance to 1e-6 m.
Each optimized span reports dense_wall_violation at validation samples and
wall_violation_bound, a conservative bound between them. Acceptance uses the
bound. Increase validation_samples_per_element when the bound is overly
conservative; refine the routing mesh and wall constraint samples when actual
penetration is excessive. Configure these through
PiecewiseLinearRoutingDiscretization.
Routing interfaces¶
soromox.actuation.BaseThreadlikeRouting
¶
Bases: Module
flowchart TD
soromox.actuation.BaseThreadlikeRouting[BaseThreadlikeRouting]
click soromox.actuation.BaseThreadlikeRouting href "" "soromox.actuation.BaseThreadlikeRouting"
Supply physical path geometry independently of actuator sign and scale.
Transmissions delegate to this contract rather than robot-specific hooks. Path lengths are in metres. Velocity Jacobians include zero floating-base columns for internal paths. Each strategy retains its geometry, solver settings, and parameter type.
Attributes:
| Name | Type | Description |
|---|---|---|
params |
BaseSystemParams
|
Numerical geometry and static topology of the routing strategy. |
num_paths
abstractmethod
property
¶
Return the number of physical filaments in the routing family.
Returns:
| Type | Description |
|---|---|
int
|
Number of paths, each corresponding to one actuator channel. |
path_lengths
abstractmethod
¶
path_lengths(robot: SoftRobot, q: Array) -> Array
Evaluate the physical length of every routed path.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host supplying the strategy's required kinematics. |
required |
q
|
Array
|
Configuration with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Physical lengths in metres with shape |
Array
|
applying actuator coordinate signs or scales. |
path_velocity_jacobian
abstractmethod
¶
path_velocity_jacobian(robot: SoftRobot, q: Array) -> Array
Map generalized velocities to physical path-length rates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host supplying the strategy's required kinematics. |
required |
q
|
Array
|
Configuration with shape |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Jacobian with shape |
Array
|
Multiplication by generalized velocity gives length rates in metres |
Array
|
per second. Internal paths have zero floating-base columns. |
path_positions
abstractmethod
¶
path_positions(robot: SoftRobot, q: Array, s: Array) -> Array
Sample each path at a reference backbone station.
Guided strategies parameterize each span by its backbone interval. At a moving joint, the station selects the upstream guide; use the strategy's span sampling API to represent both guides and their cable connection explicitly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host defining world-frame path positions. |
required |
q
|
Array
|
Configuration with shape |
required |
s
|
Array
|
Scalar reference backbone station in metres, clamped to each path's endpoints. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
World positions in metres with shape |
Array
|
planar hosts or |
validate_friction
¶
validate_friction(friction: ThreadlikeFriction) -> None
Check whether this strategy supports the supplied friction model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
friction
|
ThreadlikeFriction
|
Runtime effort-loss model to pair with the routing. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
The model is not frictionless. Strategies implementing friction override this check with their own requirements. |
path_force_matrix
¶
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array
Map length-conjugate efforts to generalized forces before scaling.
Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host receiving the generalized forces. |
required |
q
|
Array
|
Configuration with shape |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
Array
|
The default implementation returns the transpose of the physical |
Array
|
length-rate Jacobian. |
Raises:
| Type | Description |
|---|---|
ValueError
|
The strategy does not support the friction model. |
with_params
abstractmethod
¶
with_params(params: BaseSystemParams) -> BaseThreadlikeRouting
Replace numerical geometry while preserving topology and settings.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
BaseSystemParams
|
Replacement parameters of the strategy's existing type, with the same path count and connectivity. |
required |
Returns:
| Type | Description |
|---|---|
BaseThreadlikeRouting
|
Routing with updated parameter leaves and preserved runtime |
BaseThreadlikeRouting
|
callbacks, discretization, and solver settings where applicable. |
Raises:
| Type | Description |
|---|---|
TypeError
|
The replacement parameter type is incompatible. |
ValueError
|
Parameters are invalid or change routing topology. |
update_params
¶
update_params(**updates: Any) -> BaseThreadlikeRouting
Replace selected geometry parameters through validated replacement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and replacement values accepted by this strategy's parameter object. |
{}
|
Returns:
| Type | Description |
|---|---|
BaseThreadlikeRouting
|
Routing with the requested numerical changes and unchanged topology. |
Raises:
| Type | Description |
|---|---|
TypeError
|
A field name or replacement type is unsupported. |
ValueError
|
A replacement is invalid or changes routing topology. |
validate_structure_for_robot
abstractmethod
¶
validate_structure_for_robot(robot: SoftRobot) -> None
Check host compatibility without reading traced parameter values.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host whose kinematic interface and segment topology must support this routing strategy. |
required |
Raises:
| Type | Description |
|---|---|
TypeError
|
The host lacks a required interface. |
ValueError
|
Routing shapes or connectivity are incompatible with the host. |
validate_values_for_robot
abstractmethod
¶
validate_values_for_robot(robot: SoftRobot) -> None
Check concrete routing geometry against the host.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying physical geometry. Call this check with concrete numerical values, after structure validation. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
Numerical geometry violates a strategy or host restriction, such as nonplanar offsets on a planar robot. |
soromox.actuation.ConfigurationDependentThreadlikeRouting
¶
Bases: BaseThreadlikeRouting
flowchart TD
soromox.actuation.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]
soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.ConfigurationDependentThreadlikeRouting
click soromox.actuation.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.ConfigurationDependentThreadlikeRouting"
click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
Interface for configuration-dependent filament routing.
A path represents one physical filament; a span is a portion between prescribed guides. Strategies return resolved geometry; optimizers also return their state explicitly for warm starts.
Attributes:
| Name | Type | Description |
|---|---|---|
params |
BaseSystemParams
|
Strategy parameters containing numerical geometry and static topology. |
spans |
RoutingSpanParams
|
Shared guide geometry and mapping of spans to physical paths. |
num_paths
property
¶
Return the number of physical paths rather than guided spans.
Returns:
| Type | Description |
|---|---|
int
|
Number of filaments, each corresponding to one actuator channel. |
spans
abstractmethod
property
¶
spans: RoutingSpanParams
Return shared endpoints and connectivity.
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSpanParams
|
RoutingSpanParams containing guide offsets and span-to-path connectivity. |
validate_friction
¶
validate_friction(friction: ThreadlikeFriction) -> None
Check whether this strategy supports the supplied friction model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
friction
|
ThreadlikeFriction
|
Runtime effort-loss model to pair with the routing. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
The model is not frictionless. Strategies implementing friction override this check with their own requirements. |
path_force_matrix
¶
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array
Map length-conjugate efforts to generalized forces before scaling.
Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host receiving the generalized forces. |
required |
q
|
Array
|
Configuration with shape |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
Array
|
The default implementation returns the transpose of the physical |
Array
|
length-rate Jacobian. |
Raises:
| Type | Description |
|---|---|
ValueError
|
The strategy does not support the friction model. |
update_params
¶
update_params(**updates: Any) -> BaseThreadlikeRouting
Replace selected geometry parameters through validated replacement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and replacement values accepted by this strategy's parameter object. |
{}
|
Returns:
| Type | Description |
|---|---|
BaseThreadlikeRouting
|
Routing with the requested numerical changes and unchanged topology. |
Raises:
| Type | Description |
|---|---|
TypeError
|
A field name or replacement type is unsupported. |
ValueError
|
A replacement is invalid or changes routing topology. |
path_lengths
¶
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array
Return physical lengths, solving once if no solution is supplied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host defining the route geometry. |
required |
configuration
|
Array
|
Configuration with shape |
required |
solution
|
RoutingSolution | None
|
Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Lengths in metres with shape |
path_length_jacobian
abstractmethod
¶
Evaluate the analytical length derivative at a resolved route.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying guide and material kinematics. |
required |
configuration
|
Array
|
Host configuration, shape |
required |
solution
|
RoutingSolution | None
|
Solution for this routing and configuration; omission resolves the route once. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Length Jacobian, shape |
path_velocity_jacobian
¶
Map host velocities to path length rates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying base coordinate and velocity dimensions. |
required |
configuration
|
Array
|
Configuration, shape |
required |
solution
|
RoutingSolution | None
|
Solution at this configuration; omitted solutions are computed once for this call. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Jacobian, shape |
path_positions
¶
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array
Return one world position per path at a reference backbone station.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying kinematics and segment lengths. |
required |
q
|
Array
|
Configuration with shape |
required |
s
|
Array
|
Scalar reference backbone station in metres. |
required |
solution
|
RoutingSolution | None
|
Optional solution for these exact inputs. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Positions with shape |
span_positions
abstractmethod
¶
Sample a resolved span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Host configuration, shape |
required |
solution
|
RoutingSolution
|
Solution at this configuration. |
required |
span_index
|
int
|
Static span index. |
required |
fractions
|
Array
|
One-dimensional sample fractions in |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions, shape |
with_params
¶
Replace numerical geometry while retaining routing topology.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
RoutingSpanParams | ShortestPathRoutingParams
|
Parameters of the same type and topology as this strategy's current parameters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
ConfigurationDependentThreadlikeRouting
|
Strategy with validated replacement geometry and unchanged algorithm settings. |
validate_structure_for_robot
¶
Validate segment bounds and prescribed guides at moving joints.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host with static segment topology. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
Span connectivity is incompatible with the host. |
validate_values_for_robot
¶
Validate guide geometry and positive finite segment lengths.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host with material frame conventions. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
Host lengths or guide offsets are invalid. |
solve_routing
abstractmethod
¶
solve_routing(robot, configuration, *, initial_guess=None) -> RoutingSolution
Resolve all physical paths for a robot configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host providing material strains and guide kinematics. |
required |
configuration
|
Array
|
Generalized configuration, shape
|
required |
initial_guess
|
RoutingSolution | None
|
Previous RoutingSolution with
matching span topology, or
|
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSolution
|
RoutingSolution with resolved spans, guide connections, and total path lengths. |
soromox.actuation.StraightSpanRouting
¶
Bases: ConfigurationDependentThreadlikeRouting
flowchart TD
soromox.actuation.StraightSpanRouting[StraightSpanRouting]
soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]
soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.StraightSpanRouting
soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
click soromox.actuation.StraightSpanRouting href "" "soromox.actuation.StraightSpanRouting"
click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
Straight filaments between guides that move with the robot.
A path is one physical filament. A span is the straight portion between two prescribed guides. Adjacent spans include their joint guide connection. The user must ensure that wall contact is irrelevant throughout operation. Guide kinematics determine the path directly. The model describes taut frictionless tendons and ideal straight axial members with negligible bending stiffness, operating below their buckling load.
Attributes:
| Name | Type | Description |
|---|---|---|
params |
RoutingSpanParams
|
Shared guide offsets and span connectivity. |
num_paths
property
¶
Return the number of physical paths rather than guided spans.
Returns:
| Type | Description |
|---|---|
int
|
Number of filaments, each corresponding to one actuator channel. |
spans
property
¶
Return the shared guide geometry and connectivity parameters.
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSpanParams
|
This strategy's guide geometry. |
path_lengths
¶
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array
Return physical lengths, solving once if no solution is supplied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host defining the route geometry. |
required |
configuration
|
Array
|
Configuration with shape |
required |
solution
|
RoutingSolution | None
|
Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Lengths in metres with shape |
path_velocity_jacobian
¶
Map host velocities to path length rates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying base coordinate and velocity dimensions. |
required |
configuration
|
Array
|
Configuration, shape |
required |
solution
|
RoutingSolution | None
|
Solution at this configuration; omitted solutions are computed once for this call. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Jacobian, shape |
path_positions
¶
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array
Return one world position per path at a reference backbone station.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying kinematics and segment lengths. |
required |
q
|
Array
|
Configuration with shape |
required |
s
|
Array
|
Scalar reference backbone station in metres. |
required |
solution
|
RoutingSolution | None
|
Optional solution for these exact inputs. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Positions with shape |
validate_friction
¶
validate_friction(friction: ThreadlikeFriction) -> None
Check whether this strategy supports the supplied friction model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
friction
|
ThreadlikeFriction
|
Runtime effort-loss model to pair with the routing. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
The model is not frictionless. Strategies implementing friction override this check with their own requirements. |
with_params
¶
Replace numerical geometry while retaining routing topology.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
RoutingSpanParams | ShortestPathRoutingParams
|
Parameters of the same type and topology as this strategy's current parameters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
ConfigurationDependentThreadlikeRouting
|
Strategy with validated replacement geometry and unchanged algorithm settings. |
update_params
¶
update_params(**updates: Any) -> BaseThreadlikeRouting
Replace selected geometry parameters through validated replacement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and replacement values accepted by this strategy's parameter object. |
{}
|
Returns:
| Type | Description |
|---|---|
BaseThreadlikeRouting
|
Routing with the requested numerical changes and unchanged topology. |
Raises:
| Type | Description |
|---|---|
TypeError
|
A field name or replacement type is unsupported. |
ValueError
|
A replacement is invalid or changes routing topology. |
validate_structure_for_robot
¶
Validate segment bounds and prescribed guides at moving joints.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host with static segment topology. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
Span connectivity is incompatible with the host. |
validate_values_for_robot
¶
Validate guide geometry and positive finite segment lengths.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host with material frame conventions. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
Host lengths or guide offsets are invalid. |
solve_routing
¶
Resolve straight spans and their analytical length derivatives.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying local segment and joint guide kinematics. |
required |
configuration
|
Array
|
Configuration, shape |
required |
initial_guess
|
RoutingSolution | None
|
Unused; accepted for the common routing interface. |
None
|
backend
|
str | None
|
Per-call override: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSolution
|
StraightSpanSolution entries. Nonfinite or collapsed spans report failed convergence and NaN derivatives. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If the backend, configuration shape, or routing parameters are invalid, or Warp is requested without JAX 64-bit mode. |
ImportError
|
If Warp is requested and |
path_length_jacobian
¶
Return the analytical derivative of a resolved path family.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying joint guide kinematics. |
required |
configuration
|
Array
|
Configuration matching the solution. |
required |
solution
|
RoutingSolution | None
|
Result returned by this strategy. Omission solves the route once. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Jacobian, shape |
actuation_matrix
¶
Evaluate -J_velocity.T without reconstructing world guide positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
PlanarPCS, PCS, or GVS host. |
required |
configuration
|
Array
|
Configuration, shape |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Matrix of shape |
path_force_matrix
¶
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array
Return the length-conjugate effort map using the selected backend.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host receiving generalized forces. |
required |
q
|
Array
|
Configuration with shape |
required |
friction
|
ThreadlikeFriction
|
Frictionless runtime transmission model. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Force map with shape |
Raises:
| Type | Description |
|---|---|
ValueError
|
The supplied friction model is not frictionless. |
actuation_force
¶
Evaluate tendon forces directly without reconstructing world geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
PlanarPCS, PCS, or GVS host. |
required |
configuration
|
Array
|
Configuration, shape |
required |
tensions
|
Array
|
Signed filament loads, shape |
required |
backend
|
str | None
|
Execution override, following :meth: |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Generalized force, shape |
span_positions
¶
Interpolate a straight span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Unused host for the common sampling interface. |
required |
configuration
|
Array
|
Unused configuration associated with the solution. |
required |
solution
|
RoutingSolution
|
Routing containing world endpoint positions. |
required |
span_index
|
int
|
Static span index. |
required |
fractions
|
Array
|
One-dimensional interpolation fractions in |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions in metres, shape |
soromox.actuation.ShortestPathRouting
¶
Bases: ConfigurationDependentThreadlikeRouting
flowchart TD
soromox.actuation.ShortestPathRouting[ShortestPathRouting]
soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting[ConfigurationDependentThreadlikeRouting]
soromox.actuation.threadlike.base.BaseThreadlikeRouting[BaseThreadlikeRouting]
soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting --> soromox.actuation.ShortestPathRouting
soromox.actuation.threadlike.base.BaseThreadlikeRouting --> soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting
click soromox.actuation.ShortestPathRouting href "" "soromox.actuation.ShortestPathRouting"
click soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting href "" "soromox.actuation.threadlike.routing.ConfigurationDependentThreadlikeRouting"
click soromox.actuation.threadlike.base.BaseThreadlikeRouting href "" "soromox.actuation.threadlike.base.BaseThreadlikeRouting"
Shortest feasible paths through hollow sections and prescribed guides.
A path represents one physical tendon or filament. A span is the portion between two prescribed guides, optimized inside one or more continuous hollow sections. Adjacent spans of a path are connected by a straight cable. A lumen is the hollow interior available to the filament.
The host supplies material strains, their basis, and joint guide kinematics. Floating bases and moving joints are supported. Spans must end at moving joints so the upstream and downstream guide offsets can be prescribed. Derivatives solve the converged KKT equations for a fixed active set. Slack, friction, joint obstacle geometry, and rod bending stiffness are excluded.
Attributes:
| Name | Type | Description |
|---|---|---|
params |
ShortestPathRoutingParams
|
Guide offsets, span topology, and circular lumen dimensions. |
discretization |
PiecewiseLinearRoutingDiscretization
|
Piecewise linear slope mesh and sampling counts. |
solver_options |
RoutingSolverOptions
|
Physical feasibility, solver, and sensitivity tolerances. |
References
Mathew, A. T., Alkayas, A. Y., Alshehhi, A. A. S., Adamu, Y. A., Taha, T., & Renda, F. (2026). A Differentiable Framework for Hollow Tendon-Driven Continuum Robots With Implicit Internal Routing. IEEE Transactions on Robotics, 42, 3009-3027. doi:10.1109/TRO.2026.3714660.
num_paths
property
¶
Return the number of physical paths rather than guided spans.
Returns:
| Type | Description |
|---|---|
int
|
Number of filaments, each corresponding to one actuator channel. |
spans
property
¶
Return the shared span parameters.
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSpanParams
|
RoutingSpanParams containing guide offsets and span-to-path connectivity. |
path_lengths
¶
path_lengths(robot: SoftRobot, configuration: Array, solution: RoutingSolution | None = None) -> Array
Return physical lengths, solving once if no solution is supplied.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host defining the route geometry. |
required |
configuration
|
Array
|
Configuration with shape |
required |
solution
|
RoutingSolution | None
|
Optional resolved route for these exact inputs. Keep its configuration dependence when differentiating this call. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Lengths in metres with shape |
path_velocity_jacobian
¶
Map host velocities to path length rates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying base coordinate and velocity dimensions. |
required |
configuration
|
Array
|
Configuration, shape |
required |
solution
|
RoutingSolution | None
|
Solution at this configuration; omitted solutions are computed once for this call. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Jacobian, shape |
path_positions
¶
path_positions(robot: SoftRobot, q: Array, s: Array, solution: RoutingSolution | None = None) -> Array
Return one world position per path at a reference backbone station.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying kinematics and segment lengths. |
required |
q
|
Array
|
Configuration with shape |
required |
s
|
Array
|
Scalar reference backbone station in metres. |
required |
solution
|
RoutingSolution | None
|
Optional solution for these exact inputs. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Positions with shape |
validate_friction
¶
validate_friction(friction: ThreadlikeFriction) -> None
Check whether this strategy supports the supplied friction model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
friction
|
ThreadlikeFriction
|
Runtime effort-loss model to pair with the routing. |
required |
Raises:
| Type | Description |
|---|---|
ValueError
|
The model is not frictionless. Strategies implementing friction override this check with their own requirements. |
path_force_matrix
¶
path_force_matrix(robot: SoftRobot, q: Array, *, friction: ThreadlikeFriction) -> Array
Map length-conjugate efforts to generalized forces before scaling.
Positive efforts favor lengthening. A tendon transmission supplies a negative coordinate scale. Frictionless paths obey virtual work.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host receiving the generalized forces. |
required |
q
|
Array
|
Configuration with shape |
required |
friction
|
ThreadlikeFriction
|
Runtime effort-loss model supported by this strategy. |
required |
Returns:
| Type | Description |
|---|---|
Array
|
Force map with shape |
Array
|
The default implementation returns the transpose of the physical |
Array
|
length-rate Jacobian. |
Raises:
| Type | Description |
|---|---|
ValueError
|
The strategy does not support the friction model. |
with_params
¶
Replace numerical geometry while retaining routing topology.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
params
|
RoutingSpanParams | ShortestPathRoutingParams
|
Parameters of the same type and topology as this strategy's current parameters. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
ConfigurationDependentThreadlikeRouting
|
Strategy with validated replacement geometry and unchanged algorithm settings. |
update_params
¶
update_params(**updates: Any) -> BaseThreadlikeRouting
Replace selected geometry parameters through validated replacement.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
**updates
|
Any
|
Parameter field names and replacement values accepted by this strategy's parameter object. |
{}
|
Returns:
| Type | Description |
|---|---|
BaseThreadlikeRouting
|
Routing with the requested numerical changes and unchanged topology. |
Raises:
| Type | Description |
|---|---|
TypeError
|
A field name or replacement type is unsupported. |
ValueError
|
A replacement is invalid or changes routing topology. |
validate_structure_for_robot
¶
Check host topology and span compatibility.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host providing material strains and guide kinematics. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
validate_values_for_robot
¶
Validate concrete host and guide geometry.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host providing material strains and guide kinematics. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
solve_routing
¶
Solve all spans and return lengths, coefficients, and diagnostics.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host implementing the material routing interface. |
required |
configuration
|
Array
|
Host generalized coordinates. |
required |
initial_guess
|
RoutingSolution | None
|
Previous |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
RoutingSolution
|
A |
span_offsets
¶
span_offsets(solution: RoutingSolution, span_index: int, points: Array)
Sample material-frame offsets at global backbone coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
solution
|
RoutingSolution
|
RoutingSolution containing resolved spans and solver diagnostics. |
required |
span_index
|
int
|
Zero-based index of the requested span. |
required |
points
|
Array
|
Global reference backbone sample coordinates in metres,
shape
|
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Material-frame offsets in metres with shape |
span_positions
¶
Sample an optimized span in world coordinates.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Host supplying forward kinematics. |
required |
configuration
|
Array
|
Configuration, shape |
required |
solution
|
RoutingSolution
|
Resolved routing at this configuration. |
required |
span_index
|
int
|
Static span index. |
required |
fractions
|
Array
|
One-dimensional fractions of the backbone interval. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
World positions in metres, shape |
path_length_jacobian
¶
path_length_jacobian(robot, configuration, solution: RoutingSolution | None = None)
Evaluate the optimal length gradient at an already solved route.
The envelope identity applies because the material-frame endpoint and
wall constraints are independent of configuration. The caller must
supply a converged solution for this robot, configuration, and routing.
On a fixed base host, positive tensions produce -jacobian.T @ tension.
Use the velocity Jacobian to compute forces on floating base hosts.
This computes a partial derivative holding routing coefficients fixed.
Differentiating this method again requires the supplied solution to
retain its dependence on configuration through solve_routing.
This implements the paper's tangent derivative (B2) integrated against
the unit tangent, equivalently the transpose of (B5), with the envelope
identity (26). It does not invoke autodiff to evaluate this Jacobian.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
Continuum host implementing the material routing interface. |
required |
configuration
|
Array
|
Generalized coordinates, shape
|
required |
solution
|
RoutingSolution | None
|
Converged routing for this geometry and configuration. Omission solves the route once. |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
result |
Array
|
Length Jacobian, shape |
soromox.actuation.RoutingSolverOptions
¶
Bases: Module
flowchart TD
soromox.actuation.RoutingSolverOptions[RoutingSolverOptions]
click soromox.actuation.RoutingSolverOptions href "" "soromox.actuation.RoutingSolverOptions"
Separate numerical termination, physical feasibility, and sensitivity checks.
Attributes:
| Name | Type | Description |
|---|---|---|
max_steps |
int
|
Positive upper bound on SLSQP iterations. |
tolerance |
float
|
Dimensionless SLSQP termination tolerance. |
endpoint_tolerance |
float
|
Maximum endpoint position residual in metres. |
wall_tolerance |
float
|
Maximum radial wall penetration in metres, also applied to the continuous-span clearance bound by the routing strategy. |
optimality_tolerance |
float
|
Maximum normalized stationarity residual for forward routing and its analytical envelope force evaluation. |
complementarity_tolerance |
float
|
Maximum normalized multiplier/residual product. |
dual_tolerance |
float
|
Maximum allowed negative wall multiplier magnitude. |
sensitivity_tolerance |
float
|
Stricter normalized KKT residual limit for derivatives through the optimized coefficients. Forward acceptance alone does not certify these derivatives. |
active_tolerance |
float
|
Wall residual threshold used to identify active constraints; also the strict complementarity margin for derivatives. |
regularization |
float
|
Positive diagonal addition to the primal KKT Hessian during sensitivity solves, after checking the original matrix rank. |
__check_init__
¶
Validate parameters after construction.
Returns:
| Name | Type | Description |
|---|---|---|
result |
None
|
|
Native Warp actuation¶
soromox.execution.warp.actuation.threadlike.straight_span.StraightSpanActuation
¶
Native Warp threadlike actuation for straight spans between guides.
Construct before CUDA graph capture. Outputs alias reusable buffers; copy results that must survive subsequent calls. Calls on one instance must be ordered on the same stream. Rebuild after changing model or guide parameters.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
robot
|
SoftRobot
|
PlanarPCS, PCS, or GVS host with FP64 model data. |
required |
routing
|
StraightSpanRouting
|
Prescribed guides and span connectivity. |
required |
batch_size
|
int
|
Positive number of environments sharing model and guides. |
1
|
device
|
str | Device | None
|
Warp device or device name; None uses Warp's current device. |
None
|
Attributes:
| Name | Type | Description |
|---|---|---|
force_buffer |
Reused generalized forces |
|
matrix_buffer |
Reused actuation matrices
|
Raises:
| Type | Description |
|---|---|
ValueError
|
Invalid batch size, guide geometry, topology, or disabled JAX 64-bit mode during model preparation. |
actuation_force
¶
Evaluate generalized forces for a batch of configurations and loads.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
array
|
Contiguous FP64 Warp configurations |
required |
tensions
|
array
|
Contiguous FP64 signed axial loads |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
array
|
Reused |
Raises:
| Type | Description |
|---|---|
ValueError
|
An input has the wrong shape, dtype, device, or contiguity. |
actuation_matrix
¶
Evaluate the mapping from signed axial loads to generalized forces.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
q
|
array
|
Contiguous FP64 Warp configurations |
required |
Returns:
| Name | Type | Description |
|---|---|---|
result |
array
|
Reused |
Raises:
| Type | Description |
|---|---|
ValueError
|
The input has the wrong shape, dtype, device, or contiguity. |