Jump to content

NAN and mantra


Guest xionmark

Recommended Posts

Guest xionmark

Hello,

I'm getting NAN complaints from mantra even though I'm clamping the values in question to the standard C++ numeric limits. Is there a different limit I should be using in the HDK?

The message from mantra:

mantra: Geometry undefined contains NANs

This is how I'm trying to clamp the velocity being passed to mantra, seems fine to me:

		 SYSclamp(v[0], std::numeric_limits<float>::min(), std::numeric_limits<float>::max());
		 SYSclamp(v[1], std::numeric_limits<float>::min(), std::numeric_limits<float>::max());
		 SYSclamp(v[2], std::numeric_limits<float>::min(), std::numeric_limits<float>::max());

Many thanks!

Edited by xionmark
Link to comment
Share on other sites

Guest xionmark

Hi Edward,

It did affect P as well, but there was a common variable used in calculating both v and P. Once I identified the questionable var I quickly located the error; there was a condition that would set this variable to 0, and thus subsequent calculations generated NAN's. (!)

As often is the case one needs to step away from the computer for the answer to arrive ... :-)

--Mark

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...