Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

HybridNonlinearISAM

Open In Colab

HybridNonlinearISAM provides an interface for performing incremental nonlinear optimization for hybrid systems using ISAM (Incremental Smoothing and Mapping). It manages an underlying HybridGaussianISAM object and handles the relinearization process.

Key concepts:

  • Maintains a full nonlinear factor graph (HybridNonlinearFactorGraph) of all factors added so far.

  • Keeps track of the current linearization point (Values) and discrete assignment (DiscreteValues).

  • Uses an internal HybridGaussianISAM object to store the incrementally updated linearized representation (HybridBayesTree).

  • The update method linearizes new nonlinear factors, incorporates them into the HybridGaussianISAM, and updates the estimate.

  • Periodically (controlled by reorderInterval), it can perform a full relinearization and reordering of the underlying HybridGaussianISAM to maintain accuracy and efficiency.

Initialization

Initialized HybridNonlinearISAM with reorderInterval=0

Incremental Updates

The update method takes new factors (HybridNonlinearFactorGraph) and initial estimates (Values) for any new variables introduced in those factors.

--- Update 0 ---
ISAM state after update 0:
 Current Lin Point Size: 1
 Current Estimate 0:
Values with 1 values:
Value x0: (gtsam::Pose2)
(0, 1.73472e-18, -7.77621e-19)


--- Update 1 ---
ISAM state after update 1:
 Current Lin Point Size: 2
 Current Estimate 1:
Values with 2 values:
Value x0: (gtsam::Pose2)
(8.67362e-18, -1.73472e-18, 9.57103e-19)

Value x1: (gtsam::Pose2)
(1.00005, -6.64995e-07, -7.77621e-19)

Accessing State and Estimates

After updates, you can retrieve the current estimate, the linearization point, the underlying Bayes tree, and the accumulated factors.


Final Estimate:
Values with 2 values:
Value x0: (gtsam::Pose2)
(8.67362e-18, -1.73472e-18, 9.57103e-19)

Value x1: (gtsam::Pose2)
(1.00005, -6.64995e-07, -7.77621e-19)


Current Linearization Point (Values):
Values with 2 values:
Value x0: (gtsam::Pose2)
(0.01, 0.01, 0.01)

Value x1: (gtsam::Pose2)
(1, 9.57103e-19, -7.77621e-19)


Current Discrete Assignment:
DiscreteValues{7205759403792793600: 0}

Underlying HybridGaussianISAM (HybridBayesTree):
Loading...

Relinearization and Reordering

If reorderInterval is greater than 0, ISAM automatically triggers relinearization and reordering periodically. You can also trigger it manually.


Manually triggering relinearize...
Manual relinearization might be implicit or handled by ISAM2 patterns.
Typically happens during update() if counters trigger.
Reorder Counter: 0
Reorder Interval: 0