# [ODE] Re: ODE Digest, Vol 17, Issue 37

Daniel Marbach daniel.marbach at gmail.com
Sat Jan 29 13:01:45 MST 2005

```> I'm finding that I want to have
> my simulated joints move bodies to a desired position-as fast as
> possible-without overshooting(much)-using only the max force allowed
> to do it.  Thats what a real person does when he/she moves an arm to a
> desired spot, for instance.

That's exactly what a robot should do as well. The problem you're
describing is not specific to simulating animals, it's exactly the
same for robots.

>   In the servo model from the FAC if your 'gain' is to low, you're
> bodies move to slow,(like a robot)

my robots don't move too slow ;)

> but if you set it higher they
> overshoot the target back and forth before settling in the desired
> position. (which looks like your person is intoxicated or something)

indeed, if the gain is too low, movements are slow, if it is too high,
you overshoot - but if it is just right everything works fine! So you
should do more tests finding the right gain for your model.

> 2) The math requires knowing the "max force" you're allowed to use,
> and you can get this from the getparam(Fmax), but this is the force,
> not how much you can accelerate/decelerate factoring in Mass,
> rotational inertia, and whatever other forces are going on at the
> time.

But the max force IS "how much you can accelerate/decelerate factoring
in Mass, rotational inertia, and whatever other forces are going on at
the time"! Or am I understanding you wrong? Setting fmax of the joint
motor should work fine both for a simulated person (max force of the
muscles) and for robots (max force of the servo motor).

> 3) I run into a special case for: if you can get there in one
> timestep, you can overshoot in one step and then overshoot back then
> next step, and you get jitter.

Maybe you could decrease the gain if you're close to the final
position or apply some kind of damping? I don't have this problem
because my desired angles follow oscillatory trajectories, i.e. they
'keep moving'.

I have little time now, there was a thread on joint motor control
about 2-4 months ago, I think I gave my model (including code) there.

Greetings,

Daniel
```