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 import Cal3Bundler, PinholeCameraCal3Bundler, Point2, Point3, Pose3, Rot3, SfmTrack, Unit3
13 
14 from gtsam.utils.test_case import GtsamTestCase
15 
17  """Tests pickling on some of the classes."""
18 
20  obj = Cal3Bundler(fx=100, k1=0.1, k2=0.2, u0=100, v0=70)
22 
25  Pose3(Rot3.RzRyRx(0, 0.1, -0.05), Point3(1, 1, 0)),
26  Cal3Bundler(fx=100, k1=0.1, k2=0.2, u0=100, v0=70),
27  )
29 
31  obj = Rot3.RzRyRx(0, 0.05, 0.1)
33 
35  obj = Pose3(Rot3.Ypr(0.0, 1.0, 0.0), Point3(1, 1, 0))
37 
39  obj = SfmTrack(Point3(1, 1, 0))
40  obj.addMeasurement(0, Point2(-1, 5))
41  obj.addMeasurement(1, Point2(6, 2))
43 
45  obj = Unit3(Point3(1, 1, 0))
test_pickle.TestPickle.test_rot3_roundtrip
def test_rot3_roundtrip(self)
Definition: test_pickle.py:30
test_pickle.TestPickle.test_pose3_roundtrip
def test_pose3_roundtrip(self)
Definition: test_pickle.py:34
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:19
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:34
test_pickle.TestPickle.test_unit3_roundtrip
def test_unit3_roundtrip(self)
Definition: test_pickle.py:44
gtsam::utils.test_case.GtsamTestCase
Definition: test_case.py:15
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:23
test_pickle.TestPickle
Definition: test_pickle.py:16
test_pickle.TestPickle.test_sfmTrack_roundtrip
def test_sfmTrack_roundtrip(self)
Definition: test_pickle.py:38


gtsam
Author(s):
autogenerated on Tue Jun 25 2024 03:05:29