[ODE] On torque ..

Wenzel Jakob wenzel at schlund.de
Sat May 8 23:23:01 MST 2004


Sergey,

thank you very much for your advice. You are right, the
method I am using very much resembles the rotation of a satellite
in earth orbit. I have little to none oscillation with the method
you proposed.

Thanks again,
Wenzel

> Hello,
>
> :) OK I'm a bit late. But I started to think on your problem.
> just few lines here..
>
>> The following lines are what I currently have. This performs
>> the required rotation. If it is applied at each timestep, it
>> overshoots/oscillates a bit but finally settles at the center.
>
> actually here are some things to be done to make less oscillations -
> first instead of
>
>>     body:AddTorque(rotation)
>
> and getting eulers you might use following
>
>>     body:AddTorque(K*rotation)
>
> where K is a some coefficient
>
>  but you might notice that your major problem is
> that you mix rotations with rotation speed :) and anyway at the
> beginning  you have big torque at the end smaller torque - correct as
> the beginnign you have a big angle and small velocitty?
>
>
> this is what I suggest - instead of using rotation - compute desired
> speed of rotation as requestedSpeed
>  (requestedRotation )/timetoLeft
>
> comptute time to left  as for example requestedtimefor turn -timeelapsed
>
> as I mentined maybe as a second approach you might compute
> requestedSpeed with taking into account  if timeToleft is big - so you
> are at the beginning or small so you at the end and accordingly adjust
> requestedSpeed
>
> now you could compute torque basing on the difference of
>
> requestedSpeed-angularVelocity
>
>
> as rotation=K*(requestedSpeed-angularVelocity)
> then do as you did
>  body:AddTorque(rotation)
>
> you might try to adjust K in accordance to mass and moments of inertia
> of specific body.
>
> K might be less than 1 or greater.. but I think you will tune things...
>
> so ... if suggested things will work - OK if not hope I will appear with
> something new :) actually this procedure already includes feedback loop
> :)  - PID controller is not such a difficult thing to implement :)) but
> I will wait if suggested things work for you.
>
> Regards
> Sergey
>
>




More information about the ODE mailing list