You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All the methods apart from analytical have the position completely wrong despite getting the quaternion mostly right.
If I change the duration so that there's a stationary period after the movement then the results seem like a disaster. Even the analytical method starts making a mess of the position and the other methods are hopelessly wrong even about the quaternion.
The text was updated successfully, but these errors were encountered:
jonathanjfshaw
changed the title
Results of sensor fusion appear grossly inaccurate
Positions are very wrong
Dec 24, 2019
I've identified the bug. As part of the quaternion calculations self.acc gets vector normalized. But when calculating position, we need to use the original un-normalized acc; this is no longer stored on self.acc because of python's passing by reference.
If you modify my script above like this:
def test(q_type):
my_sensor = MyOwnSensor(in_data=copy.deepcopy(in_data), q_type=q_type,
calculate_position=True)
# reset the acc as it has now been overwritten by vector normalized acc
my_sensor.acc = imu['gia']
# Use the true quat not the estimated one, to isolate errors to the position calculations
my_sensor.quat = body['quat']
# redo the position calculations with the proper acc and true quat
my_sensor.calc_position()
print(q_type + " pos")
print(my_sensor.pos[-1])
I understand little about sensor fusion. But I made the following test script:
I get these results:
All the methods apart from analytical have the position completely wrong despite getting the quaternion mostly right.
If I change the duration so that there's a stationary period after the movement then the results seem like a disaster. Even the analytical method starts making a mess of the position and the other methods are hopelessly wrong even about the quaternion.
The text was updated successfully, but these errors were encountered: