Re: eurler angles
Gerald Iakobinyi Pich <[email protected]> Wed, 4 Aug 2004 11:02:32 +0200 (CEST)
| Newsgroups | gmane.comp.cybernetics.webot.contest |
|---|---|
| Message-ID | <[email protected]> |
A snapshot from my code.... regards nutrina --- joseoomartin <[email protected]> schrieb: --------------------------------- Hi all, can anybody help ? The euler angles does not work for me... i am using it in this manner : matrix = gps_get_matrix(gps); euler_vector= eulerAngles(matrix); phiX =euler_vector[0]; phiY =euler_vector[1]; phiZ =euler_vector[2]; tilt = (float)Math.sqrt(Math.pow(phiX,2) + Math.pow(phiZ,2)); System.out.println("Inclinacion "+tilt+ " Valor X: "+ phiX + " Valor Z: "+phiZ); But always including the robot on the floor, Tilt = 0 , phiX -0 , phiZ =0 , ... Why ??? Thanks.... Gladiator... Yahoo! Groups Sponsor ADVERTISEMENT --------------------------------- Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/webots-contest/ To unsubscribe from this group, send an email to: [email protected] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 100MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de ------------------------ Yahoo! Groups Sponsor --------------------~--> Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar. Now with Pop-Up Blocker. Get it for free! http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/pU_rlB/TM --------------------------------------------------------------------~-> Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/webots-contest/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
mail1.txt
(text/plain, 946 B)
nutrina.openGLMatrix = Controller.gps_get_matrix(nutrina.gps);
nutrina.argASin = -1D * (double)nutrina.openGLMatrix[9];
nutrina.eul = Controller.gps_euler(nutrina.openGLMatrix);
nutrina.angles[0] = (float)((double)(nutrina.eul[0] * 180F) / 3.1415926535897931D);
nutrina.angles[1] = (float)((double)(nutrina.eul[1] * 180F) / 3.1415926535897931D);
nutrina.angles[2] = (float)((double)(nutrina.eul[2] * 180F) / 3.1415926535897931D);
if(nutrina.angle[2] < -40F || nutrina.angles[2] > 40F)
{
nutrina.RoboDown = true;
nutrina.RoboDownOnSide = true;
} else
if(nutrina.angles[0] < -40F || nutrina.angles[0] > 40F)
{
nutrina.RoboDown = true;
nutrina.RoboDownBckd = !(nutrina.RoboDownFwd = nutrina.angles[0] > 0.0F);
if(nutrina.RoboDownFwd)
System.out.println("robo down forward");
else
System.out.println("robo down backward");
} else
{
nutrina.RoboDown = nutrina.RoboDownFwd = nutrina.RoboDownBckd = false;
}