IMU Data shows that the beacon it's rotating

Frequent questions asked online, offline, in forums are answered here
Cataclismo
Posts: 1
Joined: Thu Apr 04, 2019 8:14 pm

IMU Data shows that the beacon it's rotating

Postby Cataclismo » Thu Apr 04, 2019 8:25 pm

So, I am trying to read IMU fused data, but when I am printing the angle it shows that it's rotating, even if the beacon is still. The values go from -3.14 to 3.14 continuously. Also, the beacon position in the IMU fused data is very, very noisy, which I guess it's because of the same reason.

This is how I convert from quaternions to radians:

Code: Select all

Eigen::VectorXf q(4);
q << m_imu->qw,
    m_imu->qx,
    m_imu->qy,
    m_imu->qz;

// normalize the quaternion
q /= q.norm();

// calculate Yaw
return atan2(
    2.F * (q(1) * q(2) + q(3) * q(0)),
    1.F - 2.F * (q(2) * q(2) + q(3) * q(3)));


I guess, even if I mistook something in the formula, it should not oscilate between [-3.14; 3.14] since it was not moving at all.

As settings, I have:
(Interfaces)
IMU Mode: High performance
Raw inertial sensor data: enabled
Processed IMU data: enabled
(IMU via modem)
Output mode: IMU fusion data
IMU fusion location: enabled
IMU fusion quaternion: enabled

Also, at some point, it froze. Like, it was always returning the same angle. After I restarted the beacon, started oscillating again. I can't guarantee it wasn't a connection problem to the serial port...
Anyway, if you have any idea, please let me know! Thanks.

smoker77
Posts: 228
Joined: Sat Feb 06, 2016 4:03 pm

Re: IMU Data shows that the beacon it's rotating

Postby smoker77 » Wed Apr 17, 2019 2:35 pm

Hello,

It seems your situation is caused by gyroscope drift.
Gyroscope can report some small none-zero angular speed by one or all 3 axes X, Y, Z even if the beacon is not rotating.
This drift should be eliminated in software.
To eliminate it inside mobile beacon, select mobile beacon in dashboard and press 'Zero IMU' button in right bottom corner.


Return to “FAQ”

Who is online

Users browsing this forum: No registered users and 3 guests