GTSAM tutorial custom factor clarification.

955 views
Skip to first unread message

vsre...@gmail.com

unread,
Mar 13, 2022, 11:41:39 AM3/13/22
to gtsam users
In the tutorial the Jacobian for the custom GPS factor is defined as

const Rot2& R = q.rotation();
 if (H) (*H) = (gtsam::Matrix(2, 3) << R.c(), -R.s(), 0.0,                                                                                                                                  R.s(),  R.c(), 0.0).finished();


However lower in the text it states that the Jacobian is

H=[100
      010]

Why is it not defined in the code as simply

const Rot2& R = q.rotation(); if (H) (*H) = (gtsam::Matrix(2, 3) << 1.0,0.0, 0.0,
                                                                                                                   0.0,1.0, 0.0).finished();


Dellaert, Frank

unread,
Mar 16, 2022, 9:59:30 AM3/16/22
to vsre...@gmail.com, gtsam users

The tutorial text is wrong. The reason is because the Jacobians are defined as in math.pdf and the manifold retractions are applied in the *local* coordinate frame. I am going to shift this tutorial to a different medium soon and clean up this mistake.

--
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/064111a2-7be3-4cd3-88de-9d47c5737b27n%40googlegroups.com.

Nicolas Perez

unread,
Mar 18, 2022, 11:11:53 AM3/18/22
to gtsam users
There is a similar discussion in another thread: https://groups.google.com/g/gtsam-users/c/p9-rmuMa-40

Dellaert, Frank

unread,
Mar 20, 2022, 1:40:50 PM3/20/22
to Nicolas Perez, gtsam users, Jiang, Fan

I fixed the docs in PR #1139 and also copied the explanation to
gtsam.org/tutorials/intro.html#magicparlabel-65484

Please let me know if you see any bugs in the text or code. I already saw one small typo,  which I will fix before I merge.

The python custom factor example is still wrong, and I'm counting on its author (Fan!) to fix it.

Best

Frank




From: gtsam...@googlegroups.com <gtsam...@googlegroups.com> on behalf of Nicolas Perez <nicolasa...@gmail.com>
Sent: Friday, March 18, 2022 11:11
To: gtsam users <gtsam...@googlegroups.com>
Subject: Re: [GTSAM] GTSAM tutorial custom factor clarification.
 

vsre...@gmail.com

unread,
Aug 8, 2022, 7:46:57 PM8/8/22
to gtsam users
Hmm I think there is a problem in the equations when explaining how the Jacobian came about. Second row last element of the exponential map should be delta_y not delta_x.
expMap3DOF.jpg
stateSelect3DOF.jpg
Reply all
Reply to author
Forward
0 new messages