Assertion fails in CustomDGRayCastCar.cpp

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Assertion fails in CustomDGRayCastCar.cpp

Postby mihu » Fri Aug 27, 2010 8:43 am

Hi,

I'm new to Newton and I'm using it through latest (I think) OgreNewt that resides here:
https://svn.ogre3d.org/svnroot/ogreaddo ... t/newton20

I'm trying to quickly set up simple vehicle physics and I actually managed to. It works well in RELEASE, I have a big problem in DEBUG mode though.

I've started with example no. 5 (SimpleVehicle) from OgreNewt that uses CustomDGRayCastCar. I've added only a few things: calls to methods SetTireTorque, SetTireSteerAngleForce, SetTireRollingResistance. AFAIR, however, problem started to show up instantly when I started experimenting with vehicle using SetTireTorque exclusively.

The problem is: when vehicle is close to stopping or has low velocity, assertion from CustomDGRayCastCar.cpp, line 927, fails very often, usually at once after setting up world and car, or after few seconds.
Code is from the method CalculateLongitudinalForce and looks like this:

Code: Select all
if(velocAbs > 1.0e-2f)
{
// ... (apparently calculations of torque, angular velocity and possibly something else)
}
else
{
  if(dAbs (tire.m_torque) > 0.1f) {
    _ASSERTE(0);
  }
}


Now, I don't want to dive too deep into what it means, because I've already achieved most of the mechanics I wanted. Problem seems quite simple, I was even thinking about recompiling library with assertion removed, but it seems to be an overkill method. Do you have any ideas on what things (maybe methods setting some parameters that I could experiment with) that could help me get rid of the issue?
mihu
 

Re: Assertion fails in CustomDGRayCastCar.cpp

Postby kallaspriit » Fri Aug 27, 2010 12:28 pm

From just this piece of code, the assert does not seem necessary, removing it might be ok, should look at the rest of the code first.

If you get it to work properly, let us know in OgreNewt forums so we can update the demo :)
kallaspriit
 
Posts: 216
Joined: Sun Aug 14, 2005 6:31 pm


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 210 guests

cron