Skip to content

Commit 1bde91a

Browse files
committed
Rename pneumatic_planar_pcs to pneumatically_actuated_planar_pcs
1 parent c3e87a1 commit 1bde91a

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

examples/simulate_pneumatic_planar_pcs.py renamed to examples/simulate_pneumatically_actuated_planar_pcs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import jsrm
1414
from jsrm import ode_factory
15-
from jsrm.systems import pneumatic_planar_pcs
15+
from jsrm.systems import pneumatically_actuated_planar_pcs
1616

1717
num_segments = 1
1818

@@ -48,7 +48,7 @@
4848
strain_selector = jnp.array([True, False, True])[None, :].repeat(num_segments, axis=0).flatten()
4949

5050
B_xi, forward_kinematics_fn, dynamical_matrices_fn, auxiliary_fns = (
51-
pneumatic_planar_pcs.factory(
51+
pneumatically_actuated_planar_pcs.factory(
5252
num_segments, sym_exp_filepath, strain_selector, # simplified_actuation_mapping=True
5353
)
5454
)

src/jsrm/systems/planar_pcs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,7 @@ def actuation_mapping_fn(
242242
jacobian_fn: Callable,
243243
params: Dict[str, Array],
244244
B_xi: Array,
245+
xi_eq: Array,
245246
q: Array,
246247
) -> Array:
247248
"""
@@ -252,6 +253,7 @@ def actuation_mapping_fn(
252253
jacobian_fn: function to compute the Jacobian
253254
params: dictionary with robot parameters
254255
B_xi: strain basis matrix
256+
xi_eq: equilibrium strains as array of shape (n_xi,)
255257
q: configuration of the robot
256258
Returns:
257259
A: actuation matrix of shape (n_xi, n_xi) where n_xi is the number of strains.
@@ -359,7 +361,7 @@ def dynamical_matrices_fn(
359361
# compute the stiffness matrix
360362
K = stiffness_fn(params, B_xi, formulate_in_strain_space=True)
361363
# compute the actuation matrix
362-
A = actuation_mapping_fn(forward_kinematics_fn, jacobian_fn, params, B_xi, q)
364+
A = actuation_mapping_fn(forward_kinematics_fn, jacobian_fn, params, B_xi, xi_eq, q)
363365

364366
# dissipative matrix from the parameters
365367
D = params.get("D", jnp.zeros((n_xi, n_xi)))

src/jsrm/systems/pneumatic_planar_pcs.py renamed to src/jsrm/systems/pneumatically_actuated_planar_pcs.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def factory(
1515
**kwargs
1616
):
1717
"""
18-
Factory function for the planar PCS.
18+
Factory function for the pneumatically-actuated planar PCS.
1919
Args:
2020
num_segments: number of segments
2121
segment_actuation_selector: actuation selector for the segments as boolean array of shape (num_segments,)
@@ -43,6 +43,7 @@ def actuation_mapping_fn(
4343
jacobian_fn: Callable,
4444
params: Dict[str, Array],
4545
B_xi: Array,
46+
xi_eq: Array,
4647
q: Array,
4748
) -> Array:
4849
"""
@@ -52,6 +53,7 @@ def actuation_mapping_fn(
5253
jacobian_fn: function to compute the Jacobian
5354
params: dictionary with robot parameters
5455
B_xi: strain basis matrix
56+
xi_eq: equilibrium strains as array of shape (n_xi,)
5557
q: configuration of the robot
5658
Returns:
5759
A: actuation matrix of shape (n_xi, n_act) where n_xi is the number of strains and

0 commit comments

Comments
 (0)