ahrs icon indicating copy to clipboard operation
ahrs copied to clipboard

Tuple index out of Range - Complimentary filter

Open arich6211 opened this issue 2 years ago • 1 comments

I keep getting this tuple index out of range error for the complimentary filter. I am passing in data directly pulled from the MPU9250 sensor that I am using. Just curious what I am doing wrong. Screenshot 2022-04-05 113056

Screenshot 2022-04-05 113254

arich6211 avatar Apr 05 '22 16:04 arich6211

Hi, I cannot trace it back without the provided data. The only way I could reproduce it was passing an array with a single value or with None:

>>> np.array(1.0).shape[-1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: tuple index out of range
>>> np.array(None).shape[-1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: tuple index out of range
  • Does each array contain 3 values in it?
  • Are they being passed as an array?
  • Are there any None values?

It would be nice to check this, in order to better trace back the problem.

Mayitzin avatar Apr 08 '22 15:04 Mayitzin