[ODE] AutoDisable issue?

Mohsin Hasan mohsin.hasan at trivor.com
Mon May 24 15:25:09 MST 2004


Ok... The bottleneck is in the function dxProcessIslands in file util.cpp
and at the following statements.

  // set all body/joint tags to 0
  for (b=world->firstbody; b; b=(dxBody*)b->next) b->tag = 0;
  for (j=world->firstjoint; j; j=(dxJoint*)j->next) j->tag = 0;

The second statement seems to be the more costly of the two. It retags all
the joints to 0. Since after falling there are a lot of contact joints, this
count must have grown considerably. Even though all the bodies have been
disabled the tagging is still being done on all the joints. I haven't really
gone into the detail of what's the purpose of tag so I'm not sure why it is
being done here. Any comments?

Mohsin

-----Original Message-----
From: Mohsin Hasan [mailto:mohsin.hasan at trivor.com] 
Sent: Monday, May 24, 2004 2:56 PM
To: 'ode at q12.org'
Subject: RE: [ODE] AutoDisable issue?

Why would a collision test be done if the object is disabled? Maybe I'm
missing something here. I guess I'll just debug the ODE code and see what's
happening. I am using Hashspace BTW.

Mohsin


Mohsin Hasan wrote:
> When the simulation starts all the bodies get autodisabled and the stack
is
> perfectly resting. I am getting an average FPS of 245 FPS. I drop a sphere
> from top and all the stacks collapse with cubes all over the ground.
> Simulation speed varies by dropping to 50 FPS to 230 FPS to again 50 FPS
and
> finally when all the bodies get disabled I get a stable 145 FPS... 100
less
> than the original disabled bodies FPS I was getting. Why is that?

There's more going on than simulation.  The extra time is probably
being taken up by colliding the rather different distribution of
geoms, even though they're disabled (I don't think that ODE culls
away collisions between pairs of disabled bodies until fairly late,
but I could be wrong).  The penalty for that will vary depending
on the type of Space used.

But then, you could always profile and stop guessing.

--Adam
-- 
Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3





More information about the ODE mailing list