python/gtsam/__init__.py
Go to the documentation of this file.
1 """Module definition file for GTSAM"""
2 
3 # pylint: disable=import-outside-toplevel, global-variable-not-assigned, possibly-unused-variable, import-error, import-self
4 
5 import sys
6 
7 from gtsam.utils import findExampleDataFile
8 
9 from gtsam import gtsam, utils
10 from gtsam.gtsam import *
11 
12 
15 KeyVector = list
16 # base
17 IndexPairSetMap = dict
18 IndexPairVector = list
19 # geometry
20 Point2Vector = list
21 Pose3Vector = list
22 Rot3Vector = list
23 Point2Pairs = list
24 Point3Pairs = list
25 Pose2Pairs = list
26 Pose3Pairs = list
27 # sfm
28 BinaryMeasurementsPoint3 = list
29 BinaryMeasurementsUnit3 = list
30 BinaryMeasurementsRot3 = list
31 KeyPairDoubleMap = dict
32 SfmTrack2dVector = list
33 SfmTracks = list
34 SfmCameras = list
35 SfmMeasurementVector = list
36 MatchIndicesMap = dict
37 KeypointsVector = list
38 # slam
39 BetweenFactorPose3s = list
40 BetweenFactorPose2s = list
41 
42 
44  """Class to provide backwards compatibility"""
45  def insert(self, key_value):
46  self[key_value[0]] = key_value[1]
47 
48 
49 
50 
51 
52 def _init():
53  """This function is to add shims for the long-gone Point2 and Point3 types"""
54 
55  import numpy as np
56 
57  global Point2 # export function
58 
59  def Point2(x=np.nan, y=np.nan):
60  """Shim for the deleted Point2 type."""
61  if isinstance(x, np.ndarray):
62  assert x.shape == (2, ), "Point2 takes 2-vector"
63  return x # "copy constructor"
64  return np.array([x, y], dtype=float)
65 
66  global Point3 # export function
67 
68  def Point3(x=np.nan, y=np.nan, z=np.nan):
69  """Shim for the deleted Point3 type."""
70  if isinstance(x, np.ndarray):
71  assert x.shape == (3, ), "Point3 takes 3-vector"
72  return x # "copy constructor"
73  return np.array([x, y, z], dtype=float)
74 
75  # for interactive debugging
76  if __name__ == "__main__":
77  # we want all definitions accessible
78  globals().update(locals())
79 
80 
81 _init()
gtsam._init
def _init()
Definition: python/gtsam/__init__.py:52
relicense.update
def update(text)
Definition: relicense.py:46
gtsam.FixedLagSmootherKeyTimestampMap
Definition: python/gtsam/__init__.py:43
gtsam::utils
Definition: kruskal-inl.h:31
dict
Definition: pytypes.h:2107
isinstance
bool isinstance(handle obj)
Definition: pytypes.h:842
gtsam
gtsam::Point2
Vector2 Point2
Definition: Point2.h:32
gtsam::Point3
Vector3 Point3
Definition: Point3.h:38
globals
dict globals()
Definition: pybind11.h:1372
gtsam.FixedLagSmootherKeyTimestampMap.insert
def insert(self, key_value)
Definition: python/gtsam/__init__.py:45


gtsam
Author(s):
autogenerated on Fri Nov 1 2024 03:31:51