Prior factor of landmark

177 views
Skip to first unread message

Edward (Yue) You

unread,
Jan 16, 2020, 4:56:13 AM1/16/20
to gtsam users
Hi,
     when I looked into the examples, I found a prior factor is added to the first landmark. I understand why a prior is needed for the first pose, but as far as I'm concerned,  the landmarks are well constrained by the poses (asume every landmarks are observed by two or more poses). I tried in my own little demo to exclude the prior to the first landmark, isam2 failed immediately. I also tired to add a prior to the 2nd, not the 1st landmark, which led to failure as well. So when the priors are needed for landmarks and why?

Thank you!

BR
Edward

Frank Dellaert

unread,
Jan 16, 2020, 8:11:33 AM1/16/20
to Edward (Yue) You, gtsam users
SLAM and SFM are typically done with relative measurements, so they cannot say anything about where *on earth* the measurements were taken. Hence, the gradient in any direction that changes the position, orientation (and sometimes scale) will be zero, and the Hessian is singular. This is known in fancy terms as a “gauge freedom”.

--
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/717549cd-f94c-4263-8108-eb627319fc7c%40googlegroups.com.
--
Best !
Frank Dellaert
http://frank.dellaert.com

J Zhang

unread,
Nov 28, 2021, 7:53:51 PM11/28/21
to gtsam users
Hi Frank,

I am switching from ceres solver to gtsam and for the same problem with ceres solver I would just set the first pose and first landmark as constant. 
Gtsam `NonlinearEquality` behaves quite similarly with ceres solver constant parameters. 

What would be recommended method for this case (SFM)? Using prior factor or using NonlinearEquality factor?
From the PriorFacor code (and math), the prior factor will still evaluate residuals, which seems not to be necessary for this particular case? 

Thanks

J Zhang

unread,
Nov 28, 2021, 8:02:57 PM11/28/21
to gtsam users
I guess I do see some cases I might want to use PriorFactor instead of NonlinearEquality Factor.
For example, I want to perform a sliding window with a monocular camera and I somehow managed to get the depth information from other sensors such as LIDAR projection.
Since there is some uncertainty about the 3d landmark due to data association + LIDAR depth uncertainty, I might want to use a prior factor with some noise model instead of NonlinearEquality.

Does this sound right?

Thanks
Reply all
Reply to author
Forward
0 new messages