Gerald Iakobinyi Pich | 4 Aug 2004 11:02
Picon
Favicon

Re: eurler angles

A snapshot from   my code....

regards
nutrina

 --- joseoomartin <joseamartin <at> cantv.net> 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....
(Continue reading)

Marton Laszlo | 4 Aug 2004 11:51
Picon
Favicon

Re: eurler angles

Hi,

I think you did forgot to initialize the gps matrix.

On webost you need to initialize (swich on) every
device what you use.

You need to put an initialization code somewhere
before your infinite loop.

  gps_enable(gps,32);

in case of the gps martix.

public static void main() {
  ...
  gps_enable(gps,32);
  ...

  for(;;)
    { // The robot never dies!
      .....
      matrix=gps_get_matrix(gps); // OpenGL 4x4 matrix
      eul = gps_euler(matrix);
      szog[0] = (int) (eul[0]*180/Math.PI);
      szog[1] = (int) (eul[1]*180/Math.PI);
      szog[2] = (int) (eul[2]*180/Math.PI);
      .... // I use the angels in grades not radians
    }
}
(Continue reading)


Gmane