[ODE] stack requirements
Nate W
coding at natew.com
Thu Jul 18 23:30:02 2002
On Fri, 19 Jul 2002, David McClurg wrote:
> In my simulation I enter dInternalStepIsland_x2() with nb=25 and this
> routine is taking a ton of stack space to where i get a stack
> overflow. I didn't think 25 bodies was too bad. Anyone have ideas
> for me? I'm running on an embedded system and I can't just keep
> increasing memory requirements.
Far as I can tell, the number of joints has just as much effect on memory
consumption than the number of bodies, so you have to take than into
account as well. There has been some talk of giving ODE a more flexible
memory manager, but as far as I know nobody has implemented that yet.
Are you desprate enough yet? :-) (Sorry, had to ask!)
Can you reduce the number of bodies in the simulation?
If you have a lot of box-plane contact, you could try using only one joint
per box... that will give you a 'boiling' effect when a box rests on a
plane but it should keep the system matrix from getting out of hand if
you've got situations where 25 boxes are resting on the ground, for
example. You'd get 25 box-plane joints rather than a max of 75 (plus
box-box joints in either case).
Hopefully someone else will have a better idea, but the only 'easy' answer
I can think of is to increase the stack size until you stop seeing
overflows. If you're totally out of stack, seems to me that you have a
hard problem.
--
Nate Waddoups
Redmond WA USA
http://www.natew.com