[ODE] Re: Virtual creatures (karl sims etc...)

Nate W coding at natew.com
Wed May 15 15:55:02 2002


On Wed, 15 May 2002, Martin C. Martin wrote:

> Nate W wrote:
> > 
> > On Wed, 15 May 2002, Martin C. Martin wrote:
> > 
> > I gather that the problem is caused by interpenetration, which in turn is
> > a result of the jittery 'behavior' of the creature?
> 
> Well, ODE does nothing to prevent interpenetration, so it's dependent on
> the velocities of the objects that are colliding.

That's my point. :-) If the objects in question (the creature's limbs) had
lower velocities, interpenetration wouldn't be such a problem.  One way to
reduce the velocities would be to apply a low-pass filter to the output of
the control system.  

If the brain thinks in terms of desired joint angles, only permit it to
'desire' a new angle that's within some range of the present angle.  Or,
if the 'brain' thinks in terms of joint velocities, rather than positions,
clamp or scale the outputs to a range that results in smooth motions.

I suppose another way to reduce jitter would be to reduce the joint's
FMax, but that would reduce the creature's ability to, say, lift itself
with the limb in question.  It's another parameter to play with, though.

> > then adjust the global ERP to 1.0
> 
> This makes the problem even worse: once interpenetration happens, the
> ERP controls how much energy you can get out of it in one time step.  

Right, but my approach would (hopefully) prevent the interpenetration from
happening to any significant degree in the first place.  

I have virtual creatures walking around in my app with ERP=1.0 and it
works just fine.  I designed their gaits by hand rather than by GA, but I
think the key thing is that mine don't try to move their limbs rapidly;
the control system aims for smooth movements in the first place.  When the
joints are driven to move at low velocities, interpenetration is
negligible, and there are no surprises.

http://www.packetgnomes.org/~nathan/video/Juice/juice_dihno_hop.mpg

> > Still, it seems to me like you're adding a lot of complexity to the
> > step/detect/constrain phase in hopes of solving a problem that ODE already
> > handles pretty well
>
> Compared to finding the proper representation for the brains, this
> should be easy.  Using ODE's constraint system to stop
> interpenetration before it starts seems more natural than allowing it
> to happen and then fixing it later.

Using a low-pass filter on the outputs of the behavior system to prevent
attempts at interpenetration seems (to me at least) even more natural.

On the other hand, ignore this message.  The wider variety of approaches
we take to this problem, the more interesting the results will be!

I have a few bugs to get out of my current feature set before I add
anything new, but this discussion has propelled the GA-optimized behavior
idea straight to the top of my "future feature" list. :-)

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com