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.

LabeledSymbol

A LabeledSymbol is a specialized version of gtsam.Symbol designed primarily for multi-robot applications or scenarios where an additional label is needed besides the type character and index. It encodes a type character (unsigned char), a label character (unsigned char), and an index (uint64_t) into a single 64-bit gtsam.Key.

Open In Colab

Initialization

A LabeledSymbol can be created by providing a type character, a label character, and an index. It can also be created by decoding an existing gtsam.Key (integer).

LabeledSymbol from char/label/index: : xA7

LabeledSymbol from key 8646911284551352320: : x

Properties and Usage

You can access the type character, label character, index, and underlying integer key.

LabeledSymbol: : lB3

  Char (Type): 108
  Label (Robot): 66
  Index: 3
  Key: 7800797504559120387

Shorthand Function

GTSAM provides a convenient shorthand function gtsam.mrsymbol(c, label, j).

LabeledSymbol(ord('p'), ord('C'), 2).key() == gtsam.mrsymbol(ord('p'), ord('C'), 2): True