[Opensim-dev] Terrain ---> Height field code || altering ODE.dll to remove the ((nMinX < nMaxX || nMinZ < nMaxZ)) error

dan miller danbmil99 at yahoo.com
Sat Nov 3 23:13:49 UTC 2007


We've semi-forked ODE for just this reason.  I already modded it to ignore
the ubiquitous dNormalize4 errors.

If you submit a patch to ODE in opensim-libs, I can check it in with
compiled binaries for linux & windows.

-dan

--- Teravus Ovares <teravus at gmail.com> wrote:

> Dan
> 
> Looking at the ODE stability issue..      Excessive forces cause an error
> in
> int dCollideHeightfield( dxGeom *o1, dxGeom *o2, int flags, dContactGeom*
> contact, int skip ) in heightfield.cpp in ODE.
> 
> The error occurs on line 1741.
> 
> However..   looking at the code in heightfield.cpp, nMinX nMaxX, nMinZ and
> nMaxZ are derived from the terrain.   So, next steps on this bug parhaps
> are
> to find out if our terrain--> heightfield code has errors, or if there's
> some kind of error in heightfield.cpp that we can simply ignore and
> continue
> by returning an int 0, for number of collisions.
> 
> CodeSample from heightfield.cpp;
> 
>     nMinX = int(dFloor(o2->aabb[0] *
> terrain->m_p_data->m_fInvSampleWidth));
>     nMaxX = int(dFloor(o2->aabb[1] *
> terrain->m_p_data->m_fInvSampleWidth))
> + 1;
>     nMinZ = int(dFloor(o2->aabb[4] *
> terrain->m_p_data->m_fInvSampleDepth));
>     nMaxZ = int(dFloor(o2->aabb[5] *
> terrain->m_p_data->m_fInvSampleDepth))
> + 1;
> 
>     if ( !wrapped )
>     {
>         nMinX = dMAX( nMinX, 0 );
>         nMaxX = dMIN( nMaxX, terrain->m_p_data->m_nWidthSamples - 1 );
>         nMinZ = dMAX( nMinZ, 0 );
>         nMaxZ = dMIN( nMaxZ, terrain->m_p_data->m_nDepthSamples - 1 );
> 
>         dIASSERT ((nMinX < nMaxX) || (nMinZ < nMaxZ))   // <---- Generates
> the error
> 
> 
>     }
> 
> 
> 
> Best Regards
> 
> Teravus
> > _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
> 




More information about the Opensim-dev mailing list