-
Notifications
You must be signed in to change notification settings - Fork 798
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
std::out_of_range of FixedLagSmoother methods #1935
Comments
and I don't know how to output debug information like #1092 |
I just want to chip in and say that I am experiencing the same issue. Here is a minimal example to reprocude this problem. While my example above was created by piecing together parts of the preintegration and FixedLagSmoother examples respectively, it might be worth mentioning that the FixedLagSmoother example constructs a minimal problem where factors are only added up to the lag time, leaving open the question if there is any further logic that needs to be called after the smoothers window is "full"? Maybe the author of that example, @svwilliams knows more about that. Kind regards. |
I'm not sure about the original poster, but in the snippet shared by @RomanStadlhuber I think this may be simply a usage error. On line 52 and again on line 70, you have: nodeTimestamps[nodeCount] = tCurr; However, gtsam::Symbol x_n = X(nodeCount);
nodeTimestamps[x_n] = tCurr;
/// ...and so on for V and B I think the implicit cast from I believe what was happening in the gist was the following: since |
@keevindoherty thanks, I have tried as your recommend, but it does't work. |
@keevindoherty yes, many thanks!! I can confirm that was in fact it, So instead what I had done previously, and which was incorrect nodeTimestamps[nodeCount] = tCurr; I did it like in Kimeras VioBackend.cpp, Line 1163 // insert predicted state into graph nodes
nodes.insert(X(nodeCount), predState.pose());
nodes.insert(V(nodeCount), predState.v());
nodes.insert(B(nodeCount), currBias);
// need one key for each value (that is pose, velocity and bias separately)
for (auto const &val : nodes)
{
nodeTimestamps[val.key] = tCurr;
} And now my minimal preintegration example runs through to the end. Thank you and kind regards. |
@RomanStadlhuber Yes,it works for your example,thanks a lot. |
The optimization time is significantly increased: I am fusing lidar and imu, and the optimized fixed lag is set to 0.5 seconds. With the iteration of optimization, the time consumption of state estimation is gradually increasing. |
The IncrementalFixedLagSmoother mode has the situation where the time consumption increases, while the BatchFixedLagSmoother does not. |
@HeXu1 hard to tell where this might be coming from, but the Altenatively, you could play with the relinearization thresholds of iSAM2. But I suggest building a release build with debug info and attaching a profiler to it to see where most of the computational load is coming from. |
@RomanStadlhuber ok,thanks. I'm sure the problem comes from the function of “update”. |
Hi,
I have test BatchFixedLagSmoother and IncrementalFixedLagSmoother method to fuse imu and lidar data with gtsam::CombinedImuFactor and addExpressionFactor factors.
I have built the latest gtsam from source they all have bug when they start fixedlagsmooth,
the BatchFixedLagSmoother method output is:
terminate called after throwing an instance of 'std::out_of_range'
what(): map::at
and the IncrementalFixedLagSmoother method output is:
terminate called after throwing an instance of 'std::out_of_range'
what(): invalid key
hope for your reply, thanks.
The text was updated successfully, but these errors were encountered: