[ODE] On torque ..

Sergey Kurdakov k15c20 at zelmail.ru
Sat May 8 04:18:15 MST 2004


Hello again Sergey - but it is time to stop here :)

but to comment a little bit on what have been said.

> as for  quick reply  - as far as I remember - it is not OK to use Euler angles as difference as they are dependant..

but most probably this  ;) not concerns your problem.
rather :)
if you provide more details how you apply your difference with moment - then  it will be easier to point a error

as actually this

>So what I did is, I converted the two direction vectors into a
>spherical coordinate system (phi, theta), took the difference and
>used this as torque.

really could provide strange results


as for when I wrote

-------------
this then could be used for controller... I think for the beginnng you could set the following - compute desired quaternion vel with
some slow down at the end... - I would just develop a function 'desiredvel' which will use some heuristics to compute current
desired angular rotation ( quat vel) out of desired time and differences - then apply maybe just proportinal conroller with
feedback - such as your torque  is proportional to differense of desired vel and current vel... then if this works then you could
move to PID :)
-----------

  I meant ( though :) not sure that this will work streignt and will not require some more efforts to make it work the right way)
that  you need to have controller for each component of the moment and the desired vel.

maybe if it works for one component - then you could make the next step.

but again - in similar situation - I computed a desired speed with taking into account that I need approach the end point with
slowing down rotational spped and that I need to be in time - so there was a heuristic computation function - then I just
'controlled' over time that torque ( or  momentum ) I apply onto body and which  keeps the desired vel . so -  there was a
difference and there was generated desired torque in each time step.

Regards
Sergey Kurdakov

----- Original Message ----- 
From: "Sergey Kurdakov" <k15c20 at zelmail.ru>
To: <ode at q12.org>
Cc: <wenzel at schlund.de>
Sent: Saturday, May 08, 2004 3:52 AM
Subject: Re: [ODE] On torque ..


> Hello,
>
> actually it is deep night here :)  so hope  tomorrow my reply will have more sence :)
>
> as for  quick reply  - as far as I remember - it is not OK to use Euler angles as difference as they are dependant..
> but rather it is OK to use quaternions - no deatils now :) but  - at least that is why it is easier to make slerp of quaternions
in
> animation than interpolate angles....
>
> and  it is possible to get quaternion from one direction to another so then things  go better.
>
> so if to continue on susggestion with angular vel  instead of computing angular vel  you may use quaternion vel - how -
> maybe will wirte in more details tomorrow but
>
> see article how quaternions could be used  when a torque is applied here http://www.npsnet.org/~zyda/pubs/Presence.1.4.pdf eq
> 8.11.
>
> this then could be used for controller... I think for the beginnng you could set the following - compute desired quaternion vel
with
> some slow down at the end... - I would just develop a function 'desiredvel' which will use some heuristics to compute current
> desired angular rotation ( quat vel) out of desired time and differences - then apply maybe just proportinal conroller with
> feedback - such as your torque  is proportional to differense of desired vel and current vel... then if this works then you could
> move to PID :)
>
> again hope that tomorrow I have a better time to reply in details :)
>
> Regards
> Sergey
>
>
> ----- Original Message ----- 
> From: "Wenzel Jakob" <wenzel at schlund.de>
> To: <ode at q12.org>
> Sent: Saturday, May 08, 2004 3:25 AM
> Subject: Re: [ODE] On torque ..
>
>
> > Hello,
> >
> > thanks for your reply. I had a look at your links and altough I couldn't
> > make much of the russian article, I am now sure I need a PID controller
> > to smoothen out the movement. However, after hours of googling around, I
> > am still stuck with thiode at q12.orgs (probably very easy) math problem:
> >
> > I have two direction vectors. The first one is the current forward
> > vector, the second one is where I want the forward vector to be after
> > the torque has been applied and the object has rotated for some time.
> >
> > So what I did is, I converted the two direction vectors into a
> > spherical coordinate system (phi, theta), took the difference and
> > used this as torque. This led to very strange results, I tried
> > several different algorithms to convert between the coordinate systems
> > (I suspect this is the cause of error).
> >
> > Any ideas?
> >
> > Thanks in advance,
> > Wenzel Jakob
> >
> > > Hello Wenzel,
> > >
> > >> This function should return the torque which needs to be applied to
> > >> the body in order to rotate the coordinate system onto the new
> > >> forward vector in the given amount of time.
> > >
> > >
> > > there is an approach to get torque which performs desired rotation.
> > > this one I seen in russian here
> > >  http://www.gamedev.ru/articles/read.shtml?id=30127&page=1 but I do
> > > not
> > > think this will suite you as this one does not take time
> > > into account.
> > >
> > > another approach is to solve optimal problem of rotation of the body
> > > which is usually used in space applications 'optimizing' the applied
> > > torque. the 'optimal ' solution as a rule will consist of three stepts
> > > - the first  acceleration phase then free rotation phase then
> > > deaccelearation phase. But as you need not achive min  'applied over
> > > time' torque you might to make the following.
> > >
> > > to develop a controller which will output desired torque observing
> > > rotation of the given  body I suggest to get idea - to
> > > read an article here http://www.ntu.edu.sg/centre/sec/P0609.pdf
> > >
> > > and develop a   controller ( maybe be even proportional controller
> > > will suite but maybe you will prefer PID  or maybe fuzzy :)
> > > controller) which for example will keep constant angular vel.
> > >
> > > so from desired angular rotation and time you get desired angular
> > > rotation speed - then you pass it to controller which outputs
> > > controlling torque...
> > >
> > > I might tell  that from my experince to keep a desired angular
> > > rotation with a controller which outputs desired torque is not a prob.
> > >
> > > Regards
> > > Sergey Kurdakov
> >
> >
> >
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
>



More information about the ODE mailing list