-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compensator assert killing the process #28
Comments
Weird! As seen in lines 108-112 of the Accumulator initialization: LIMO-Velo/src/Modules/Accumulator.cpp Lines 108 to 112 in 57f3205
It's supposed to initialize when enough IMU samples have been gathered - and then set Making the first IMU trivially older than the first State. Weird that it happens... And I don't think you delete IMU data anywhere... |
But upsample is called by the If I am not mistaken this piece of code ensures that the oldest state passed to the LIMO-Velo/src/Modules/Compensator.cpp Lines 36 to 49 in 57f3205
It fells like this assert should have the first inequality changed from LIMO-Velo/src/Modules/Compensator.cpp Lines 71 to 73 in 57f3205
|
Now I see that the LIMO-Velo/include/Headers/Accumulator.hpp Line 69 in 543d92e
So, in principle, states.front().time and imus.front().time should be the same - if the state has been derived from an IMU timestamp (which I think always happens). Weird that it crashed your code.
I would vote against changing the inequality and more in favor of just removing (?) the first part. The idea was actually that the IMU stream spanned the State stream because then we can get a continuous upsampling (no large chunk from first state to first IMU). It is more interesting to investigate why it's crashing the code. For now, commenting it doesn't seem to be dangerous. |
I have been converting this to ROS2 and noticed that the assert in the compensator upsample function was killing the process. Upon further investigation, I think this assert is a bug.
Line: https://github.com/Huguet57/LIMO-Velo/blob/main/src/Modules/Compensator.cpp#L72
As it says in the "path" function the states are between "just before t1 to t2" and the imus are between "first state to just after t2".
Then in the assert we check if
imus.front().time <= states.front().time
which should always throw an error since the oldest imu should not be older than the older state.I had to comment this line and then it works.
The text was updated successfully, but these errors were encountered: