[ODE] problems with amotor

Jason Mallios jmallios at cs.brown.edu
Mon May 9 13:01:08 MST 2005


The problem is the dot produces a positive for an acute angle and a
negative for an obtuse, so you can't necessarily tell which direction the
bodies are rotationally offset.

It depends what you want to do, but a double cross product can give you
axes with directional meaning.

On Mon, 9 May 2005 jnilson_99 at yahoo.com wrote:

>
> "or by
> crossing two such axes; one from each body (for two
> bodies)."
>
> do you have any sample code you could show to
> demonstrate how you're doing this?
>
> also, i thought only the dot product provided the
> angle between two vectors and the cross product
> creates a vector perpendicular to the two vectors
> (each axis of the two bodies being compared)?
>
> thanks,
>
> john
> --- Jon Watte <hplus-ode at mindcontrol.org> wrote:
> >
> > > Specifically, the manual seems to suggest you have
> > to calculate the axes
> > > angles yourself every time step.  Is that true?
> >
> > Yes, that is true. It's not all that hard, really --
> > you can usually pull
> > the axes out of the rotation matrix directly (for a
> > single body) or by
> > crossing two such axes; one from each body (for two
> > bodies).
> >
> > I've used Amotors in user mode to stabilize a
> > hovercraft, and it worked
> > OK. "OK" here means "according to documentation."
> >
> > Cheers,
> >
> > 			/ h+
> >
> >
> > _______________________________________________
> > ODE mailing list
> > ODE at q12.org
> > http://q12.org/mailman/listinfo/ode
> >
>


More information about the ODE mailing list