[ODE] Disabling axis of rotations on a body

Bob Dowland Bob.Dowland at blue52.co.uk
Fri Jul 11 07:31:01 2003


Alex,

sorry for that last line I was just thinking aloud really - what I was saying was that it would be nice if poss to rig the inertia matrix so as to say allow angular accel only about a chosen axis. To get a general feel for how this relates to the physical imagine you have hold of a long pole made of some quite heavy stuff, start/stopping it spinning about its long axis of symmetry is much easier than about one of it's shortest axes. The inertia (tensor) matrix is the thing that (basically) describes/encodes this. So, for eg., if you had a cube which you wanted to spin naturally/physically about one axis whilst making sure that axis stayed vertical say, you could apply this  mathematical hackery to the cube's inertia tensor and this would be like sticking an infinitely long heavy pole through it's centre of mass.

Hope that's a bit clearer, at least in principle.

Bob.

> -----Original Message-----
> From: Alex Hetu [mailto:alexhetu@videotron.ca]
> Sent: 24 February 2003 22:52
> To: Bob Dowland; ode@q12.org
> Subject: RE: [ODE] Disabling axis of rotations on a body
> 
> 
> Although your last sentence looked like alien language to me, 
> i think you're
> basically suggesting a solid way to disable torque on certain 
> axis, am i
> right? (sorry i'm not really good with maths). I agree that 
> "correcting" the
> thing manually isn't good enough. In fact, it's an horrible 
> way of doing it.
> It doesn't really work well for what i'm trying to do anyway; 
> a box with a
> minimum of friction will kinda shakes (not much, but just enough to be
> noticed) when pushes on a floor.
> 
> I'll try the amotor trick Martin C.Martin suggested... if i 
> can figure out
> how to properly set up a amotor joint first.. |:)
> 
> Anybody with some code sample out there?
> 
> thx
> 
> 
> 
> -----Original Message-----
> From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf Of Bob
> Dowland
> Sent: Thursday, July 10, 2003 5:40 AM
> To: ode@q12.org
> Subject: RE: [ODE] Disabling axis of rotations on a body
> 
> 
> > If you truly want to disable an axis of rotation you should
> > just manually
> > set it after each step. For car wheels its important that
> > they are always in
> > the right rotation, and i found no way other than forcing the
> > rotation to be
> > correct.
> 
> My goodness! (No offence to Alex) I can see this working okay 
> in the case of
> wheels but in general it would be a shame if this were the 
> only way to go.
> In particular in a situ where it is possible to have a number of
> interactions between objects (dynamic and static) "manually 
> correcting"
> things can be very dangerous, often leading to (at best) unphysical
> behaviour and (at worst) producing states that the 
> integrators etc end up
> throwing up on.
> 
> I'm not sure if this is possible in ODE so sorry if this is a 
> completely
> silly suggestion but... in some systems it is possible to make dynamic
> objects behave like static or kinematic objects (ie 
> non-physically animated)
> by just giving them infinite mass (particularly easy when 
> systems store
> reciprocal mass rather than mass itself). ie, in the linear case,
> (translational motion) where F/m = a, making 1/m = 0 produces 
> a = 0. I'm
> wondering whether a similar effect for torques could be got 
> by setting the
> appropriate coefficent of the rest-frame inertia matrix 
> (which is hopefully
> diagonal) so that it's inverse say "inv_I" is essentially 
> zero about the
> required axis, then wdot = inv_I.Ldot giving kth coord of wdot = zero
> whenever kkth coordinate of inv_I is zero.
> 
> Just a thought... :)
> 
> 
> > -----Original Message-----
> > From: Alex Hetu [mailto:alexhetu@videotron.ca]
> > Sent: 23 July 2003 20:54
> > To: Erwin de Vries; ode@q12.org
> > Subject: RE: [ODE] Disabling axis of rotations on a body
> >
> >
> > Hm. yes i was thinking about doing that, I guess it would 
> also require
> > reseting the torque too.... it's not hard obviously, and i
> > guess that's what
> > i'll use for now, but it sure ain't clean. :)
> >
> > Martin C.Martin suggested adding code to allow a AMotor joint
> > to support the
> > static environment as body2. It's a very good idea i think.
> > But i wish ODE
> > would provide a simple joint to do that though, or maybe just some
> > parameters that could be set on the body maybe.
> >
> > Thx guys
> >
> >
> > -----Original Message-----
> > From: ode-admin@q12.org [mailto:ode-admin@q12.org]On Behalf
> > Of Erwin de
> > Vries
> > Sent: Wednesday, July 09, 2003 3:18 PM
> > To: ode@q12.org
> > Subject: Re: [ODE] Disabling axis of rotations on a body
> >
> >
> > If you truly want to disable an axis of rotation you should
> > just manually
> > set it after each step. For car wheels its important that
> > they are always in
> > the right rotation, and i found no way other than forcing the
> > rotation to be
> > correct.
> >
> > Erwin
> >
> > ----- Original Message -----
> > From: "Alex Hetu" <alexhetu@videotron.ca>
> > To: <ode@q12.org>
> > Sent: Wednesday, July 23, 2003 20:47
> > Subject: [ODE] Disabling axis of rotations on a body
> >
> >
> > > Hi,
> > >
> > > I'd like to know if it is possible to disable certain axis
> > of rotation on
> > a
> > > body and still move it around in the world and make it
> > collide with other
> > > bodies without ever rotating around those disabled axis
> > (ex: a tall box or
> > > cylinder that can only rotate on itself around the Y-axis
> > and which can
> > > never fall on its sides...). Or maybe it could be possible
> > to actually
> > > disable all rotations of a body?
> > >
> > > I looked for joints or constraints, but joints don't 
> really apply on
> > single
> > > bodies... and i wish to find a CLEAN solution. Am I missing
> > something?
> > >
> > > thx!
> > > Alex Hetu
> > >
> > > _______________________________________________
> > > ODE mailing list
> > > ODE@q12.org
> > > http://q12.org/mailman/listinfo/ode
> > >
> > >
> >
> > _______________________________________________
> > ODE mailing list
> > ODE@q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> > _______________________________________________
> > ODE mailing list
> > ODE@q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> 
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode
> 
>