A question about time costing of ISAM2

266 views
Skip to first unread message

huanhexiao

unread,
May 15, 2019, 11:20:06 PM5/15/19
to gtsam users
when i use ISAM2 to do a slam test( about 10 min, more 5000 images ), it gets slower as time steps.
i guess ISAM2 should update all states when it comes a new image, which results computing time increasing, is that correct?
 if so, what should i do to avoid a from-begining update everytime? 
Because i think the newer image has little affection on the begining states. Any advice please

Mike Sheffler

unread,
May 16, 2019, 5:46:49 AM5/16/19
to huanhexiao, gtsam users
> i guess ISAM2 should update all states when it comes a new image, which results computing time increasing, is that correct?

It depends on the structure of the problem.

"While iSAM2 is capable of constant-time updates when the new factors only affect the upper cliques of the Bayes tree, the inclusion of landmark states breaks this assumption, as the same landmark may be seen over many frames." (1)

If you're keeping your landmarks on the graph, it's certainly not going to get *faster* when you add more data. Depending on what you are trying to accomplish, you can maybe avoid explicitly handling landmarks on the graph by using "smart factors" (2). Generally speaking, it makes sense that larger problems usually take longer to solve; smart factors are one way to slow down the rate of growth in the solving time.

> if so, what should i do to avoid a from-begining update everytime?

"GTSAM can easily perform recursive estimation, where only a subset of the poses are kept in the factor graph, while the remaining poses are marginalized out. In all examples above we explicitly optimize for all variables using all available measurements, which is called Smoothing because the trajectory is “smoothed” out, and this is where GTSAM got its name (GT Smoothing and Mapping). When instead only the last few poses are kept in the graph, one speaks of Fixed-lag Smoothing. Finally, when only the single most recent poses is kept, one speaks of Filtering ..." (3)

In general, vision problems are difficult to solve with filtering because marginalization is immediate and the linearization point cannot be revisited. Smoothing really is a great approach for vision stuff because because the problems aren't linear, and smoothing *doesn't* marginalize, so the errors associated with bad linearlization points aren't compounded.

You can try fixed-lag smoothing (there are several examples for different ways to do fixed-lag smoothing in the GTSAM code). Depending on who you ask, it's either a good compromise between speed and correctness or a horrible bargain that combines the worst problems from smoothing and filtering.

Good luck!

Mike Sheffler

----------

(1) "Robust vision-aided navigation using Sliding-Window Factor graphs", Chiu, Han-Pang; Williams, Stephen; Dellaert, Frank; Samarasekera, Supun; Kumar, Rakesh; ICRA Proceedings 2013

(2) "Eliminating Conditionally Independent Sets in Factor Graphs: A Unifying Perspective Based on Smart Factors",
Carlone, Luca; Kira, Zsolt; Beall, Chris; Indelman, Vadim; Dellaert, Frank; ICRA Proceedings 2014

(3) "Factor Graphs and GTSAM : A Hands-on Introduction", Dellaert, Frank;  (just search for it)

--
You received this message because you are subscribed to the Google Groups "gtsam users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gtsam-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gtsam-users/d0ac0043-398c-4f53-b198-182c1f936b65%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

huanhexiao

unread,
May 23, 2019, 2:48:41 PM5/23/19
to gtsam users
Ok, thank u very much ,Mike.
i haven't used smart factor yet, i'll try it lately. Another question, i am using FixedLagISAM2 instead of ISAM2,  to decrease time costs , do u know the difference between FixedLagISAM2 and smart factor for the same structure of problem, such as time costs, precision ?
It's a little busy recenty, forgive my late reply.

在 2019年5月16日星期四 UTC+8下午5:46:49,Mike Sheffler写道:
To unsubscribe from this group and stop receiving emails from it, send an email to gtsam...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages