@@ -8,12 +8,12 @@ def ode_factory(
88 dynamical_matrices_fn : Callable , params : Dict [str , Array ], tau : Array
99) -> Callable [[float , Array ], Array ]:
1010 """
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 .
1212 This function assumes a constant torque input (i.e. zero-order hold).
1313 Args:
1414 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,
1717 B is the inertia matrix of shape (n_q, n_q),
1818 C is the Coriolis matrix of shape (n_q, n_q),
1919 G is the gravity vector of shape (n_q, ),
@@ -23,7 +23,7 @@ def ode_factory(
2323 params: Dictionary with robot parameters
2424 tau: torque vector of shape (n_tau, )
2525 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
2727 """
2828
2929 def ode_fn (t : float , x : Array , * args ) -> Array :
@@ -34,15 +34,15 @@ def ode_fn(t: float, x: Array, *args) -> Array:
3434 x: state vector of shape (2 * n_q, )
3535 args: additional arguments
3636 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, )
3838 """
39- x_d = euler_lagrangian .nonlinear_state_space (
39+ xd = euler_lagrangian .nonlinear_state_space (
4040 dynamical_matrices_fn ,
4141 params ,
4242 x ,
4343 tau ,
4444 )
45- return x_d
45+ return xd
4646
4747 return ode_fn
4848
@@ -51,12 +51,12 @@ def ode_with_forcing_factory(
5151 dynamical_matrices_fn : Callable , params : Dict [str , Array ]
5252) -> Callable [[float , Array ], Array ]:
5353 """
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 .
5555 This function assumes a constant torque input (i.e. zero-order hold).
5656 Args:
5757 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,
6060 B is the inertia matrix of shape (n_q, n_q),
6161 C is the Coriolis matrix of shape (n_q, n_q),
6262 G is the gravity vector of shape (n_q, ),
@@ -65,7 +65,7 @@ def ode_with_forcing_factory(
6565 A is the actuation matrix of shape (n_q, n_tau).
6666 params: Dictionary with robot parameters
6767 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
6969 """
7070
7171 def ode_fn (
@@ -80,14 +80,14 @@ def ode_fn(
8080 x: state vector of shape (2 * n_q, )
8181 tau: external torque vector of shape (n_tau, )
8282 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, )
8484 """
85- x_d = euler_lagrangian .nonlinear_state_space (
85+ xd = euler_lagrangian .nonlinear_state_space (
8686 dynamical_matrices_fn ,
8787 params ,
8888 x ,
8989 tau ,
9090 )
91- return x_d
91+ return xd
9292
9393 return ode_fn
0 commit comments