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
I am trying to calculate accel and gyro noise and random walk for Intel realsense. I quickly generated imu csv in the format specified here using custom CPP script for just 3 seconds. I wanted to check if it will work or not before recording 20 hours of IMU data.
I created allan variance config file imu_confog.yaml:
imu_topic: "/imu0"
imu_rate: 346
measure_rate: 346 # since bag contains 830 messages / 2.4 seconds = 345.8333 approx 346
sequence_time: 3 # since bag contains 2.4 seconds worth of data
root@e9408da6622e:/catkin_ws# rosrun allan_variance_ros analysis.py --data /data/data/imu_data/allan_variance.csv --config /data/data/allan_variance/imu_config.yaml
/catkin_ws/src/allan_variance_ros/scripts/analysis.py:23: RuntimeWarning: divide by zero encountered in log
logy = np.log(y)
Traceback (most recent call last):
File "/catkin_ws/src/allan_variance_ros/scripts/analysis.py", line 101, in <module>
accel_wn_intercept_x, xfit_wn = get_intercept(period[0:white_noise_break_point], acceleration[0:white_noise_break_point,0], -0.5, 1.0)
File "/catkin_ws/src/allan_variance_ros/scripts/analysis.py", line 24, in get_intercept
coeffs, _ = curve_fit(line_func, logx, logy, bounds=([m, -np.inf], [m + 0.001, np.inf]))
File "/usr/lib/python3/dist-packages/scipy/optimize/minpack.py", line 708, in curve_fit
ydata = np.asarray_chkfinite(ydata, float)
File "/usr/lib/python3/dist-packages/numpy/lib/function_base.py", line 495, in asarray_chkfinite
raise ValueError(
ValueError: array must not contain infs or NaNs
But as you can see it is giving error array must not contain infs or NaNs. Turns out there are some NaNs in allan_variance.csv file generated. What I am doing wrong here?
I have uploaded all bags and csv file on drive here.
The text was updated successfully, but these errors were encountered:
I guess capturing very tiny amount of data doesnt work. I tried capturing few seconds of data (for quickly checking if the whole pipeline will eventually work or not), even though doc says that we must record at least 1 hour of data, preferably at least 3 hours of data. I recorded data for 21 hours and it worked. Still I will like someone confirm that we should indeed get ValueError: array must not contain infs or NaNs error when working with small amount of data.
I cannot explain what is wrong with small amount of data, but I have myself run into this issue with a 65s dataset, and solved it by recording for 3 hours. Checking into allan_variance.csv, I see that it indeed contained NaN values for the small dataset. Probably some statistics can only be calculated when enough data is gathered.
I am trying to calculate accel and gyro noise and random walk for Intel realsense. I quickly generated imu csv in the format specified here using custom CPP script for just 3 seconds. I wanted to check if it will work or not before recording 20 hours of IMU data.
I created ros bag from csv by running:
Checking the bag created:
Then I converted it to allan variance compliant bag by running:
Checking the bag created:
I created allan variance config file imu_confog.yaml:
(I also tried with both rates 400, no luck.)
Here is how my data folder looks like:
Then I run allan variance:
And finally run Analyse.py:
But as you can see it is giving error
array must not contain infs or NaNs
. Turns out there are some NaNs in allan_variance.csv file generated. What I am doing wrong here?I have uploaded all bags and csv file on drive here.
The text was updated successfully, but these errors were encountered: