Jacobian returned not correct

43 views
Skip to first unread message

Bharat Joshi

unread,
Apr 22, 2025, 11:53:14 PMApr 22
to gtsam users
I have a custom factor graph and I am trying to get the jacobian after optimization. My code is like this

  auto gaussian_linear_graph = factor_graph_->linearize(current_estimates_);
  gtsam::JacobianFactor jacobian_factor(*gaussian_linear_graph);

  auto [A, b] = jacobian_factor.jacobianUnweighted();

However, the jacobian i am getting looks always to be weighted by square root of information. Meaning I get different values based on noise parameters. 

Since I am getting unweighted jacobians, should they not be same irrespective of noise. 

What am I missing here?


Dellaert, Frank

unread,
Apr 23, 2025, 12:23:11 AMApr 23
to Bharat Joshi, gtsam users

The moment you linearize all the covariance information from the noise models is “baked in”. Noise models become nullptrs/unit.

 

From: gtsam...@googlegroups.com <gtsam...@googlegroups.com> on behalf of Bharat Joshi <joshib...@gmail.com>
Date: Tuesday, April 22, 2025 at 11:53
PM
To: gtsam users <gtsam...@googlegroups.com>
Subject: [GTSAM] Jacobian returned not correct

You don't often get email from joshib...@gmail.com. Learn why this is important

--
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 visit https://groups.google.com/d/msgid/gtsam-users/5ca323a2-a478-4ae4-83e5-91337679720fn%40googlegroups.com.

Bharat Joshi

unread,
Apr 23, 2025, 12:27:43 AMApr 23
to gtsam users
So, is there a way to extract the unweighted jacobians from the factor graph? I would prefer not to recompute them.  May be there is some clever way.

Bharat Joshi

unread,
Apr 23, 2025, 12:45:54 AMApr 23
to gtsam users
Or is it the case that when linearlize() is called it is recomputing error and jacobian at the linearization point. If that is the case, then I guess I could just compute the jacobian and error by calling evaluateError() on all factor.
Reply all
Reply to author
Forward
0 new messages