Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JMinvJt_damping results in pinocchio quaternion assertion #270

Open
wxmerkt opened this issue Nov 18, 2019 · 5 comments
Open

JMinvJt_damping results in pinocchio quaternion assertion #270

wxmerkt opened this issue Nov 18, 2019 · 5 comments

Comments

@wxmerkt
Copy link
Collaborator

wxmerkt commented Nov 18, 2019

In GitLab by @wxmerkt on Oct 10, 2019, 14:57

I've added 1e-12 damping to every action model as follows (in quadruped.py):

dmodel = crocoddyl.DifferentialActionModelContactFwdDynamics(self.state, self.actuation, contactModel, costModel)
dmodel.JMinvJt_damping = 1e-12
model = crocoddyl.IntegratedActionModelEuler(dmodel, timeStep)

When solving, I now receive the following assertion crash:

python: /opt/openrobots/include/pinocchio/math/quaternion.hpp:89: void pinocchio::quaternion::firstOrderNormalize(const Eigen::QuaternionBase<Derived>&) [with D = Eigen::Map<Eigen::Quaternion<double>, 0>]: Assertion `static_leq::op(math::fabs(N2-1.), epsilon)' failed.

Without damping, the assertion in the DifferentialActionModelContactFwdDynamics triggers.

@wxmerkt
Copy link
Collaborator Author

wxmerkt commented Nov 18, 2019

In GitLab by @wxmerkt on Oct 10, 2019, 14:58

changed the description

@wxmerkt
Copy link
Collaborator Author

wxmerkt commented Nov 18, 2019

In GitLab by @cmastalli on Oct 10, 2019, 15:13

This assertion occurs when your quaternion inside the state is wrong, e.g. all values are infinity or NaN. Pinocchio detected in Debug mode compilation (i.e. Debug mode compilation of Crocoddyl).

You need to tell me more to understand why you have wrong values in the quaternions. This could happen with the divergence in the rollout of the dynamics.

@wxmerkt
Copy link
Collaborator Author

wxmerkt commented Nov 18, 2019

In GitLab by @cmastalli on Oct 10, 2019, 15:15

But we should expect our solver to leave the rollout loop before this happens

@wxmerkt
Copy link
Collaborator Author

wxmerkt commented Nov 18, 2019

In GitLab by @wxmerkt on Oct 10, 2019, 15:15

I compiled both Pinocchio and Crocoddyl in Debug mode to trace down another bug. This happens when you run the quadrupedal_gaits.py example, i.e., the one using FDDP. All the changes I made is to (a) set pseudoImpulse=False and (b) to add the 1e-12 damping as described above in quadruped.py.

@wxmerkt
Copy link
Collaborator Author

wxmerkt commented Nov 18, 2019

In GitLab by @cmastalli on Oct 10, 2019, 20:28

Thanks for reporting it.
Please note that the impulse dynamics are still in experimental phase. I didn't have time to check myself them. And we solve the impulse dynamics differently compared with the legacy Python code (i.e. through Cholesky decomposition)

As soon as possible, I'll investigate this issue if this is still unsolved.

@cmastalli cmastalli added this to open in Feature extension Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

1 participant