[ODE] vanishing objects and clearing all objects

Adam Paul Coates acoates at stanford.edu
Tue Aug 5 00:41:02 2003


On Mon, 4 Aug 2003, Thomas Grimes wrote:
> out at all. But when three boxes touch each other and they all stop moving
> around and are at rest, they just vanish! Thanks.
I had a problem like this with a couple of spheres sitting at rest for
more than a few seconds -- it turned out that some NaNs were coming up
somewhere in the integrator.  Taking a hint from a FAQ, I increased their
mass and that seemed to fix it.  Not sure if this is the same thing...

>
> >From: Ed Jones <ed.jones@oracle.com>
> >To: Thomas Grimes <striiideerr@hotmail.com>
> >Subject: Re: [ODE] vanishing objects and clearing all objects
> >Date: Tue, 05 Aug 2003 12:52:49 +1000
> >
> >>t = next_obj = obj_num = 0;
> >
> >
> >You're only ever going to destroy the first object aren't you?
> >
> >Do you mean to put that outside the for loop?
> >
> >Cheers,
> >Ed.
> >
> >
> >Thomas Grimes wrote:
> >
> >>I have made a simple ODE demo that does the same thing as the box dropping
> >>demo that comes with the ODE source. Well for some odd reason mine is
> >>having issues. For one, when I made my demo let me drop more than one box
> >>at once I noticed that sometimes, not always, a small group of my boxes
> >>will just vanish! Now I have my program setup so that you can't drop more
> >>than 10 boxes and if you try to it does nothing, it wont execute the code
> >>that creates new boxes and such. What would cause some of the objects to
> >>just vanish?
> >>
> >>Also, I have an option that when I hit the 'c' key, all of the boxes get
> >>cleared so I can drop some more. Here is what that part looks like:
> >>
> >>if( KEYDOWN( buffer, DIK_C ) && !KEYDOWN( oldbuff, DIK_C ) )    // Clear
> >>the box (C key)
> >>{
> >>   for( int i = 0; i < obj_num; ++i )
> >>  {
> >>      dBodyDestroy( g_obj[i].body );
> >>      dGeomDestroy( g_obj[i].geom[0] );
> >>      memset( &g_obj[i], 0, sizeof( g_obj[i] ) );
> >>
> >>      t = next_obj = obj_num = 0;
> >>  }
> >>
> >>  dropped = false;
> >>}
> >>
> >>Ok after I do this all boxes are gone. But when I start dropping more
> >>boxes, it's like those old boxes still exist in the world and my new ones
> >>will bounce or sit on the old but invisible boxes. Why would it be doing
> >>that? When I hit 'c' I want all box objects I created to be gone
> >>completely and not leave their "ghost" in the world. Thanks.
> >>
> >>_________________________________________________________________
> >>The new MSN 8: smart spam protection and 2 months FREE*
> >>http://join.msn.com/?page=features/junkmail
> >>
> >>_______________________________________________
> >>ODE mailing list
> >>ODE@q12.org
> >>http://q12.org/mailman/listinfo/ode
> >
> >
>
> _________________________________________________________________
> Add photos to your e-mail with MSN 8. Get 2 months FREE*.
> http://join.msn.com/?page=features/featuredemail
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
>