Smart Projection Factors

211 views
Skip to first unread message

Harry

unread,
Sep 6, 2023, 9:25:20 AM9/6/23
to gtsam users
Hello,

This is a follow-up to my post here: https://groups.google.com/g/gtsam-users/c/CciNzw_PC8I

I did get GenericProjectionFactor to work with the changes I mentioned in that previous post. One user also mentioned trying smart projection factors as they seem to inherently handle those degenerate states, which I would like to try. However, looking at SmartProjectionPose3Factor (in the Python API) it looks like it is structured a bit differently than other factors. Please correct me if I am misunderstanding anything below.

It looks like SmartProjectionPose3Factor must contain all of the "projection factors" within the same factor object (so one Factor per landmark). This contrasts with the GenericProjectionFactor which allows users to create multiple factors (one Factor per pixel observation, and thus we can have multiple factors per landmark) associated with the same landmark. Is there a way to use smart projection factors (via the Python API) in the same style as the GenericProjectionFactors, where I can define the SmartProjectionPose3Factor per each observation, and just initialize each factor with the landmark ID that the factor 'belongs' to?

Thanks in advance!


Aryaman Patel

unread,
Sep 6, 2023, 1:37:24 PM9/6/23
to gtsam users
Actually I have a similar question. GenericProjection factors also allows to encode different measurement noise to a landmark which can be observed from different locations, which I found lacking in SmartFactors (one noise model per landmark), I don't understand the reasoning behind it tho.
To answer some part of your question, you can create a map between your landmark ids and the SmartFactor instances and once the landmark is seen add the measurements and observation ids to the respective landmark key.

A C++ example  - SmartStereoFactor
Reply all
Reply to author
Forward
0 new messages