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.

Values

Values is GTSAM’s heterogeneous, key-indexed container for nonlinear variable assignments. It stores typed manifold values while providing uniform insertion, update, retraction, and local-coordinate operations.

Open In Colab

Inserting values

Each key may appear once and has a fixed stored type. insert() rejects duplicate keys; use update() or insert_or_assign() when replacement is intended.

Typed retrieval and updates

Python exposes typed accessors such as atPose2(), atPoint2(), and atDouble(). exists() checks a key before retrieval, and erase() removes it.

Retraction and local coordinates

zeroVectors() creates a zero VectorValues tangent with the correct dimensions. To specify an increment, insert one tangent vector per key. retract(delta) applies it, while localCoordinates(other) computes the displacement between compatible containers.

Combining containers

insert(other_values) merges disjoint keys, swap() exchanges contents, and clear() removes everything. Container equality is manifold-aware through equals(); it is not just Python object identity.

Source

Values.h

AI assistance caveat

AI was used to help draft this documentation, and inaccuracies could be present.