@@ -8,12 +8,12 @@ def ode_factory(
8
8
dynamical_matrices_fn : Callable , params : Dict [str , Array ], tau : Array
9
9
) -> Callable [[float , Array ], Array ]:
10
10
"""
11
- Make an ODE function of the form ode_fn(t, x) -> x_dot .
11
+ Make an ODE function of the form ode_fn(t, x) -> xd .
12
12
This function assumes a constant torque input (i.e. zero-order hold).
13
13
Args:
14
14
dynamical_matrices_fn: Callable that returns the B, C, G, K, D, and A matrices. Needs to conform to the signature:
15
- dynamical_matrices_fn(params, q, q_d ) -> Tuple[B, C, G, K, D, A]
16
- where q and q_d are the configuration and velocity vectors, respectively,
15
+ dynamical_matrices_fn(params, q, qd ) -> Tuple[B, C, G, K, D, A]
16
+ where q and qd are the configuration and velocity vectors, respectively,
17
17
B is the inertia matrix of shape (n_q, n_q),
18
18
C is the Coriolis matrix of shape (n_q, n_q),
19
19
G is the gravity vector of shape (n_q, ),
@@ -23,7 +23,7 @@ def ode_factory(
23
23
params: Dictionary with robot parameters
24
24
tau: torque vector of shape (n_tau, )
25
25
Returns:
26
- ode_fn: ODE function of the form ode_fn(t, x) -> x_dot
26
+ ode_fn: ODE function of the form ode_fn(t, x) -> xd
27
27
"""
28
28
29
29
def ode_fn (t : float , x : Array , * args ) -> Array :
@@ -34,15 +34,15 @@ def ode_fn(t: float, x: Array, *args) -> Array:
34
34
x: state vector of shape (2 * n_q, )
35
35
args: additional arguments
36
36
Returns:
37
- x_d : time-derivative of the state vector of shape (2 * n_q, )
37
+ xd : time-derivative of the state vector of shape (2 * n_q, )
38
38
"""
39
- x_d = euler_lagrangian .nonlinear_state_space (
39
+ xd = euler_lagrangian .nonlinear_state_space (
40
40
dynamical_matrices_fn ,
41
41
params ,
42
42
x ,
43
43
tau ,
44
44
)
45
- return x_d
45
+ return xd
46
46
47
47
return ode_fn
48
48
@@ -51,12 +51,12 @@ def ode_with_forcing_factory(
51
51
dynamical_matrices_fn : Callable , params : Dict [str , Array ]
52
52
) -> Callable [[float , Array ], Array ]:
53
53
"""
54
- Make an ODE function of the form ode_fn(t, x) -> x_dot .
54
+ Make an ODE function of the form ode_fn(t, x) -> xd .
55
55
This function assumes a constant torque input (i.e. zero-order hold).
56
56
Args:
57
57
dynamical_matrices_fn: Callable that returns the B, C, G, K, D, and A matrices. Needs to conform to the signature:
58
- dynamical_matrices_fn(params, q, q_d ) -> Tuple[B, C, G, K, D, A]
59
- where q and q_d are the configuration and velocity vectors, respectively,
58
+ dynamical_matrices_fn(params, q, qd ) -> Tuple[B, C, G, K, D, A]
59
+ where q and qd are the configuration and velocity vectors, respectively,
60
60
B is the inertia matrix of shape (n_q, n_q),
61
61
C is the Coriolis matrix of shape (n_q, n_q),
62
62
G is the gravity vector of shape (n_q, ),
@@ -65,7 +65,7 @@ def ode_with_forcing_factory(
65
65
A is the actuation matrix of shape (n_q, n_tau).
66
66
params: Dictionary with robot parameters
67
67
Returns:
68
- ode_fn: ODE function of the form ode_fn(t, x, tau) -> x_dot
68
+ ode_fn: ODE function of the form ode_fn(t, x, tau) -> xd
69
69
"""
70
70
71
71
def ode_fn (
@@ -80,14 +80,14 @@ def ode_fn(
80
80
x: state vector of shape (2 * n_q, )
81
81
tau: external torque vector of shape (n_tau, )
82
82
Returns:
83
- x_d : time-derivative of the state vector of shape (2 * n_q, )
83
+ xd : time-derivative of the state vector of shape (2 * n_q, )
84
84
"""
85
- x_d = euler_lagrangian .nonlinear_state_space (
85
+ xd = euler_lagrangian .nonlinear_state_space (
86
86
dynamical_matrices_fn ,
87
87
params ,
88
88
x ,
89
89
tau ,
90
90
)
91
- return x_d
91
+ return xd
92
92
93
93
return ode_fn
0 commit comments