test_pickle.py
Go to the documentation of this file.
1 """
2 GTSAM Copyright 2010-2020, Georgia Tech Research Corporation,
3 Atlanta, Georgia 30332-0415
4 All Rights Reserved
5 
6 See LICENSE for the license information
7 
8 Unit tests to check pickling.
9 
10 Author: Ayush Baid
11 """
12 from gtsam.utils.test_case import GtsamTestCase
13 
14 from gtsam import (Cal3Bundler, PinholeCameraCal3Bundler, Point2, Point3,
15  Pose3, Rot3, SfmTrack, Unit3)
16 
17 
19  """Tests pickling on some of the classes."""
20 
22  obj = Cal3Bundler(fx=100, k1=0.1, k2=0.2, u0=100, v0=70)
24 
27  Pose3(Rot3.RzRyRx(0, 0.1, -0.05), Point3(1, 1, 0)),
28  Cal3Bundler(fx=100, k1=0.1, k2=0.2, u0=100, v0=70),
29  )
31 
33  obj = Rot3.RzRyRx(0, 0.05, 0.1)
35 
37  obj = Pose3(Rot3.Ypr(0.0, 1.0, 0.0), Point3(1, 1, 0))
39 
41  obj = SfmTrack(Point3(1, 1, 0))
42  obj.addMeasurement(0, Point2(-1, 5))
43  obj.addMeasurement(1, Point2(6, 2))
45 
47  obj = Unit3(Point3(1, 1, 0))
test_pickle.TestPickle.test_rot3_roundtrip
def test_rot3_roundtrip(self)
Definition: test_pickle.py:32
test_pickle.TestPickle.test_pose3_roundtrip
def test_pose3_roundtrip(self)
Definition: test_pickle.py:36
gtsam::SfmTrack
Definition: SfmTrack.h:125
gtsam::Pose3
Definition: Pose3.h:37
gtsam::PinholeCamera
Definition: PinholeCamera.h:33
test_pickle.TestPickle.test_cal3Bundler_roundtrip
def test_cal3Bundler_roundtrip(self)
Definition: test_pickle.py:21
gtsam::Cal3Bundler
Calibration used by Bundler.
Definition: Cal3Bundler.h:32
gtsam::utils.test_case
Definition: test_case.py:1
gtsam::Point2
Vector2 Point2
Definition: Point2.h:32
gtsam::utils.test_case.GtsamTestCase.assertEqualityOnPickleRoundtrip
None assertEqualityOnPickleRoundtrip(self, object obj, tol=1e-9)
Definition: test_case.py:35
test_pickle.TestPickle.test_unit3_roundtrip
def test_unit3_roundtrip(self)
Definition: test_pickle.py:46
gtsam::utils.test_case.GtsamTestCase
Definition: test_case.py:16
gtsam::Point3
Vector3 Point3
Definition: Point3.h:38
gtsam::Unit3
Represents a 3D point on a unit sphere.
Definition: Unit3.h:42
test_pickle.TestPickle.test_pinholeCameraCal3Bundler_roundtrip
def test_pinholeCameraCal3Bundler_roundtrip(self)
Definition: test_pickle.py:25
test_pickle.TestPickle
Definition: test_pickle.py:18
test_pickle.TestPickle.test_sfmTrack_roundtrip
def test_sfmTrack_roundtrip(self)
Definition: test_pickle.py:40


gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:15:58