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

ODE assertion fails #3

Open
costashatz opened this issue Oct 16, 2015 · 2 comments
Open

ODE assertion fails #3

costashatz opened this issue Oct 16, 2015 · 2 comments

Comments

@costashatz
Copy link
Member

Sometimes when running the ITE experiments I am getting the following error/assertion failure:

ODE INTERNAL ERROR 1: assertion "bNormalizationResult" failed in _dNormalize4() [../../../../../include/ode/odemath.h]

We should fix this.

@jbmouret
Copy link
Member

jbmouret commented Oct 16, 2015

We can't because it is in ODE and not in our code! This is a very classic issue with ODE.
The classic fixes are:

  • compile ODE without the assertions
  • or change ODE in the following way:

In ode/src/odemath.h these two lines (note that the ODE library on our cluster already has this patch).

PURE_INLINE void _dNormalize3(dVector3 a)
{
  int bNormalizationResult = _dSafeNormalize3(a);
  if(bNormalizationResult==false)
    throw(3);
  dIVERIFY(bNormalizationResult);
}

PURE_INLINE void _dNormalize4(dVector4 a)
{
  int bNormalizationResult = _dSafeNormalize4(a);
  if(bNormalizationResult==false)
    throw(4);
  dIVERIFY(bNormalizationResult);
}

This is a dirty way to solve the problem, but it works. If you have time, you can look around if there is an option (like a Cflags, or an configure parameter) that disables these assert.

By the way, do not forget to set ODE in double precision mode with this option: --enable-double-precision (by doing ./configure --enable-double-precision )

@jbmouret
Copy link
Member

In addition, if you were thinking about changing our code so that this error never happens, this is not a good idea. We did try for a long time, and we can minimize them, but we can never be sure that these errors will not happen when we use learning/evolutionary algorithms (that will try crazy things!).

bitsandscraps added a commit to bitsandscraps/webots that referenced this issue May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants