7
7
8
8
9
9
def substitute_params_into_all_symbolic_expressions (
10
- sym_exps : Dict , params : Dict [str , jnp . array ]
10
+ sym_exps : Dict , params : Dict [str , Array ]
11
11
) -> Dict :
12
12
"""
13
13
Substitute robot parameters into symbolic expressions.
@@ -43,11 +43,10 @@ def substitute_params_into_all_symbolic_expressions(
43
43
44
44
return exps
45
45
46
-
47
46
def substitute_params_into_single_symbolic_expression (
48
47
sym_exp : sp .Expr ,
49
48
params_syms : Dict [str , List [sp .Symbol ]],
50
- params : Dict [str , jnp . array ],
49
+ params : Dict [str , Array ],
51
50
) -> sp .Expr :
52
51
"""
53
52
Substitute robot parameters into a single symbolic expression.
@@ -72,7 +71,6 @@ def substitute_params_into_single_symbolic_expression(
72
71
73
72
return sym_exp
74
73
75
-
76
74
def concatenate_params_syms (
77
75
params_syms : Dict [str , Union [sp .Symbol , List [sp .Symbol ]]],
78
76
) -> List [sp .Symbol ]:
@@ -85,16 +83,17 @@ def concatenate_params_syms(
85
83
params_syms_cat .append (params_sym )
86
84
return params_syms_cat
87
85
88
-
89
86
def compute_strain_basis (
90
87
strain_selector : Array ,
91
- ) -> jnp . ndarray :
88
+ ) -> Array :
92
89
"""
93
90
Compute strain basis based on boolean strain selector.
94
91
Args:
95
- strain_selector: boolean array of shape (n_xi, ) specifying which strain components are active
92
+ strain_selector (Array):
93
+ boolean array of shape (n_xi, ) specifying which strain components are active
96
94
Returns:
97
- strain_basis: strain basis matrix of shape (n_xi, n_q) where n_q is the number of configuration variables
95
+ strain_basis (Array):
96
+ strain basis matrix of shape (n_xi, n_q) where n_q is the number of configuration variables
98
97
and n_xi is the number of strains
99
98
"""
100
99
n_q = strain_selector .sum ().item ()
@@ -106,7 +105,6 @@ def compute_strain_basis(
106
105
strain_basis = strain_basis .at [i , j ].set (1.0 )
107
106
return strain_basis
108
107
109
-
110
108
@jit
111
109
def compute_planar_stiffness_matrix (l : Array , A : Array , Ib : Array , E : Array , G : Array ) -> Array :
112
110
"""
0 commit comments