First question!
In NearCallBack(void *data, dGeomID o1, dGeomID o2) ,I use next function to
get the Collision Number :
n = dCollide (o1,o2,N,&contact[0].geom,sizeof(dContact));
But: I think the contact point should be one point because wheel and ground
is flat ,why "n=2" when I debug it .
Second question!
I need find the wheel's ID to output the contactforce ,so I use the next
function to find body:
if (o1==wheel[0].geom && o2==ground||o2==wheel[0].geom && o1== ground).
But I can not entry this If ,because "O1" is not right ,and I use another
function to find the condition!
if (contact[i].geom.g1==wheel[0].geom && contact[i].geom.g2==
ground||contact[i].geom.g2==wheel[0].geom && contact[i].geom.g1== ground)
So why ?It should be use the first condition is OK !
Third question!
When I get the "contact_data->t1" ,I confused the struct from Ode's manual :
typedef struct dJointFeedback {
dVector3 f1; // force that joint applies to body 1
dVector3 t1; // torque that joint applies to body 1
dVector3 f2; // force that joint applies to body 2
dVector3 t2; // torque that joint applies to body 2
} dJointFeedback;
If it is an contact joint ,so Why f1<>f2 and t1<>t2?
furthermore , f1 is a dVector3 , so the force should be f1[0],f1[1],f1[2],
So how to get the force in contact pos Normal vector?
For example ,if Normal vector is P[0],P[1],P[2]
The force should be :P[0]*f1[0]+P[1]*f1[1]+P[2]*f1[2] ?
--
View this message in context: http://old.nabble.com/How-to-measure-and-output-the-contact-force-%21-tp29149498p29149498.html
Sent from the ODE mailing list archive at Nabble.com.
> View this message in context:http://old.nabble.com/How-to-measure-and-output-the-contact-force-%21...