Skip to content

Commit 7b6590b

Browse files
authored
Fix tendon length expression and actuation matrix for planar pcs system (#8)
* Fix tendon length expression and actuation matrix for planar pcs system * Update symbolic expressions * Bump version
1 parent 99098af commit 7b6590b

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name = "jsrm" # Required
1717
#
1818
# For a discussion on single-sourcing the version, see
1919
# https://packaging.python.org/guides/single-sourcing-package-version/
20-
version = "0.0.15" # Required
20+
version = "0.0.16" # Required
2121

2222
# This is a one-line description or tagline of what your project does. This
2323
# corresponds to the "Summary" metadata field:

src/jsrm/symbolic_derivation/planar_pcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ def symbolically_derive_planar_pcs_model(
153153
U_g = U_g + U_gi
154154

155155
# simplify derived tendon length
156-
L_tend = L_tend + s * (1 + kappa_be * d) * sp.sqrt(sigma_sh**2 + sigma_ax**2)
156+
L_tend = L_tend + s * sp.sqrt(sigma_sh**2 + (sigma_ax + kappa_be * d)**2)
157157
L_tend_sms.append(L_tend)
158158
print(f"L_tend of segment {i+1}:\n", L_tend)
159159
# take the derivative of the tendon length with respect to the configuration
-3 Bytes
Binary file not shown.
-28 Bytes
Binary file not shown.
438 KB
Binary file not shown.

src/jsrm/systems/tendon_actuated_planar_pcs.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,11 +87,11 @@ def compute_A_d_wrt_xi_i(i: Array, l_i: Array, xi_i: Array) -> Array:
8787
Returns:
8888
A_d_segment: actuation matrix for the segment of shape (3, 3)
8989
"""
90-
sigma_norm = jnp.sqrt(xi_i[1] ** 2 + xi_i[2] ** 2)
90+
square_root_term = jnp.sqrt(xi[1]**2 + (xi[2] + d * xi[0])**2)
9191
A_d_wrt_xi_i = - jnp.array([
92-
d * l_i * sigma_norm,
93-
l_i * xi_i[1] * (1 + d * xi_i[0]) / sigma_norm,
94-
l_i * xi_i[2] * (1 + d * xi_i[0]) / sigma_norm,
92+
l_i * d * (d * xi_i[0] + xi_i[2]) / square_root_term,
93+
l_i * xi_i[1] / square_root_term,
94+
l_i * (d * xi_i[0] + xi_i[2]) / square_root_term,
9595
])
9696
return jnp.where(
9797
i * jnp.ones((3, )) <= segment_idx * jnp.ones((3, )),

0 commit comments

Comments
 (0)