Replies

  • can you clarify  
    is q0 q1 q2 q3 is w x y z of quat or x y z w. 

    my data is like this

    Sample acceleration data is
    -0.92 0.18 10.15
    -2.14 0.83 10.07
    -1.05 0.23 10.14 

    And sample quat data is (Not normalized)
    16363 201 754 -300
    16363 201 754 -273
    16364 201 753 -234

    what do mean by accel_x_scaled? And what should i do in my case



    Baris said:

    basicly convert your imu readings to quaternion  then

    gx, gy, gz represents gravity in x, y and z axis respectively

    gx = 2 * (q1 * q3 - q0 * q2);
    gy = 2 * (q0 * q1 + q2 * q3);
    gz = q0 * q0 - q1 * q1 - q2 * q2 + q3 * q3;

    the result of gx gy and gz will be unit vector

    then conver all your accelerometer results to g ex: assume your accelerometer reads z = 256 x = 0 y = 0  when its leveled so accel_z_scaled = 256/256 = 1g,  accel_x_scaled = 0/256 = 0g, accel_y_scaled= 0/256 = 0g  

    acc_x_wog = (accel_x_scaled - gx) * 9.8;

    acc_y_wog = (accel_y_scaled - gy) * 9.8;
    acc_z_wog = (accel_z_scaled - gz) * 9.8;

    will give you linear acceleration in each axis even in any attitude

    note: wog means: w/o gravity

    and sorry this is not in cosine matrix, I only know in quaternion

  • @Baris can you clarify  
    is q0 q1 q2 q3 is w x y z of quat or x y z w. 

    my data is like this

    Sample acceleration data is
    -0.92 0.18 10.15
    -2.14 0.83 10.07
    -1.05 0.23 10.14 

    And sample quat data is (Not normalized)
    16363 201 754 -300
    16363 201 754 -273
    16364 201 753 -234

    what do mean by accel_x_scaled? And what should i do in my case

  • basicly convert your imu readings to quaternion  then

    gx, gy, gz represents gravity in x, y and z axis respectively

    gx = 2 * (q1 * q3 - q0 * q2);
    gy = 2 * (q0 * q1 + q2 * q3);
    gz = q0 * q0 - q1 * q1 - q2 * q2 + q3 * q3;

    the result of gx gy and gz will be unit vector

    then conver all your accelerometer results to g ex: assume your accelerometer reads z = 256 x = 0 y = 0  when its leveled so accel_z_scaled = 256/256 = 1g,  accel_x_scaled = 0/256 = 0g, accel_y_scaled= 0/256 = 0g  

    acc_x_wog = (accel_x_scaled - gx) * 9.8;

    acc_y_wog = (accel_y_scaled - gy) * 9.8;
    acc_z_wog = (accel_z_scaled - gz) * 9.8;

    will give you linear acceleration in each axis even in any attitude

    note: wog means: w/o gravity

    and sorry this is not in cosine matrix, I only know in quaternion

This reply was deleted.

Activity

Gremsy liked Gremsy's profile
Mar 12
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
More…