[ODE] Question about a change in the source for
dJointSetAMotorAxis
Yotto Koga
ykoga at Softimage.com
Fri Apr 30 14:41:26 MST 2004
Thanks Russ,
BTW, do you have any tips on creating a new motor type? I've read the doc on new joint types but was wondering how to go about adding motors to it.
yotto
-----Original Message-----
From: Russ Smith [mailto:russ at q12.org]
Sent: Friday, April 30, 2004 11:35 AM
To: Yotto Koga
Cc: ode at q12.org
Subject: Re: [ODE] Question about a change in the source for
dJointSetAMotorAxis
> The new joint.cpp has the line of code
>
> // adjust rel to match the internal body order
> if (joint->node[1].body && rel==2) rel = 1;
this was part of a set of changes that permit the amotor to be connected
to just one body. now that you mention it, that does seem wrong.
i believe the correct line of code is:
if (!joint->node[1].body && rel==2) rel = 1;
hmmm, let me work this through ... the idea is that, if you're only
connected to one body (node[1].body==0) then 'rel' can not equal one of:
1 or 2 ('rel' is the body that an axis is relative to). the assertions
above this line of code will check that you have specified the correct
'rel' in this case. this line of code makes sure 'rel' is correct for
the internal body order ... the internal order is that the second body
is 0 if there is only one body. so: if there is no second body, make
sure rel refers to the first body. i *think* that's correct but others
might want to sanity check the reasoning.
i've checked in the fix.
russ.
--
Russell Smith
http://www.q12.org
More information about the ODE
mailing list