After close inspection of the internal variable of the centroidal model, seems that after a while, NaN are produced, after few (10) iteration of the centroidal model started with valid values.
Input and output :
after n=10 iterations
Variable
jnp.isnan(x)
input
no NaN
state
no NaN
current_contact
no NaN
new_state
NaN
How to produce the error
Initial inputs have been saved and the code as been reproduced in a separate python environment.
Then, in order to stop on NaN the following config for the jax debugger has been used :
jax.config.update("jax_debug_nans", True)
jax.config.update("jax_disable_jit", True)
The exacte line that produce the error is the following :
angular_acc_base = -jnp.dot(self.inertia_inv, jnp.dot(skew(w), jnp.dot(self.inertia, w))) + jnp.dot(self.inertia_inv, jnp.dot(b_R_w, temp2))
In integrate_jax in the centroidal model class. Further work is necessary to see why this happened
NaN in centroidal Model
After close inspection of the internal variable of the centroidal model, seems that after a while, NaN are produced, after few (10) iteration of the centroidal model started with valid values.
Input and output :
n=10
iterationsinput
NaN
state
NaN
current_contact
NaN
new_state
NaN
How to produce the error
Initial inputs have been saved and the code as been reproduced in a separate python environment. Then, in order to stop on NaN the following config for the jax debugger has been used :
jax.config.update("jax_debug_nans", True)
jax.config.update("jax_disable_jit", True)
The exacte line that produce the error is the following :
angular_acc_base = -jnp.dot(self.inertia_inv, jnp.dot(skew(w), jnp.dot(self.inertia, w))) + jnp.dot(self.inertia_inv, jnp.dot(b_R_w, temp2))
Inintegrate_jax
in the centroidal model class. Further work is necessary to see why this happened