dartsim / dart

DART: Dynamic Animation and Robotics Toolkit
http://dartsim.github.io/
BSD 2-Clause "Simplified" License
900 stars 286 forks source link

In debug mode, we should throw assertions when incoming positions are NaN or Inf #597

Open mxgrey opened 8 years ago

mxgrey commented 8 years ago

Currently we have assertions which (in debug mode) check that the transformations generated by the kinematics and dynamics are valid transformations, and this is useful for identifying when a bug is occurring. But by the time we're computing the transformation, it can be hard or even impossible to tell what the source of the bug was.

I think if we put in assertions to check that incoming positions (and velocities, accelerations, etc) are not NaN or Inf, it will be much easier to identify what the source of the error is.

jslee02 commented 8 years ago

Precondition check sounds good. I'd like to keep the current postcondition checks along precondition checks.

mxgrey commented 8 years ago

Yes, I agree that we should keep all the existing checks in place.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.