Matlab toolbox testSerialization fails

Issue #398 closed
Callum Robinson created an issue

As mentioned in Issue #397, the matlab serialization test fails.

(Built develop 34cdd4f on Ubuntu 18.04.1 LTS (bionic) with Matlab2018b.)

The values serialization part of the test can be solved by adding GenericValue to gtsam.h:

#include <gtsam/base/GenericValue.h>
template<T = {Vector, gtsam::Point2, gtsam::Point3, gtsam::Pose2, gtsam::Pose3}>
virtual class GenericValue : gtsam::Value {
  void serializable() const;
};

But to fix the graph serialization part of the test, the BearingRangeFactor serialization code needs to be written. It looks like this might be a known issue as it is already commented in the test:

% BearingRange Factors - FAIL: unregistered class
degrees = pi/180;
brNoise = noiseModel.Diagonal.Sigmas([0.1; 0.2]);
graph.add(BearingRangeFactor2D(i1, j1, Rot2(45*degrees), sqrt(4+4), brNoise));
graph.add(BearingRangeFactor2D(i2, j1, Rot2(90*degrees), 2, brNoise));
graph.add(BearingRangeFactor2D(i3, j2, Rot2(90*degrees), 2, brNoise));

Comments (20)

  1. Mike Sheffler

    I tried adding GenericValue to gtsam.h before and the problem I had was that I couldn't serialize (in MATLAB) gtsam.Values when there was more than one item in the values container. I think it's the difference between having a (for instance) GenericValue<Pose2> and a map of GenericValue<Pose2>. I was also doing the template<T = {Vector, gtsam::Point2, gtsam::Point3, gtsam::Pose2, gtsam::Pose3}> to get the MATLAB-friendly typedef statements set up.

    In gtsam/nonlinear/Values.h, we see

    typedef boost::ptr_map<
            Key,
            Value,
            std::less<Key>,
            ValueCloneAllocator,
            boost::fast_pool_allocator<std::pair<const Key, void*> > > KeyValueMap;
    

    and

    KeyValueMap values_;

    and I think we need to make the boost serialization stuff happy about dealing with KeyValueMap. Last time I looked at it, I had to turn my attention to something else, but it would be nice to get it fixed.

    Can you check to see if you can add multiple items to gtsam.Values (for instance, a Pose2 and two Point2s) and see if you can still serialize with your fix? If you can, can you try serializing a similar instance of gtsam::Values in C++ and try to deserialize it in MATLAB?

    I saw your other issues (thanks for submitting!). I just put in a pull request that I think will get the HEAD of develop building with both the MATLAB toolbox and unstable enabled. If that PR gets accepted, I'd like you to try #395, #396, #397 and this issue again against the HEAD of develop to see where we are.

  2. Callum Robinson reporter

    Thanks for the reply. I am way from my desk for a few days but will give this a go once I am back.

  3. Mike Sheffler

    @crown_crobinso A fix just went in for the HEAD of develop. When you have time, please pull and let's see where you are with this and the other issues. Thanks!

  4. Callum Robinson reporter

    @mikesheffler I have built HEAD of develop. With the matlab toolbox disabled it builds correctly, however testConcurrentIncrementalFilter fails:

            Start 200: testConcurrentIncrementalFilter
    200/230 Test #200: testConcurrentIncrementalFilter ........***Failed    0.00 sec
    Not equal:
    expected:
    Values with 2 values:
    Value 3: (N5gtsam5Pose3E) R:
    [
         0.0688475   0.997523 -0.0144056;
             -0.973888  0.0640709    -0.2178;
             -0.216338  0.0290244   0.975887
      ]
    [1.85516, -1.13164, 0.281898]';
    Value 4: (N5gtsam5Pose3E) R:
    [
          -0.61921   0.773488  -0.135258;
             -0.729781  -0.630464  -0.264451;
             -0.289825 -0.0650426   0.954867
      ]
    [1.74411, -2.45635, 0.241236]';
    actual:
    Values with 2 values:
    Value 3: (N5gtsam5Pose3E) R:
    [
        -0.228457  0.953607 -0.196062;
            -0.889242 -0.286376 -0.356705;
            -0.396304 0.0928549  0.913412
      ]
    [2.00029, -2.32672, 0.18745]';
    Value 4: (N5gtsam5Pose3E) R:
    [
        -0.835982  0.411466 -0.363083;
            -0.324894 -0.904339 -0.276794;
            -0.442241 -0.113431  0.889694
      ]
    [1.03001, -3.41891, -0.177638]';
    /home/crobinso/projects/gtsam-gtborg/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalFilter.cpp:554: Failure: "assert_equal(expectedValues, actualValues, 1e-12)" 
    Not equal:
    expected:
    Values with 1 values:
    Value 3: (N5gtsam5Pose3E) R:
    [
         0.533824  0.845011 0.0314304;
            -0.829427  0.530489 -0.175021;
            -0.164568  0.067361  0.984063
      ]
    [1.60673, -0.838999, 0.259172]';
    actual:
    Values with 1 values:
    Value 3: (N5gtsam5Pose3E) R:
    [
        -0.228457  0.953607 -0.196062;
            -0.889242 -0.286376 -0.356705;
            -0.396304 0.0928549  0.913412
      ]
    [2.00029, -2.32672, 0.18745]';
    /home/crobinso/projects/gtsam-gtborg/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalFilter.cpp:1043: Failure: "assert_equal(expectedFilterSeparatorValues2, actualFilterSeparatorValues2, 1e-6)" 
    Not equal:
    expected:
    Values with 4 values:
    Value 1: (N5gtsam5Pose3E) R:
    [
                   1  2.37007e-16 -4.33681e-17;
            -2.02095e-16            1 -1.80411e-16;
             4.51028e-17  1.84748e-16            1
      ]
    [-1.11022e-16, 1.38778e-17, -5.55112e-17]';
    Value 2: (N5gtsam5Pose3E) R:
    [
         0.729461  0.682997 0.0374457;
            -0.676466  0.728435 -0.108514;
            -0.101392 0.0538262  0.993389
      ]
    [1.10578, -0.176194, 0.176412]';
    Value 3: (N5gtsam5Pose3E) R:
    [
         0.0688475   0.997523 -0.0144056;
             -0.973888  0.0640709    -0.2178;
             -0.216338  0.0290244   0.975887
      ]
    [1.85516, -1.13164, 0.281898]';
    Value 4: (N5gtsam5Pose3E) R:
    [
          -0.61921   0.773488  -0.135258;
             -0.729781  -0.630464  -0.264451;
             -0.289825 -0.0650426   0.954867
      ]
    [1.74411, -2.45635, 0.241236]';
    actual:
    Values with 4 values:
    Value 1: (N5gtsam5Pose3E) R:
    [
          0.994805   0.101321 0.00983263;
            -0.0998135   0.989834  -0.101321;
            -0.0199987  0.0998135   0.994805
      ]
    [0.5, -0.05, 0.2]';
    Value 2: (N5gtsam5Pose3E) R:
    [
          0.575027   0.817493 -0.0323996;
              -0.79046   0.544926  -0.279694;
             -0.210993   0.186442   0.959542
      ]
    [1.76755, -0.848289, 0.353801]';
    Value 3: (N5gtsam5Pose3E) R:
    [
        -0.228457  0.953607 -0.196062;
            -0.889242 -0.286376 -0.356705;
            -0.396304 0.0928549  0.913412
      ]
    [2.00029, -2.32672, 0.18745]';
    Value 4: (N5gtsam5Pose3E) R:
    [
        -0.835982  0.411466 -0.363083;
            -0.324894 -0.904339 -0.276794;
            -0.442241 -0.113431  0.889694
      ]
    [1.03001, -3.41891, -0.177638]';
    /home/crobinso/projects/gtsam-gtborg/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalFilter.cpp:1414: Failure: "assert_equal(expectedValues, actualValues, 1e-6)" 
    There were 3 failures
    
    99% tests passed, 1 tests failed out of 230
    
    Total Test time (real) =   3.32 sec
    
    The following tests FAILED:
        200 - testConcurrentIncrementalFilter (Failed)
    Errors while running CTest
    CMakeFiles/check.dir/build.make:57: recipe for target 'CMakeFiles/check' failed
    make[3]: *** [CMakeFiles/check] Error 8
    CMakeFiles/Makefile2:635: recipe for target 'CMakeFiles/check.dir/all' failed
    make[2]: *** [CMakeFiles/check.dir/all] Error 2
    CMakeFiles/Makefile2:642: recipe for target 'CMakeFiles/check.dir/rule' failed
    make[1]: *** [CMakeFiles/check.dir/rule] Error 2
    Makefile:223: recipe for target 'check' failed
    make: *** [check] Error 2
    

    With the matlab toolbox enabled, it still builds correctly, but lots of test fail:

    Test project /home/crobinso/projects/gtsam-gtborg/build
            Start   1: testArgument
      1/230 Test   #1: testArgument ...........................   Passed    0.00 sec
            Start   2: testClass
      2/230 Test   #2: testClass ..............................   Passed    0.00 sec
            Start   3: testGlobalFunction
      3/230 Test   #3: testGlobalFunction .....................   Passed    0.00 sec
            Start   4: testMethod
      4/230 Test   #4: testMethod .............................   Passed    0.00 sec
            Start   5: testReturnValue
      5/230 Test   #5: testReturnValue ........................   Passed    0.00 sec
            Start   6: testSpirit
      6/230 Test   #6: testSpirit .............................   Passed    0.00 sec
            Start   7: testTemplate
      7/230 Test   #7: testTemplate ...........................   Passed    0.00 sec
            Start   8: testType
      8/230 Test   #8: testType ...............................   Passed    0.00 sec
            Start   9: testWrap
      9/230 Test   #9: testWrap ...............................   Passed    0.01 sec
            Start  10: testCholesky
     10/230 Test  #10: testCholesky ...........................   Passed    0.02 sec
            Start  11: testDSFVector
     11/230 Test  #11: testDSFVector ..........................   Passed    0.00 sec
            Start  12: testDebug
     12/230 Test  #12: testDebug ..............................   Passed    0.00 sec
            Start  13: testFastContainers
     13/230 Test  #13: testFastContainers .....................   Passed    0.00 sec
            Start  14: testGroup
     14/230 Test  #14: testGroup ..............................   Passed    0.00 sec
            Start  15: testLieMatrix
     15/230 Test  #15: testLieMatrix ..........................   Passed    0.00 sec
            Start  16: testLieScalar
     16/230 Test  #16: testLieScalar ..........................   Passed    0.00 sec
            Start  17: testLieVector
     17/230 Test  #17: testLieVector ..........................   Passed    0.00 sec
            Start  18: testMatrix
     18/230 Test  #18: testMatrix .............................   Passed    0.00 sec
            Start  19: testNumericalDerivative
     19/230 Test  #19: testNumericalDerivative ................   Passed    0.00 sec
            Start  20: testOptionalJacobian
     20/230 Test  #20: testOptionalJacobian ...................   Passed    0.00 sec
            Start  21: testSerializationBase
     21/230 Test  #21: testSerializationBase ..................   Passed    0.00 sec
            Start  22: testSymmetricBlockMatrix
     22/230 Test  #22: testSymmetricBlockMatrix ...............   Passed    0.00 sec
            Start  23: testTestableAssertions
     23/230 Test  #23: testTestableAssertions .................   Passed    0.00 sec
            Start  24: testTreeTraversal
     24/230 Test  #24: testTreeTraversal ......................   Passed    0.00 sec
            Start  25: testVector
     25/230 Test  #25: testVector .............................   Passed    0.00 sec
            Start  26: testVerticalBlockMatrix
     26/230 Test  #26: testVerticalBlockMatrix ................   Passed    0.00 sec
            Start  27: testBearingRange
     27/230 Test  #27: testBearingRange .......................   Passed    0.00 sec
            Start  28: testCal3Bundler
     28/230 Test  #28: testCal3Bundler ........................   Passed    0.00 sec
            Start  29: testCal3DS2
     29/230 Test  #29: testCal3DS2 ............................   Passed    0.00 sec
            Start  30: testCal3Unified
     30/230 Test  #30: testCal3Unified ........................   Passed    0.00 sec
            Start  31: testCal3_S2
     31/230 Test  #31: testCal3_S2 ............................   Passed    0.00 sec
            Start  32: testCalibratedCamera
     32/230 Test  #32: testCalibratedCamera ...................   Passed    0.00 sec
            Start  33: testCameraSet
     33/230 Test  #33: testCameraSet ..........................   Passed    0.00 sec
            Start  34: testCyclic
     34/230 Test  #34: testCyclic .............................   Passed    0.00 sec
            Start  35: testEssentialMatrix
     35/230 Test  #35: testEssentialMatrix ....................***Failed    0.00 sec
    Not equal:
    expected:
    R:
    [
                  1 6.12323e-17           0;
                      0           0           1;
                     -1           0           0
      ]
    d: :1
    0
    0
    actual:
    R:
    [
        6.12323e-17          -1           0;
                      1 6.12323e-17           0;
                      0           0           1
      ]
    d: :1
    0
    0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:39: Failure: "assert_equal( trueE, EssentialMatrix::FromRotationAndDirection(trueRotation, trueDirection, actualH1, actualH2), 1e-8)" 
    not equal:
    expected = [
        2 0 0;
            0 2 0;
            0 0 1;
            0 0 0;
            0 0 0
      ]
    actual = [
        1 0 0;
            0 1 0;
            0 0 1;
            0 0 0;
            0 0 0
      ]
    actual - expected = [
                 -1           0           0;
                      0          -1           0;
                      0           0 1.11022e-16;
                      0           0           0;
                      0           0           0
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:45: Failure: "assert_equal(expectedH1, actualH1, 1e-7)" 
    Not equal:
    expected:
    R:
    [
                  1 6.12323e-17           0;
                      0           0           1;
                     -1           0           0
      ]
    d: :1
    0
    0
    actual:
    R:
    [
        6.12323e-17          -1           0;
                      1 6.12323e-17           0;
                      0           0           1
      ]
    d: :1
    0
    0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:59: Failure: "assert_equal(expected, actual)" 
    not equal:
    expected[0.1; 0.2; 0.3; 0; 0];
    actual[0.2; 0.4; 0.31; 0; 0];
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:83: Failure: "assert_equal(d.head(5), actual2, 1e-8)" 
    not equal:
    expected = [
         -1.69193449 -0.110259742  0.445618516  0.727812289 -0.770947066;
             -1.20177718 -0.809239784   0.82007435 -0.489461013  0.180362936;
             0.363621268  -0.82007435            0 0.0823430334  0.553695821
      ]
    actual = [
                   0   2.12332916  -2.05555575  0.727812289 -0.770947066;
             -2.12332916            0 -0.491962574 -0.489461013  0.180362936;
              2.05555575  0.491962574            0 -0.850454508  0.501768134
      ]
    actual - expected = [
             1.69193449       2.2335889     -2.50117427  5.47195622e-12 -1.77449166e-11;
               -0.921551977     0.809239784     -1.31203692  -2.0384805e-12 -1.36642087e-11;
                 1.69193449      1.31203692               0    -0.932797542   -0.0519276873
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:132: Failure: "assert_equal(expH1, actH1, 1e-8)" 
    not equal:
    expected = [
         0.612372436 -0.707106781 -0.573223305;
              0.73919892  0.353553391   0.73919892;
             0.280330086  0.612372436            0
      ]
    actual = [
         0.612372436 -0.707106781 -0.573223305;
              0.73919892  0.353553391   0.73919892;
             0.280330086  0.612372436  0.975845411
      ]
    actual - expected = [
         2.56328292e-12  -2.8613778e-12 -2.69806399e-12;
             -1.2738699e-12 -1.52226565e-11 -1.27398092e-12;
            -3.79529741e-13  2.56328292e-12     0.975845411
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:133: Failure: "assert_equal(expH2, actH2, 1e-8)" 
    Not equal:
    expected:
    R:
    [
                   0            1            0;
                       1            0 6.123234e-17;
                       0           -1            1
      ]
    d: :1
    0
    0
    actual:
    R:
    [
                   1            0 6.123234e-17;
                       1            0            0;
                       0           -1            0
      ]
    d: :1
    0
    0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:151: Failure: "assert_equal(bodyE, bRc * trueE, 1e-8)" 
    Not equal:
    expected:
    R:
    [
                   0            1            0;
                       1            0 6.123234e-17;
                       0           -1            1
      ]
    d: :1
    0
    0
    actual:
    R:
    [
                   1            0 6.123234e-17;
                       1            0            0;
                       0           -1            0
      ]
    d: :1
    0
    0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:152: Failure: "assert_equal(bodyE, trueE.rotate(bRc), 1e-8)" 
    Not equal:
    expected:
    R:
    [
                   1 6.123234e-17            0;
                       0            0            1;
                      -1            0            0
      ]
    d: :1
    0
    0
    actual:
    R:
    [
                    0             0            -1;
                        0             1             1;
                       -1 -6.123234e-17             0
      ]
    d: : 1
     0
    -0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:155: Failure: "assert_equal(trueE, cRb * bodyE, 1e-8)" 
    Not equal:
    expected:
    R:
    [
                   1 6.123234e-17            0;
                       0            0            1;
                      -1            0            0
      ]
    d: :1
    0
    0
    actual:
    R:
    [
                    0             0            -1;
                        0             1             1;
                       -1 -6.123234e-17             0
      ]
    d: : 1
     0
    -0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:156: Failure: "assert_equal(trueE, bodyE.rotate(cRb), 1e-8)" 
    not equal:
    expected = [
            -0.111111111     -0.666666667                0                0                0;
             5.19536679e-311 -3.11722008e-310                0                0                0;
                 -1.33333333                0      0.666666667                0                0;
                           0                0                0                0                1;
                           0                0                0               -1                0
      ]
    actual = [
         1  0  0  0  0;
             0  0  1  0  0;
            -0 -1 -0  0  0;
             0  0  0  0  1;
             0  0  0 -1  0
      ]
    actual - expected = [
              1.11111111      0.666666667                0                0                0;
            -5.19536679e-311  3.11722008e-310                1                0                0;
                  1.33333333               -1     -0.666666667                0                0;
                           0                0                0                0   1.25001121e-11;
                           0                0                0  -1.25001121e-11                0
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:166: Failure: "assert_equal(expH1, actH1, 1e-7)" 
    Not equal:
    expected:
    R:
    [
                   1 6.123234e-17            0;
                       0            0            1;
                      -1            0            0
      ]
    d: :1
    0
    0
    actual:
    R:
    [
        6.123234e-17           -1            0;
                       1 6.123234e-17            0;
                       0            0            1
      ]
    d: :1
    0
    0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:174: Failure: "assert_equal(trueE, EssentialMatrix::FromPose3(pose, actualH), 1e-8)" 
    not equal:
    expected = [
                      2               0               0               0               0               0;
                          0               2               0               0               0               0;
                          0               0               1               0               0               0;
                          0               0               0               0               0      9.99999995;
                          0               0               0     -9.99999995 -6.12323406e-16               0
      ]
    actual = [
                    1             0             0             0             0             0;
                        0             1             0             0             0             0;
                        0             0             1             0             0             0;
                        0             0             0             0             0            10;
                        0             0             0           -10 -6.123234e-16             0
      ]
    actual - expected = [
                     -1               0               0               0               0               0;
                          0              -1               0               0               0               0;
                          0               0  1.11022302e-16               0               0               0;
                          0               0               0               0               0  4.58333336e-08;
                          0               0               0 -4.58333336e-08   6.1232339e-24               0
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:177: Failure: "assert_equal(expectedH, actualH, 1e-7)" 
    Not equal:
    expected:
    R:
    [
            0.097843395     0.944702486    -0.312991826;
                0.198669331     0.289629478     0.936293364;
               -0.153791998    -0.159345079 6.95293642e-310
      ]
    d: :0.455842306
    0.569802882
    0.683763459
    actual:
    R:
    [
         0.975170327 -0.153791998 -0.159345079;
             0.097843395  0.944702486 -0.312991826;
             0.198669331  0.289629478  0.936293364
      ]
    d: :0.455842306
    0.569802882
    0.683763459
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:187: Failure: "assert_equal(E, EssentialMatrix::FromPose3(pose, actualH), 1e-8)" 
    not equal:
    expected = [
           1.17767602  0.0861905953 -0.0863674987             0             0             0;
              0.162356421    1.67293677  -0.212177331             0             0             0;
             -0.123687211   0.258566133   0.933694233             0             0             0;
                        0             0             0 -0.0592818681   0.615756664  -0.957094922;
                        0             0             0  -0.877309668   0.585751583   0.431189203
      ]
    actual = [
                    1             0             0             0             0             0;
                        0             1             0             0             0             0;
                        0             0             1             0             0             0;
                        0             0             0 -0.0592818681   0.615756664  -0.957094922;
                        0             0             0  -0.877309668   0.585751583   0.431189203
      ]
    actual - expected = [
            -0.17767602   -0.0861905953    0.0863674987               0               0               0;
               -0.162356421    -0.672936775     0.212177331               0               0               0;
                0.123687211    -0.258566133    0.0663057669               0               0               0;
                          0               0               0  4.83599272e-12 -1.82104332e-11 -2.59630095e-11;
                          0               0               0  1.41365808e-11 -1.17228449e-11  1.21530008e-11
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:190: Failure: "assert_equal(expectedH, actualH, 1e-5)" 
    Not equal:
    expected:
    R:
    [
                      1    6.123234e-17               0;
                          0               0               1;
                         -1               0 6.95293642e-310
      ]
    d: :1
    0
    0
    actual:
    R:
    [
         4.20674164e-20              -1 -2.05103429e-10;
            -2.05103429e-10 -2.05103429e-10               1;
                         -1              -0 -2.05103429e-10
      ]
    d: :1
    0
    0
    /home/crobinso/projects/gtsam-gtborg/gtsam/geometry/tests/testEssentialMatrix.cpp:199: Failure: "assert_equal(expected, actual)" 
    There were 16 failures
    
            Start  36: testOrientedPlane3
     36/230 Test  #36: testOrientedPlane3 .....................   Passed    0.01 sec
            Start  37: testPinholeCamera
     37/230 Test  #37: testPinholeCamera ......................   Passed    0.00 sec
            Start  38: testPinholePose
     38/230 Test  #38: testPinholePose ........................   Passed    0.00 sec
            Start  39: testPinholeSet
     39/230 Test  #39: testPinholeSet .........................   Passed    0.00 sec
            Start  40: testPoint2
     40/230 Test  #40: testPoint2 .............................   Passed    0.00 sec
            Start  41: testPoint3
     41/230 Test  #41: testPoint3 .............................   Passed    0.00 sec
            Start  42: testPose2
     42/230 Test  #42: testPose2 ..............................   Passed    0.00 sec
            Start  43: testPose3
     43/230 Test  #43: testPose3 ..............................   Passed    0.00 sec
            Start  44: testQuaternion
     44/230 Test  #44: testQuaternion .........................   Passed    0.00 sec
            Start  45: testRot2
     45/230 Test  #45: testRot2 ...............................   Passed    0.00 sec
            Start  46: testRot3
     46/230 Test  #46: testRot3 ...............................   Passed    0.00 sec
            Start  47: testRot3M
     47/230 Test  #47: testRot3M ..............................   Passed    0.00 sec
            Start  48: testRot3Q
     48/230 Test  #48: testRot3Q ..............................   Passed    0.00 sec
            Start  49: testSO3
     49/230 Test  #49: testSO3 ................................   Passed    0.00 sec
            Start  50: testSerializationGeometry
     50/230 Test  #50: testSerializationGeometry ..............   Passed    0.00 sec
            Start  51: testSimpleCamera
     51/230 Test  #51: testSimpleCamera .......................   Passed    0.00 sec
            Start  52: testStereoCamera
     52/230 Test  #52: testStereoCamera .......................   Passed    0.00 sec
            Start  53: testStereoPoint2
     53/230 Test  #53: testStereoPoint2 .......................   Passed    0.00 sec
            Start  54: testTriangulation
     54/230 Test  #54: testTriangulation ......................   Passed    0.00 sec
            Start  55: testUnit3
     55/230 Test  #55: testUnit3 ..............................   Passed    0.01 sec
            Start  56: testKey
     56/230 Test  #56: testKey ................................   Passed    0.00 sec
            Start  57: testLabeledSymbol
     57/230 Test  #57: testLabeledSymbol ......................   Passed    0.00 sec
            Start  58: testOrdering
     58/230 Test  #58: testOrdering ...........................***Exception: SegFault  0.66 sec
    
            Start  59: testVariableSlots
     59/230 Test  #59: testVariableSlots ......................   Passed    0.00 sec
            Start  60: testSerializationSymbolic
     60/230 Test  #60: testSerializationSymbolic ..............   Passed    0.00 sec
            Start  61: testSymbolicBayesNet
     61/230 Test  #61: testSymbolicBayesNet ...................   Passed    0.00 sec
            Start  62: testSymbolicBayesTree
     62/230 Test  #62: testSymbolicBayesTree ..................***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam/symbolic/tests/testSymbolicBayesTree: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam/symbolic/tests/testSymbolicBayesTree: undefined symbol: _ZN5gtsam9BayesTreeINS_23SymbolicBayesTreeCliqueEE9removeTopERKSt6vectorImSaImEERNS_16SymbolicBayesNetERNS_8FastListIN5boost10shared_ptrIS1_EEEE
    
            Start  63: testSymbolicConditional
     63/230 Test  #63: testSymbolicConditional ................   Passed    0.00 sec
            Start  64: testSymbolicEliminationTree
     64/230 Test  #64: testSymbolicEliminationTree ............   Passed    0.00 sec
            Start  65: testSymbolicFactor
     65/230 Test  #65: testSymbolicFactor .....................   Passed    0.00 sec
            Start  66: testSymbolicFactorGraph
     66/230 Test  #66: testSymbolicFactorGraph ................   Passed    0.00 sec
            Start  67: testSymbolicISAM
     67/230 Test  #67: testSymbolicISAM .......................   Passed    0.00 sec
            Start  68: testSymbolicJunctionTree
     68/230 Test  #68: testSymbolicJunctionTree ...............   Passed    0.00 sec
            Start  69: testVariableIndex
     69/230 Test  #69: testVariableIndex ......................   Passed    0.00 sec
            Start  70: testAlgebraicDecisionTree
     70/230 Test  #70: testAlgebraicDecisionTree ..............   Passed    0.00 sec
            Start  71: testDecisionTree
     71/230 Test  #71: testDecisionTree .......................   Passed    0.00 sec
            Start  72: testDecisionTreeFactor
     72/230 Test  #72: testDecisionTreeFactor .................   Passed    0.00 sec
            Start  73: testDiscreteBayesNet
     73/230 Test  #73: testDiscreteBayesNet ...................   Passed    0.00 sec
            Start  74: testDiscreteBayesTree
     74/230 Test  #74: testDiscreteBayesTree ..................   Passed    0.00 sec
            Start  75: testDiscreteConditional
     75/230 Test  #75: testDiscreteConditional ................   Passed    0.00 sec
            Start  76: testDiscreteFactor
     76/230 Test  #76: testDiscreteFactor .....................   Passed    0.00 sec
            Start  77: testDiscreteFactorGraph
     77/230 Test  #77: testDiscreteFactorGraph ................   Passed    0.00 sec
            Start  78: testDiscreteMarginals
     78/230 Test  #78: testDiscreteMarginals ..................   Passed    0.00 sec
            Start  79: testSignature
     79/230 Test  #79: testSignature ..........................   Passed    0.00 sec
            Start  80: testErrors
     80/230 Test  #80: testErrors .............................   Passed    0.00 sec
            Start  81: testGaussianBayesNet
     81/230 Test  #81: testGaussianBayesNet ...................   Passed    0.00 sec
            Start  82: testGaussianBayesTree
     82/230 Test  #82: testGaussianBayesTree ..................   Passed    0.00 sec
            Start  83: testGaussianConditional
     83/230 Test  #83: testGaussianConditional ................   Passed    0.00 sec
            Start  84: testGaussianDensity
     84/230 Test  #84: testGaussianDensity ....................   Passed    0.00 sec
            Start  85: testGaussianFactorGraph
     85/230 Test  #85: testGaussianFactorGraph ................   Passed    0.00 sec
            Start  86: testHessianFactor
     86/230 Test  #86: testHessianFactor ......................   Passed    0.00 sec
            Start  87: testJacobianFactor
     87/230 Test  #87: testJacobianFactor .....................   Passed    0.00 sec
            Start  88: testKalmanFilter
     88/230 Test  #88: testKalmanFilter .......................   Passed    0.00 sec
            Start  89: testNoiseModel
     89/230 Test  #89: testNoiseModel .........................   Passed    0.00 sec
            Start  90: testRegularHessianFactor
     90/230 Test  #90: testRegularHessianFactor ...............***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam/linear/tests/testRegularHessianFactor: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam/linear/tests/testRegularHessianFactor: undefined symbol: _ZNK5gtsam14JacobianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start  91: testRegularJacobianFactor
     91/230 Test  #91: testRegularJacobianFactor ..............***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam/linear/tests/testRegularJacobianFactor: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam/linear/tests/testRegularJacobianFactor: undefined symbol: _ZNK5gtsam14JacobianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start  92: testSampler
     92/230 Test  #92: testSampler ............................   Passed    0.00 sec
            Start  93: testScatter
     93/230 Test  #93: testScatter ............................   Passed    0.00 sec
            Start  94: testSerializationLinear
     94/230 Test  #94: testSerializationLinear ................   Passed    0.00 sec
            Start  95: testVectorValues
     95/230 Test  #95: testVectorValues .......................   Passed    0.00 sec
            Start  96: testAdaptAutoDiff
     96/230 Test  #96: testAdaptAutoDiff ......................   Passed    0.00 sec
            Start  97: testCallRecord
     97/230 Test  #97: testCallRecord .........................   Passed    0.00 sec
            Start  98: testExecutionTrace
     98/230 Test  #98: testExecutionTrace .....................   Passed    0.00 sec
            Start  99: testExpression
     99/230 Test  #99: testExpression .........................   Passed    0.00 sec
            Start 100: testLinearContainerFactor
    100/230 Test #100: testLinearContainerFactor ..............   Passed    0.00 sec
            Start 101: testSerializationNonlinear
    101/230 Test #101: testSerializationNonlinear .............   Passed    0.00 sec
            Start 102: testValues
    102/230 Test #102: testValues .............................   Passed    0.00 sec
            Start 103: testWhiteNoiseFactor
    103/230 Test #103: testWhiteNoiseFactor ...................   Passed    0.00 sec
            Start 104: testBearingFactor
    104/230 Test #104: testBearingFactor ......................   Passed    0.00 sec
            Start 105: testBearingRangeFactor
    105/230 Test #105: testBearingRangeFactor .................   Passed    0.00 sec
            Start 106: testRangeFactor
    106/230 Test #106: testRangeFactor ........................   Passed    0.00 sec
            Start 107: testAntiFactor
    107/230 Test #107: testAntiFactor .........................   Passed    0.00 sec
            Start 108: testBetweenFactor
    108/230 Test #108: testBetweenFactor ......................   Passed    0.00 sec
            Start 109: testDataset
    109/230 Test #109: testDataset ............................   Passed    0.11 sec
            Start 110: testEssentialMatrixConstraint
    110/230 Test #110: testEssentialMatrixConstraint ..........***Failed    0.00 sec
    not equal:
    expected[0; 0; 0; 0; 0];
    actual[0.116395271; 1.13817832; 2.73898487; -1.63958436e-09; 1.7237383e-10];
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixConstraint.cpp:50: Failure: "assert_equal(expected, actual, 1e-8)" 
    There were 1 failures
    
            Start 111: testEssentialMatrixFactor
    111/230 Test #111: testEssentialMatrixFactor ..............***Failed    0.01 sec
    not equal:
    expected = [
         3.82603e-09            1         -0.1 -1.46378e-15         -0.1
      ]
    actual = [
         3.82603e-09            1         -0.1 -3.82603e-08  3.82603e-08
      ]
    actual - expected = [
         2.47013e-19  2.50001e-11 -2.50001e-12 -3.82603e-08          0.1
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:110: Failure: "assert_equal(Hexpected, Hactual, 1e-8)" 
    not equal:
    expected = [
        7.65206e-09           1        -0.2 3.82603e-09        -0.1
      ]
    actual = [
        7.65206e-09           1        -0.2         0.1 3.74951e-08
      ]
    actual - expected = [
        8.25852e-19 2.50002e-11      -5e-12         0.1         0.1
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:110: Failure: "assert_equal(Hexpected, Hactual, 1e-8)" 
    not equal:
    expected = [
        -6.15422e-17            1            0 -3.82603e-09         -0.1
      ]
    actual = [
        -6.12323e-17            1            0         -0.1  3.82603e-08
      ]
    actual - expected = [
          3.099e-19 2.50002e-11           0        -0.1         0.1
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:110: Failure: "assert_equal(Hexpected, Hactual, 1e-8)" 
    not equal:
    expected = [
        -0.2    2 -0.2 -0.2 -0.2
      ]
    actual = [
        -0.2    2 -0.2    1    1
      ]
    actual - expected = [
        -2.01225e-12  4.24076e-11 -1.70547e-12          1.2          1.2
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:110: Failure: "assert_equal(Hexpected, Hactual, 1e-8)" 
    not equal:
    expected = [
         0.2    2 -0.2  0.2 -0.2
      ]
    actual = [
         0.2    2 -0.2    1   -1
      ]
    actual - expected = [
         7.25681e-12  5.35101e-11 -7.56317e-12          0.8         -0.8
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:110: Failure: "assert_equal(Hexpected, Hactual, 1e-8)" 
    Not equal:
    expected:
    
      A[1] = [
         3.82603e-09            1         -0.1 -1.46378e-15         -0.1
      ]
      b = [ 0 ]
      No noise model
    actual:
    
      A[1] = [
         3.82603e-09            1         -0.1 -3.82603e-08  3.82603e-08
      ]
      b = [ 0 ]
      No noise model
    not equal:
    expected = [
         3.82603e-09            1         -0.1 -1.46378e-15         -0.1
      ]
    actual = [
         3.82603e-09            1         -0.1 -3.82603e-08  3.82603e-08
      ]
    actual - expected = [
         2.47013e-19  2.50001e-11 -2.50001e-12 -3.82603e-08          0.1
      ]
    Mismatch in Jacobian 1 (base 1), as shown above
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:126: Failure: "gtsam::internal::testExpressionJacobians(name_, expr, values, 1e-5, 1e-9)" 
    Not equal:
    expected:
    
      A[1] = [
        7.65206e-09           1        -0.2 3.82603e-09        -0.1
      ]
      b = [ 0 ]
      No noise model
    actual:
    
      A[1] = [
        7.65206e-09           1        -0.2         0.1 3.74951e-08
      ]
      b = [ 0 ]
      No noise model
    not equal:
    expected = [
        7.65206e-09           1        -0.2 3.82603e-09        -0.1
      ]
    actual = [
        7.65206e-09           1        -0.2         0.1 3.74951e-08
      ]
    actual - expected = [
        8.25852e-19 2.50002e-11      -5e-12         0.1         0.1
      ]
    Mismatch in Jacobian 1 (base 1), as shown above
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:126: Failure: "gtsam::internal::testExpressionJacobians(name_, expr, values, 1e-5, 1e-9)" 
    Not equal:
    expected:
    
      A[1] = [
        -6.15422e-17            1            0 -3.82603e-09         -0.1
      ]
      b = [ 0 ]
      No noise model
    actual:
    
      A[1] = [
        -6.12323e-17            1            0         -0.1  3.82603e-08
      ]
      b = [ 0 ]
      No noise model
    not equal:
    expected = [
        -6.15422e-17            1            0 -3.82603e-09         -0.1
      ]
    actual = [
        -6.12323e-17            1            0         -0.1  3.82603e-08
      ]
    actual - expected = [
          3.099e-19 2.50002e-11           0        -0.1         0.1
      ]
    Mismatch in Jacobian 1 (base 1), as shown above
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:126: Failure: "gtsam::internal::testExpressionJacobians(name_, expr, values, 1e-5, 1e-9)" 
    Not equal:
    expected:
    
      A[1] = [
        -0.2    2 -0.2 -0.2 -0.2
      ]
      b = [ 0 ]
      No noise model
    actual:
    
      A[1] = [
        -0.2    2 -0.2    1    1
      ]
      b = [ 0 ]
      No noise model
    not equal:
    expected = [
        -0.2    2 -0.2 -0.2 -0.2
      ]
    actual = [
        -0.2    2 -0.2    1    1
      ]
    actual - expected = [
        -2.01225e-12  4.24076e-11 -1.70547e-12          1.2          1.2
      ]
    Mismatch in Jacobian 1 (base 1), as shown above
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:126: Failure: "gtsam::internal::testExpressionJacobians(name_, expr, values, 1e-5, 1e-9)" 
    Not equal:
    expected:
    
      A[1] = [
         0.2    2 -0.2  0.2 -0.2
      ]
      b = [ 0 ]
      No noise model
    actual:
    
      A[1] = [
         0.2    2 -0.2    1   -1
      ]
      b = [ 0 ]
      No noise model
    not equal:
    expected = [
         0.2    2 -0.2  0.2 -0.2
      ]
    actual = [
         0.2    2 -0.2    1   -1
      ]
    actual - expected = [
         7.25681e-12  5.35101e-11 -7.56317e-12          0.8         -0.8
      ]
    Mismatch in Jacobian 1 (base 1), as shown above
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:126: Failure: "gtsam::internal::testExpressionJacobians(name_, expr, values, 1e-5, 1e-9)" 
    Not equal:
    expected:
    R:
    [
                   1 -4.44089e-16  3.82603e-08;
            -3.82603e-08 -3.82603e-08            1;
                      -1 -3.82603e-08            0
      ]
    d: :          1
    5.05322e-16
    3.82603e-08
    actual:
    R:
    [
            0.996072    0.0021271    0.0885239;
              -0.0885231    -0.000477     0.996074;
               -0.999998 -0.000286829 4.68679e-310
      ]
    d: : 0.751877
    -0.659181
    0.0126933
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:206: Failure: "assert_equal(trueE, actual, 1e-1)" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:209: Failure: "expected 0 but was: 0.037300236308596239" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:213: Failure: "expected 0 but was: 0.00061206833224342993" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:213: Failure: "expected 0 but was: 0.00061998071497838814" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:213: Failure: "expected 0 but was: 0.00059840736323708843" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:213: Failure: "expected 0 but was: 0.00039225546500087916" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:213: Failure: "expected 0 but was: 0.0024877877339595234" 
    not equal:
    expected = [
                  -1  3.82603e-09            0   9.5953e-18          0.1;
             3.82541e-09        -0.01            0         0.01 -3.83721e-10
      ]
    actual = [
        -3.82603e-09         -0.1           -1  9.58528e-18          0.1;
                    1.01 -3.82603e-08  3.82603e-09         0.01 -3.82603e-10
      ]
    actual - expected = [
                   1         -0.1           -1 -1.00155e-20  1.66672e-12;
                    1.01   0.00999997  3.82603e-09 -2.10863e-13  1.11804e-12
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:314: Failure: "assert_equal(Hexpected1, Hactual1, 1e-8)" 
    not equal:
    expected = [
                  -1  7.65206e-09            0  2.38228e-17          0.1;
             7.65221e-09        -0.04            0         0.02 -7.66054e-10
      ]
    actual = [
        -7.65206e-09         -0.2           -1  2.42238e-17          0.1;
                    1.04 -3.82603e-08  7.65206e-09         0.02 -7.65206e-10
      ]
    actual - expected = [
                   1         -0.2           -1   4.0098e-19  1.66675e-12;
                    1.04         0.04  7.65206e-09 -1.75238e-12  8.48154e-13
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:314: Failure: "assert_equal(Hexpected1, Hactual1, 1e-8)" 
    not equal:
    expected = [
                  -1   -5.691e-17            0 -5.29396e-18          0.1;
            -5.72409e-17  4.30134e-18            0 -3.97562e-09 -3.87121e-17
      ]
    actual = [
         1.52086e-15  3.97504e-08           -1 -5.05322e-18          0.1;
                       1 -3.82603e-08 -1.52086e-15 -3.97504e-09  1.58209e-16
      ]
    actual - expected = [
                   1  3.97504e-08           -1  2.40734e-19  1.66672e-12;
                       1 -3.82603e-08 -1.52086e-15  5.76668e-13  1.96922e-16
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:314: Failure: "assert_equal(Hexpected1, Hactual1, 1e-8)" 
    not equal:
    expected = [
                  -1         -0.2           -1          0.2          0.2;
             4.59119e-08         0.96         -0.2         0.04 -1.53072e-09
      ]
    actual = [
                 0.2         -0.2           -2          0.2          0.2;
                    1.04            1         -0.2         0.04 -1.53041e-09
      ]
    actual - expected = [
                1.2 2.29642e-08          -1 1.12104e-11 5.65922e-12;
                   1.04        0.04 4.59164e-08 5.17145e-12 3.08645e-13
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:314: Failure: "assert_equal(Hexpected1, Hactual1, 1e-8)" 
    not equal:
    expected = [
                  -1          0.2           -1         -0.2          0.2;
            -3.06088e-08        -1.04          0.2         0.04 -1.53211e-09
      ]
    actual = [
                -0.2         -0.2           -2         -0.2          0.2;
                    1.04           -1          0.2         0.04 -1.53041e-09
      ]
    actual - expected = [
                 0.8         -0.4           -1 -5.04594e-12 -5.05235e-13;
                    1.04         0.04 -3.06115e-08  2.54979e-12  1.69619e-12
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:314: Failure: "assert_equal(Hexpected1, Hactual1, 1e-8)" 
    Not equal:
    expected:
    R:
    [
                   1 -4.44089e-16  3.82603e-08;
            -3.82603e-08 -3.82603e-08            1;
                      -1 -3.82603e-08            0
      ]
    d: :          1
    5.05322e-16
    3.82603e-08
    actual:
    R:
    [
            0.996072    0.0021271    0.0885239;
              -0.0885231    -0.000477     0.996074;
               -0.999998 -0.000286829 1.97626e-322
      ]
    d: : 0.751877
    -0.659181
    0.0126933
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:420: Failure: "assert_equal(trueE, actual, 1e-1)" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:423: Failure: "expected 0 but was: 0.03730023545779796" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:427: Failure: "expected 0 but was: 0.0006120683130666309" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:427: Failure: "expected 0 but was: 0.00061998069770924369" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:427: Failure: "expected 0 but was: 0.00059840734244789862" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:427: Failure: "expected 0 but was: 0.00039225543122034523" 
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:427: Failure: "expected 0 but was: 0.0024877877191090692" 
    not equal:
    expected = [
               -500 1.91301e-06           0 4.74338e-15          50;
            1.91271e-06          -5           0           5 -1.9186e-07
      ]
    actual = [
        -1.91301e-06          -50         -500  4.79264e-15           50;
                     505 -1.91301e-05  1.91301e-06            5 -1.91301e-07
      ]
    actual - expected = [
                 500          -50         -500  4.92554e-17  8.33374e-10;
                     505      4.99998  1.91301e-06 -1.05431e-10  5.59021e-10
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:523: Failure: "assert_equal(Hexpected1, Hactual1, 1e-6)" 
    not equal:
    expected = [
                -500  3.82603e-06            0  1.23667e-14           50;
             3.82541e-06          -20            0           10 -3.83027e-07
      ]
    actual = [
        -3.82603e-06         -100         -500  1.21119e-14           50;
                     520 -1.91301e-05  3.82603e-06           10 -3.82603e-07
      ]
    actual - expected = [
                500        -100        -500 -2.5479e-16  8.3336e-10;
                    520          20 3.82603e-06 2.51948e-10  4.2408e-10
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:523: Failure: "assert_equal(Hexpected1, Hactual1, 1e-6)" 
    not equal:
    expected = [
                -500            0            0  -2.5411e-15           50;
                       0  -2.5411e-14            0  -1.9133e-06 -2.21923e-14
      ]
    actual = [
         7.31925e-13  1.91301e-05         -500 -2.52661e-15           50;
                     500 -1.91301e-05 -7.31925e-13 -1.91301e-06  7.62541e-14
      ]
    actual - expected = [
                 500  1.91301e-05         -500  1.44877e-17  8.33381e-10;
                     500 -1.91301e-05 -7.31925e-13  2.88334e-10  9.84464e-14
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:523: Failure: "assert_equal(Hexpected1, Hactual1, 1e-6)" 
    not equal:
    expected = [
               -500        -100        -500         100         100;
            2.29559e-05         480        -100          20 -7.6536e-07
      ]
    actual = [
                 100         -100        -1000          100          100;
                     520          500         -100           20 -7.65206e-07
      ]
    actual - expected = [
                600 1.14821e-05        -500 5.60523e-09 2.82962e-09;
                    520          20 2.29582e-05 2.58572e-09 1.54323e-10
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:523: Failure: "assert_equal(Hexpected1, Hactual1, 1e-6)" 
    not equal:
    expected = [
                -500          100         -500         -100          100;
            -1.53044e-05         -520          100           20 -7.66054e-07
      ]
    actual = [
                -100         -100        -1000         -100          100;
                     520         -500          100           20 -7.65206e-07
      ]
    actual - expected = [
                 400         -200         -500 -2.52297e-09 -2.52612e-10;
                     520           20 -1.53058e-05  1.27489e-09  8.48095e-10
      ]
    /home/crobinso/projects/gtsam-gtborg/gtsam/slam/tests/testEssentialMatrixFactor.cpp:523: Failure: "assert_equal(Hexpected1, Hactual1, 1e-6)" 
    There were 34 failures
    
            Start 112: testGeneralSFMFactor
    112/230 Test #112: testGeneralSFMFactor ...................   Passed    0.01 sec
            Start 113: testGeneralSFMFactor_Cal3Bundler
    113/230 Test #113: testGeneralSFMFactor_Cal3Bundler .......   Passed    0.01 sec
            Start 114: testInitializePose3
    114/230 Test #114: testInitializePose3 ....................   Passed    0.01 sec
            Start 115: testLago
    115/230 Test #115: testLago ...............................   Passed    0.00 sec
            Start 116: testOrientedPlane3Factor
    116/230 Test #116: testOrientedPlane3Factor ...............***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testOrientedPlane3Factor: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testOrientedPlane3Factor: undefined symbol: _ZN5gtsam5ISAM26updateERKNS_20NonlinearFactorGraphERKNS_6ValuesERKSt6vectorImSaImEERKN5boost8optionalINS_7FastMapImiEEEERKNSD_INS_8FastListImEEEESN_b
    
            Start 117: testPoseRotationPrior
    117/230 Test #117: testPoseRotationPrior ..................   Passed    0.00 sec
            Start 118: testPoseTranslationPrior
    118/230 Test #118: testPoseTranslationPrior ...............   Passed    0.00 sec
            Start 119: testPriorFactor
    119/230 Test #119: testPriorFactor ........................   Passed    0.00 sec
            Start 120: testProjectionFactor
    120/230 Test #120: testProjectionFactor ...................   Passed    0.00 sec
            Start 121: testReferenceFrameFactor
    121/230 Test #121: testReferenceFrameFactor ...............   Passed    0.00 sec
            Start 122: testRegularImplicitSchurFactor
    122/230 Test #122: testRegularImplicitSchurFactor .........***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testRegularImplicitSchurFactor: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testRegularImplicitSchurFactor: undefined symbol: _ZNK5gtsam14JacobianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start 123: testRotateFactor
    123/230 Test #123: testRotateFactor .......................   Passed    0.00 sec
            Start 124: testSlamExpressions
    124/230 Test #124: testSlamExpressions ....................   Passed    0.00 sec
            Start 125: testSmartFactorBase
    125/230 Test #125: testSmartFactorBase ....................   Passed    0.00 sec
            Start 126: testSmartProjectionCameraFactor
    126/230 Test #126: testSmartProjectionCameraFactor ........***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testSmartProjectionCameraFactor: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testSmartProjectionCameraFactor: undefined symbol: _ZNK5gtsam13HessianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start 127: testSmartProjectionPoseFactor
    127/230 Test #127: testSmartProjectionPoseFactor ..........***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testSmartProjectionPoseFactor: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam/slam/tests/testSmartProjectionPoseFactor: undefined symbol: _ZNK5gtsam13HessianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start 128: testStereoFactor
    128/230 Test #128: testStereoFactor .......................   Passed    0.00 sec
            Start 129: testTriangulationFactor
    129/230 Test #129: testTriangulationFactor ................   Passed    0.00 sec
            Start 130: testAHRSFactor
    130/230 Test #130: testAHRSFactor .........................   Passed    0.00 sec
            Start 131: testAttitudeFactor
    131/230 Test #131: testAttitudeFactor .....................   Passed    0.00 sec
            Start 132: testCombinedImuFactor
    132/230 Test #132: testCombinedImuFactor ..................   Passed    0.01 sec
            Start 133: testImuBias
    133/230 Test #133: testImuBias ............................   Passed    0.00 sec
            Start 134: testImuFactor
    134/230 Test #134: testImuFactor ..........................   Passed    0.07 sec
            Start 135: testImuFactorSerialization
    135/230 Test #135: testImuFactorSerialization .............   Passed    0.00 sec
            Start 136: testManifoldPreintegration
    136/230 Test #136: testManifoldPreintegration .............   Passed    0.00 sec
            Start 137: testNavState
    137/230 Test #137: testNavState ...........................   Passed    0.00 sec
            Start 138: testPoseVelocityBias
    138/230 Test #138: testPoseVelocityBias ...................   Passed    0.00 sec
            Start 139: testScenario
    139/230 Test #139: testScenario ...........................   Passed    0.00 sec
            Start 140: testScenarios
    140/230 Test #140: testScenarios ..........................   Passed    1.09 sec
            Start 141: testTangentPreintegration
    141/230 Test #141: testTangentPreintegration ..............   Passed    0.01 sec
            Start 142: testBoundingConstraint
    142/230 Test #142: testBoundingConstraint .................   Passed    0.00 sec
            Start 143: testDoglegOptimizer
    143/230 Test #143: testDoglegOptimizer ....................   Passed    0.00 sec
            Start 144: testExpressionFactor
    144/230 Test #144: testExpressionFactor ...................   Passed    0.00 sec
            Start 145: testExtendedKalmanFilter
    145/230 Test #145: testExtendedKalmanFilter ...............   Passed    0.00 sec
            Start 146: testGaussianBayesTreeB
    146/230 Test #146: testGaussianBayesTreeB .................   Passed    0.00 sec
            Start 147: testGaussianFactorGraphB
    147/230 Test #147: testGaussianFactorGraphB ...............   Passed    0.00 sec
            Start 148: testGaussianISAM
    148/230 Test #148: testGaussianISAM .......................   Passed    0.00 sec
            Start 149: testGaussianISAM2
    149/230 Test #149: testGaussianISAM2 ......................***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/tests/testGaussianISAM2: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/tests/testGaussianISAM2: undefined symbol: _ZN5gtsam5ISAM26updateERKNS_20NonlinearFactorGraphERKNS_6ValuesERKSt6vectorImSaImEERKN5boost8optionalINS_7FastMapImiEEEERKNSD_INS_8FastListImEEEESN_b
    
            Start 150: testGaussianJunctionTreeB
    150/230 Test #150: testGaussianJunctionTreeB ..............   Passed    0.00 sec
            Start 151: testGeneralSFMFactorB
    151/230 Test #151: testGeneralSFMFactorB ..................   Passed    0.01 sec
            Start 152: testGradientDescentOptimizer
    152/230 Test #152: testGradientDescentOptimizer ...........   Passed    0.00 sec
            Start 153: testGraph
    153/230 Test #153: testGraph ..............................   Passed    0.00 sec
            Start 154: testIterative
    154/230 Test #154: testIterative ..........................   Passed    0.00 sec
            Start 155: testLie
    155/230 Test #155: testLie ................................   Passed    0.00 sec
            Start 156: testManifold
    156/230 Test #156: testManifold ...........................   Passed    0.00 sec
            Start 157: testMarginals
    157/230 Test #157: testMarginals ..........................   Passed    0.00 sec
            Start 158: testNonlinearEquality
    158/230 Test #158: testNonlinearEquality ..................   Passed    0.00 sec
            Start 159: testNonlinearFactor
    159/230 Test #159: testNonlinearFactor ....................   Passed    0.00 sec
            Start 160: testNonlinearFactorGraph
    160/230 Test #160: testNonlinearFactorGraph ...............   Passed    0.00 sec
            Start 161: testNonlinearISAM
    161/230 Test #161: testNonlinearISAM ......................   Passed    0.01 sec
            Start 162: testNonlinearOptimizer
    162/230 Test #162: testNonlinearOptimizer .................   Passed    0.00 sec
            Start 163: testPCGSolver
    163/230 Test #163: testPCGSolver ..........................   Passed    0.00 sec
            Start 164: testPreconditioner
    164/230 Test #164: testPreconditioner .....................   Passed    0.00 sec
            Start 165: testRot3Optimization
    165/230 Test #165: testRot3Optimization ...................   Passed    0.00 sec
            Start 166: testSerializationSLAM
    166/230 Test #166: testSerializationSLAM ..................   Passed    0.00 sec
            Start 167: testSimulated2D
    167/230 Test #167: testSimulated2D ........................   Passed    0.00 sec
            Start 168: testSimulated2DOriented
    168/230 Test #168: testSimulated2DOriented ................   Passed    0.00 sec
            Start 169: testSimulated3D
    169/230 Test #169: testSimulated3D ........................   Passed    0.00 sec
            Start 170: testSubgraphPreconditioner
    170/230 Test #170: testSubgraphPreconditioner .............   Passed    0.00 sec
            Start 171: testSubgraphSolver
    171/230 Test #171: testSubgraphSolver .....................   Passed    0.00 sec
            Start 172: testBTree
    172/230 Test #172: testBTree ..............................   Passed    0.00 sec
            Start 173: testDSF
    173/230 Test #173: testDSF ................................   Passed    0.00 sec
            Start 174: testDSFMap
    174/230 Test #174: testDSFMap .............................   Passed    0.00 sec
            Start 175: testFixedVector
    175/230 Test #175: testFixedVector ........................   Passed    0.00 sec
            Start 176: testBearingS2
    176/230 Test #176: testBearingS2 ..........................   Passed    0.01 sec
            Start 177: testEvent
    177/230 Test #177: testEvent ..............................   Passed    0.00 sec
            Start 178: testInvDepthCamera3
    178/230 Test #178: testInvDepthCamera3 ....................   Passed    0.00 sec
            Start 179: testPose3Upright
    179/230 Test #179: testPose3Upright .......................   Passed    0.00 sec
            Start 180: testSimPolygon2D
    180/230 Test #180: testSimPolygon2D .......................   Passed    0.00 sec
            Start 181: testSimWall2D
    181/230 Test #181: testSimWall2D ..........................   Passed    0.00 sec
            Start 182: testSimilarity3
    182/230 Test #182: testSimilarity3 ........................   Passed    0.01 sec
            Start 183: testLPSolver
    183/230 Test #183: testLPSolver ...........................***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/linear/tests/testLPSolver: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/linear/tests/testLPSolver: undefined symbol: _ZNK5gtsam14JacobianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start 184: testLinearEquality
    184/230 Test #184: testLinearEquality .....................***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/linear/tests/testLinearEquality: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/linear/tests/testLinearEquality: undefined symbol: _ZNK5gtsam14JacobianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start 185: testQPSolver
    185/230 Test #185: testQPSolver ...........................***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/linear/tests/testQPSolver: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/linear/tests/testQPSolver: undefined symbol: _ZNK5gtsam14JacobianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start 186: testCSP
    186/230 Test #186: testCSP ................................   Passed    0.00 sec
            Start 187: testLoopyBelief
    187/230 Test #187: testLoopyBelief ........................   Passed    0.00 sec
            Start 188: testPlanning
    188/230 Test #188: testPlanning ...........................   Passed    0.00 sec
            Start 189: testScheduler
    189/230 Test #189: testScheduler ..........................   Passed    0.00 sec
            Start 190: testSudoku
    190/230 Test #190: testSudoku .............................   Passed    0.02 sec
            Start 191: testIMUSystem
    191/230 Test #191: testIMUSystem ..........................   Passed    0.00 sec
            Start 192: testPendulumFactors
    192/230 Test #192: testPendulumFactors ....................   Passed    0.00 sec
            Start 193: testPoseRTV
    193/230 Test #193: testPoseRTV ............................   Passed    0.00 sec
            Start 194: testSimpleHelicopter
    194/230 Test #194: testSimpleHelicopter ...................   Passed    0.00 sec
            Start 195: testVelocityConstraint
    195/230 Test #195: testVelocityConstraint .................   Passed    0.00 sec
            Start 196: testVelocityConstraint3
    196/230 Test #196: testVelocityConstraint3 ................   Passed    0.00 sec
            Start 197: testBatchFixedLagSmoother
    197/230 Test #197: testBatchFixedLagSmoother ..............   Passed    0.01 sec
            Start 198: testConcurrentBatchFilter
    198/230 Test #198: testConcurrentBatchFilter ..............   Passed    0.01 sec
            Start 199: testConcurrentBatchSmoother
    199/230 Test #199: testConcurrentBatchSmoother ............   Passed    0.00 sec
            Start 200: testConcurrentIncrementalFilter
    200/230 Test #200: testConcurrentIncrementalFilter ........***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalFilter: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalFilter: undefined symbol: _ZN5gtsam5ISAM26updateERKNS_20NonlinearFactorGraphERKNS_6ValuesERKSt6vectorImSaImEERKN5boost8optionalINS_7FastMapImiEEEERKNSD_INS_8FastListImEEEESN_b
    
            Start 201: testConcurrentIncrementalSmootherDL
    201/230 Test #201: testConcurrentIncrementalSmootherDL ....***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherDL: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherDL: undefined symbol: _ZN5gtsam29ConcurrentIncrementalSmoother6updateERKNS_20NonlinearFactorGraphERKNS_6ValuesERKN5boost8optionalISt6vectorImSaImEEEE
    
            Start 202: testConcurrentIncrementalSmootherGN
    202/230 Test #202: testConcurrentIncrementalSmootherGN ....***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherGN: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testConcurrentIncrementalSmootherGN: undefined symbol: _ZN5gtsam29ConcurrentIncrementalSmoother6updateERKNS_20NonlinearFactorGraphERKNS_6ValuesERKN5boost8optionalISt6vectorImSaImEEEE
    
            Start 203: testIncrementalFixedLagSmoother
    203/230 Test #203: testIncrementalFixedLagSmoother ........   Passed    0.01 sec
            Start 204: testLinearizedFactor
    204/230 Test #204: testLinearizedFactor ...................   Passed    0.00 sec
            Start 205: testNonlinearClusterTree
    205/230 Test #205: testNonlinearClusterTree ...............***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testNonlinearClusterTree: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/nonlinear/tests/testNonlinearClusterTree: undefined symbol: _ZN5gtsam14PrintKeyVectorERKSt6vectorImSaImEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKN5boost8functionIFSA_mEEE
    
            Start 206: testParticleFactor
    206/230 Test #206: testParticleFactor .....................   Passed    0.00 sec
            Start 207: testAHRS
    207/230 Test #207: testAHRS ...............................   Passed    0.00 sec
            Start 208: testBetweenFactorEM
    208/230 Test #208: testBetweenFactorEM ....................   Passed    0.00 sec
            Start 209: testBiasedGPSFactor
    209/230 Test #209: testBiasedGPSFactor ....................   Passed    0.00 sec
            Start 210: testDummyFactor
    210/230 Test #210: testDummyFactor ........................   Passed    0.00 sec
            Start 211: testEquivInertialNavFactor_GlobalVel
    211/230 Test #211: testEquivInertialNavFactor_GlobalVel ...   Passed    0.00 sec
            Start 212: testGaussMarkov1stOrderFactor
    212/230 Test #212: testGaussMarkov1stOrderFactor ..........   Passed    0.00 sec
            Start 213: testInertialNavFactor_GlobalVelocity
    213/230 Test #213: testInertialNavFactor_GlobalVelocity ...   Passed    0.00 sec
            Start 214: testInvDepthFactor3
    214/230 Test #214: testInvDepthFactor3 ....................   Passed    0.00 sec
            Start 215: testInvDepthFactorVariant1
    215/230 Test #215: testInvDepthFactorVariant1 .............   Passed    0.00 sec
            Start 216: testInvDepthFactorVariant2
    216/230 Test #216: testInvDepthFactorVariant2 .............   Passed    0.00 sec
            Start 217: testInvDepthFactorVariant3
    217/230 Test #217: testInvDepthFactorVariant3 .............   Passed    0.00 sec
            Start 218: testMultiProjectionFactor
    218/230 Test #218: testMultiProjectionFactor ..............   Passed    0.00 sec
            Start 219: testOccupancyGrid
    219/230 Test #219: testOccupancyGrid ......................   Passed    0.00 sec
            Start 220: testPoseBetweenFactor
    220/230 Test #220: testPoseBetweenFactor ..................   Passed    0.00 sec
            Start 221: testPosePriorFactor
    221/230 Test #221: testPosePriorFactor ....................   Passed    0.00 sec
            Start 222: testProjectionFactorPPP
    222/230 Test #222: testProjectionFactorPPP ................   Passed    0.00 sec
            Start 223: testProjectionFactorPPPC
    223/230 Test #223: testProjectionFactorPPPC ...............   Passed    0.00 sec
            Start 224: testRelativeElevationFactor
    224/230 Test #224: testRelativeElevationFactor ............   Passed    0.00 sec
            Start 225: testSmartRangeFactor
    225/230 Test #225: testSmartRangeFactor ...................   Passed    0.00 sec
            Start 226: testSmartStereoProjectionPoseFactor
    226/230 Test #226: testSmartStereoProjectionPoseFactor ....***Failed    0.00 sec
    /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/slam/tests/testSmartStereoProjectionPoseFactor: symbol lookup error: /home/crobinso/projects/gtsam-gtborg/build/gtsam_unstable/slam/tests/testSmartStereoProjectionPoseFactor: undefined symbol: _ZNK5gtsam14JacobianFactor13updateHessianERKSt6vectorImSaImEEPNS_20SymmetricBlockMatrixE
    
            Start 227: testTOAFactor
    227/230 Test #227: testTOAFactor ..........................   Passed    0.00 sec
            Start 228: testTSAMFactors
    228/230 Test #228: testTSAMFactors ........................   Passed    0.00 sec
            Start 229: testTransformBtwRobotsUnaryFactor
    229/230 Test #229: testTransformBtwRobotsUnaryFactor ......   Passed    0.00 sec
            Start 230: testTransformBtwRobotsUnaryFactorEM
    230/230 Test #230: testTransformBtwRobotsUnaryFactorEM ....   Passed    0.00 sec
    
    91% tests passed, 20 tests failed out of 230
    
    Total Test time (real) =   2.65 sec
    
    The following tests FAILED:
         35 - testEssentialMatrix (Failed)
         58 - testOrdering (SEGFAULT)
         62 - testSymbolicBayesTree (Failed)
         90 - testRegularHessianFactor (Failed)
         91 - testRegularJacobianFactor (Failed)
        110 - testEssentialMatrixConstraint (Failed)
        111 - testEssentialMatrixFactor (Failed)
        116 - testOrientedPlane3Factor (Failed)
        122 - testRegularImplicitSchurFactor (Failed)
        126 - testSmartProjectionCameraFactor (Failed)
        127 - testSmartProjectionPoseFactor (Failed)
        149 - testGaussianISAM2 (Failed)
        183 - testLPSolver (Failed)
        184 - testLinearEquality (Failed)
        185 - testQPSolver (Failed)
        200 - testConcurrentIncrementalFilter (Failed)
        201 - testConcurrentIncrementalSmootherDL (Failed)
        202 - testConcurrentIncrementalSmootherGN (Failed)
        205 - testNonlinearClusterTree (Failed)
        226 - testSmartStereoProjectionPoseFactor (Failed)
    Errors while running CTest
    CMakeFiles/check.dir/build.make:57: recipe for target 'CMakeFiles/check' failed
    make[3]: *** [CMakeFiles/check] Error 8
    CMakeFiles/Makefile2:635: recipe for target 'CMakeFiles/check.dir/all' failed
    make[2]: *** [CMakeFiles/check.dir/all] Error 2
    CMakeFiles/Makefile2:642: recipe for target 'CMakeFiles/check.dir/rule' failed
    make[1]: *** [CMakeFiles/check.dir/rule] Error 2
    Makefile:223: recipe for target 'check' failed
    make: *** [check] Error 2
    
  5. Callum Robinson reporter

    In reply to your question about GenericValue in gtsam.h the existing testSerialization.m has the test case for Pose2 and Point2 in the same Values vector:

    %% Create values and verify string serialization
    pose1=Pose2(0.5, 0.0, 0.2);
    pose2=Pose2(2.3, 0.1,-0.2);
    pose3=Pose2(4.1, 0.1, 0.1);
    landmark1=Point2(1.8, 2.1);
    landmark2=Point2(4.1, 1.8);
    
    %% Create and serialize Values
    values = Values;
    values.insert(i1, pose1);
    values.insert(i2, pose2);
    values.insert(i3, pose3);
    values.insert(j1, landmark1);
    values.insert(j2, landmark2);
    
    serialized_values = values.string_serialize();
    valuesds = Values.string_deserialize(serialized_values);
    CHECK('valuesds.equals(values, 1e-9)', valuesds.equals(values, 1e-9));
    

    This seems to work fine for me.

    Unfortunately I might struggle to test serializing in c++ and deserializing in matlab, last time I tried this I ran into issues caused by matlab having a different boost (older) version than my development environment. I have very little control over the version of boost I use due to dependencies with the rest of our code base.

  6. Mike Sheffler

    Unfortunately I might struggle to test serializing in c++ and deserializing in matlab, last time I tried this I ran into issues caused by matlab having a different boost (older) version than my development environment. I have very little control over the version of boost I use due to dependencies with the rest of our code base.

    I think I understand. I'll try your add of GenericValue and see where I am with respect to BearingRangeFactor. I'm a little shy to play with GenericValue before #401 gets resolved (I'm having that failure as well), but I think it will be okay.

  7. Mike Sheffler

    I tried adding

    #include <gtsam/base/GenericValue.h>
    template<T = {Vector, gtsam::Point2, gtsam::Point3, gtsam::Pose2, gtsam::Pose3, gtsam::Rot2}>
    virtual class GenericValue : gtsam::Value {
      void serializable() const;
    };
    

    which seemed to make the Values serialization work in MATLAB (I didn't try to cross-serialize -- serializing in C++ and deserializing in MATLAB or vice versa). Instead of BearingRangeFactor2D I tried working on RangeFactor2D, which seems to have the same problem, but has slightly fewer moving parts. The think the real issue with both of them is that they are both ExpressionFactor2s. Adding void serialize() const; to the class definition of RangeFactor switched things up a little bit; instead of getting an unregistered class exception, I got an unregistered void cast exception. It's worth noting that RangeFactorPose2 serializes just fine with string_serialize();-- this is just when I'm trying to serialize NonlinearFactorGraph with a RangeFactorPose2 in Values.

    I tried adding

    /** Serialization function */
      friend class boost::serialization::access;
      template<class ARCHIVE>
      void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
        ar & boost::serialization::make_nvp("NoiseModelFactor",
                boost::serialization::base_object<NoiseModelFactor>(*this));
        ar & boost::serialization::make_nvp("measured_", this->measured_);
    }
    };  // \ RangeFactor
    

    to the definition of RangeFactor in gtsam/sam/RangeFactor.h. I'm not sure what the right way to do this is. The unregistered void cast error seems to be telling me "You haven't declared a serialization method for a derived class that you want to be present, and RangeFactor is derived from ExpressionFactor2."

    Anyway, after doing that, and adding a RangeFactorPose2 to the graph, serializing did not complain. However, when I NonlinearFactorGraph.string_deserialize(graphds) the string produced by string_serialize(), the test

    serialized_graph = graph.string_serialize();
    graphds = NonlinearFactorGraph.string_deserialize(serialized_graph);
    CHECK('graphds.equals(graph, 1e-9)', graphds.equals(graph, 1e-9));
    

    the CHECK fails. Comparing the strings of graph and graphds

    a = graph.string_serialize
    b = graphds.string_serialize
    strcmp(a, b)
    

    the strings are identical. Printing each graph to the console suggests that they are the same as well, so something that is being used as an equals check is probably not implemented correctly, or something I can't see in MATLAB is different (probably because my serialization method for RangeFactor is wrong).

    Not sure yet.

    EDIT: 2018-11-20 1105 PST: Above, I wrote unregistered void class in a couple of places where I meant to write unregistered void cast. It's fixed now.

  8. Mike Sheffler

    I think I figured out what was wrong with my attempt above. The variable _dims was not being serialized and / or deserialized. I got a version working locally. I'm going to try to repair BearingRangeFactor2D and get testSerialization.m working. If I get it working, I'll submit a pull request.

  9. Mike Sheffler

    @dellaert I was wondering if you could offer some guidance.

    Summary: Serializing gtsam.Values in MATLAB is broken in a couple different ways. One fix that I tried fixes MATLAB, but breaks a test in C++ because an expression is not being created correctly on deserialization. If I do nothing, the C++ test passes, but the MATLAB remains broken. My theory is that my attempt to add the serialization to BearingRangeFactor is incorrect.

    Longer Here's the situation: serializing just about anything (maybe literally anything) added to gtsam.Values in MATLAB wasn't working. So, @crown_crobinso tried adding

    #include <gtsam/base/GenericValue.h>
    template<T = {Vector, gtsam::Point2, gtsam::Point3, gtsam::Pose2, gtsam::Pose3}>
    virtual class GenericValue : gtsam::Value {
      void serializable() const;
    };
    

    which works for most stuff.

    Trying to run testSerialization.m in MATLAB, a unregistered class exception is thrown when trying to serialize a gtsam.Values that has had a BearingRangeFactor2D added to it. I add

    // enabling serialization functionality
      void serialize() const;
    

    to the BearingRangeFactor definition in gtsam.h, and the error becomes unregistered void cast.

    Looking at, for instance, this, that error seems to indicate that ar & boost::serialization::base_object<>( *this ); is missing from the serialization function for the class. There is no serialization function for that class specifically, so I tried adding

    /** Serialization function */
      friend class boost::serialization::access;
      template<class ARCHIVE>
      void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
        ar & boost::serialization::make_nvp("NoiseModelFactor",
                boost::serialization::base_object<NoiseModelFactor>(*this));
        ar & boost::serialization::make_nvp("measured_", this->measured_);
        ar & boost::serialization::make_nvp("dims_", this->dims_);
      }
    };
    

    to the BearingRangeFactor class definition in gtsam/sam/BearingRangeFactor.h. This makes the MATLAB testSerialization.m test pass.

    However, doing that causes a test in gtsam/sam/tests/testBearingRangeFactor.cpp to fail:

    TEST(BearingRangeFactor, 2D) {
      // Serialize the factor
      std::string serialized = serializeXML(factor2D);
    
      // And de-serialize it
      BearingRangeFactor2D factor;
      deserializeXML(serialized, factor);
    
      // Set the linearization point
      Values values;
      values.insert(poseKey, Pose2(1.0, 2.0, 0.57));
      values.insert(pointKey, Point2(-4.0, 11.0));
    
      EXPECT_CORRECT_EXPRESSION_JACOBIANS(factor.expression(poseKey, pointKey),
                                          values, 1e-7, 1e-5);
      EXPECT_CORRECT_FACTOR_JACOBIANS(factor, values, 1e-7, 1e-5);
    }
    

    fails at EXPECT_CORRECT_FACTOR_JACOBIANS(factor, values, 1e-7, 1e-5);.

    What happens is that factor, which came from deserializeXml is not a real boy, so to speak; it has the values and dimensions of factor2D (which was serialized and then deserialized to create factor) but not the expression. The expression is not created during deserialization, I guess. In factor, expression_ -> root_ is null (expression_ being inherited from ExpressionFactor, and root_ being inherited from Expression), while in factor2D, expression_ -> root_ has four things under it. Basically, it's not null. There are two screenshots below of my debugger, just so that last bit makes sense.

    I tried modifying the serialization function by splitting it up into save and load and calling initialize to create the expression during deserialization. I don't know if I did it right, but it's probably moot because the code in load doesn't ever seem to be called.

        BOOST_SERIALIZATION_SPLIT_MEMBER()
    
        /// Save to an archive: just saves the base class
        template <class Archive>
        void save(Archive& ar, const unsigned int /*version*/) const {
          ar << BOOST_SERIALIZATION_BASE_OBJECT_NVP(NoiseModelFactor);
          ar << boost::serialization::make_nvp("measured_", this->measured_);
          ar << boost::serialization::make_nvp("keys_", this->keys_);
          ar << boost::serialization::make_nvp("dims_", this->dims_);
        }
    
        /// Load from an archive, creating a valid expression using the overloaded
        /// [expression] method
        template <class Archive>
        void load(Archive& ar, const unsigned int /*version*/) {
          ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(NoiseModelFactor);
          ar & boost::serialization::make_nvp("measured_", this->measured_);
          ar & boost::serialization::make_nvp("keys_", this->keys_);
          ar & boost::serialization::make_nvp("dims_", this->dims_);
    
          std::cout << "BearingRangeFactor load() is called" << std::endl;
    
          Expression<T> TempExpression = expression(this->keys_[0], this->keys_[1]);
    
          this->initialize(TempExpression);
    
          //this->initialize(expression(this->keys_[0], this->keys_[1]));
        }
    

    (of course, I removed void serialize before I added these two definitions). So, adding breakpoints and debugging statements, I don't see any evidence that load is ever called, so I don't think I'm doing something right.

    Screenshot from 2018-11-27 18-15-52.png

    Screenshot from 2018-11-27 18-14-41.png

  10. Frank Dellaert

    Wow, a lot of info to sort through :-) Let me ask

    1. I’m freaked out by the many failing tests with matlab toolbox on. Is that on develop?

    2. adding a factor to Values seems strange, is that a typo?

    3. Is this a Matlab issue only, or does c++ serialization fail with current develop?

    4. If so, can you create a branch off of develop with a minimal failing c++ test?

  11. Mike Sheffler

    Is that on develop?

    Yes.

    adding a factor to Values seems strange, is that a typo?

    It was what I meant to type, but it is wrong :) I should have said that the factor is added to a NonlinearFactorGraph

    Is this a Matlab issue only, or does c++ serialization fail with current develop?

    Just MATLAB. The C++ serialization seems to work fine, until I tried to mess with it. So, just to be clear, the C++ serialization seems to be working correctly.

    If so, can you create a branch off of develop with a minimal failing c++ test?

    I can make a branch of the fix I tried, which fixes MATLAB but breaks C++. That's probably less interesting ...

  12. Frank Dellaert

    So, I don’t get these failures on develop, on Mac, with matlab flag on... maybe it is a Windows issue.

    About serialization, I can have a look at it, but I am on my way to Australia so it will be a while. Cleary a solution that breaks C++ is a no-no :-)

    An interesting experiment would be to see whether the same issue exists for the cython wrapper...

  13. Mike Sheffler

    .. maybe it is a Windows issue.

    I haven't actually tried it on Windows. I'm having this problem on Ubuntu 16.04.

    An interesting experiment would be to see whether the same issue exists for the cython wrapper...

    Indeed. I have not tried that. I'm not set up for that, so if anyone wants to have a look, that would be great.

    My guess is that I'm missing something about the inheritance structure of the expression factors that is important to keep boost happy. The fact that the serialization works in C++ but not for MATLAB makes me think maybe I should be twiddling something in gtsam.h, but I'm not sure.

    Have fun in Australia!

  14. joeG

    same issue, testSerialization fail. Ubuntu 1404, matlab R2016a.

    when use ISAM2.update in .m file as below, isam2.update(graph_, initialEstimate_, FactorIndices);

    matlab will crash.

  15. Mike Sheffler

    Tests pass for MATLAB (via gtsam_tests/test_gtsam.m) and for C++ (via make check). Approved.

    I did not see the boost include order error coming; that's kind of scary.

  16. Log in to comment