Git Product home page Git Product logo

borglab / gtsam Goto Github PK

View Code? Open in Web Editor NEW
2.4K 2.4K 733.0 71.75 MB

GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision, using factor graphs and Bayes networks as the underlying computing paradigm rather than sparse matrices.

Home Page: http://gtsam.org

License: Other

CMake 2.48% C++ 76.65% C 0.20% Gnuplot 0.01% Mathematica 0.03% MATLAB 4.14% Shell 0.05% Python 11.29% Dockerfile 0.02% SWIG 2.13% Smarty 0.02% Makefile 0.13% Batchfile 0.06% XSLT 0.01% Jupyter Notebook 2.77%

gtsam's People

Contributors

acxz avatar akshay-krishnan avatar alexgc avatar amelim avatar ast0414 avatar ayushbaid avatar balderdash-devil avatar chrisbeall avatar dellaert avatar diffdecisiontrees avatar dongjing3309 avatar ellon avatar furgalep avatar gchenfc avatar iviorela avatar jlblancoc avatar johnwlambert avatar krunalchande avatar lucacarlone avatar lvzhaoyang avatar mikebosse avatar mpaluri avatar nikai avatar proffan avatar richardroberts avatar roderick-koehle avatar svwilliams avatar thduynguyen avatar varunagrawal avatar ydjian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtsam's Issues

testDoglegOptimizer fails with TBB

Fails on Ubuntu 16.04 with TBB 4.4.

TBB Warning: Exact exception propagation is requested by application but the linked library is built without support for it
/home/cbeall/git/gtsam/tests/testDoglegOptimizer.cpp:184: Failure: "Wrong exception: optimizer2.optimize(), expected: std::invalid_argument" 
There were 1 failures

Needs C++17 over-aligned new operator

While building tests:

/home/jlblanco/code/gtsam-jlblancoc/gtsam/nonlinear/Expression-inl.h: In instantiation of ‘gtsam::Expression<T>::Expression(const T&) [with T = gtsam::Unit3]’:
/home/jlblanco/code/gtsam-jlblancoc/gtsam/slam/tests/testEssentialMatrixFactor.cpp:149:39:   required from here
/home/jlblanco/code/gtsam-jlblancoc/gtsam/nonlinear/Expression-inl.h:32:11: warning: ‘new’ of type ‘gtsam::internal::ConstantExpression<gtsam::Unit3>’ with extended alignment 32 [-Waligned-new=]
     root_(new internal::ConstantExpression<T>(value)) {
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jlblanco/code/gtsam-jlblancoc/gtsam/nonlinear/Expression-inl.h:32:11: note: uses ‘void* operator new(std::size_t)’, which does not have an alignment parameter
/home/jlblanco/code/gtsam-jlblancoc/gtsam/nonlinear/Expression-inl.h:32:11: note: use ‘-faligned-new’ to enable C++17 over-aligned new support

Need to investigate a bit more, but it's likely due to Eigen memory constraints.

Are you ok with adding -faligned-new as a private/public flag to gtsam libraries to solve this? Otherwise, I guess this may lead to random crashes if "optimizing for native" is enabled.

Error when using find_package(GTSAM) inside CMakeLists.txt

I cloned the latest develop branch of GTSAM on Ubuntu 16.04 and tried importing it in another project. It throws off an error when importing GTSAM.

CMakeLists.txt looks like this:

cmake_minimum_required(VERSION 3.0.0)
project(gtsam_test)
find_package(GTSAM REQUIRED)

Error is in find_dependency() inside GTSAMConfig.cmake. The error is as follows:

-- The C compiler identification is GNU 5.5.0
-- The CXX compiler identification is GNU 5.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/share/cmake-3.5/Modules/CMakeFindDependencyMacro.cmake:45 (message):
  Invalid arguments to find_dependency
Call Stack (most recent call first):
  /usr/local/lib/cmake/GTSAM/GTSAMConfig.cmake:17 (find_dependency)
  CMakeLists.txt:3 (find_package)

Seems to be related to this issue and this issue.

strange optimization behavior on node/factor removal on tracking and filtering application

In order to avoid the ever growing factor graph problem, the oldest factors and nodes were removed from the graph and the remaining graph was given for optimization. The optimization works fine and outputs a filtered result till the node with ID - half of the latest id in the graph is removed from the graph. Once the node with id half of that of the latest node is removed, the co-variance matrix of the latest node will go to a high negative value(-10^12) and the nodes added incrementally after that will hold this same co-variance matrix value(-10^12) and no optimization happens. The structure of the graph is preserved along the process and verified(dot file). The node/factor removal starts with the oldest node with id 0 and is incrementally deleted and works as expected and is verified by printing it to dot file. Is there any work around to this problem? or is there any other standard procedure to address this issue?

Can't debug into gtsam source file

i compiled my own source files together with gtsam, i put my files in an independent fold.
i can't debug into gtsam source file.
My develop info:
Sys: Ubuntu 18.04
Boost: 1.65.1
Eigen:GTSAM_USE_SYSTEM_EIGEN( 3.3.7)

help please!

Restore default for dogleg

Adam on bitbucket said:

I propose a better value for the initial trust region radius of the DoglegOptimizer, which is defined by DoglegParams.deltaInitial. To close issue #452, it was suggested to change the default value of deltaInitial from 1 to 10. Indeed, that worked for the posted problem, but it appears that deltaInitial is defined in an absolute spatial scale. This new default value of deltaInitial causes a failure of the dogleg optimizer if the scale of the problem is multiplied by 10 (i.e. the vehicles are 6000 units apart instead of 600, they travel 30 units per time step instead of 3, and the standard deviations on distance traveled and inter-vehicle range are set to 0.1 units instead of 0.01)

It seems to me that it would be better to define the deltaInitial relative to the size of the full Gauss-Newton step on the first iteration (which is what I thought it meant when the default was set to 1, which is why I never thought to increase it). As far as I know, it is generally recommended to try the full GN step on the first iteration. However, changing the meaning of this parameter may surprise some folks that have set it manually for their application.

SmartProjectionFactor inconsistency

Description

Back in December, Nikolaus Mitchell (@mitch2na ??) ran into issues with the SmartProjectionFactor. The bug report is here: https://bitbucket.org/gtborg/gtsam/issues/411/smartposeprojfactor-error-with-sensor

I started looking into it but then got side-tracked. I have now come back to it and I feel that giving a sensor offset body_P_sensor to the SmartProjectionFactor does not make sense, and I think the current constructor should be deprecated to prevent confusion. Indeed, It does not make sense to optimize for a camera where the pose would not be the actual pose of the camera. An unfortunate consequence of deprecating this constructor means that we cannot optimize for individually varying camera calibrations when the camera is offset from the body pose. That would need a new factor with (body) pose and calibration as variables. However, that use case is unlikely: when a global offset is know, calibration is typically known.

Proposed remedy

Deprecate the constructor

valgrind error in testAHRSFactor

Just wanted to report it here for giving it a closer look. Perhaps it's a false positive.

Reproduce with: make testAHRSFactor.run.valgrind

Please, refer to the attached valgrind log.

log.txt

Unit tests Segfault w clang on Linux

clang Linux in Release has segfaults in 4 unit tests. Seems serialization related. I am not running clang on Linux so would appreciate some help from someone who does or has a docker image handy.

GTSAM_SINGLE_TEST_EXE option causes compile errors

Description

If the GTSAM_SINGLE_TEST_EXE option is enabled, then the unit tests fail to compile. For example, check.geometry will not compile under either Linux or Windows. It generates a "multiple definition" error

Steps to reproduce

  1. Turn on the GTSAM_SINGLE_TEST_EXE flag in cmake
  2. Run make check.geometry

Expected behavior

Expect the unit tests to compile without errors.

Environment

This occurs in both Windows and Linux. That said, the GTSAM_SINGLE_TEST_EXE is turned on by default in Windows, but is off by default in Linux. So, this is far more "noticeable" in Windows.

Additional information

Two questions really.

  1. Is there a reason this is turned on by default in Windows? Or a reason for this flag at all?
  2. There are a lot of duplicate tests as you go across the individual programs in "check.geometry" (and lots of other groups of "check" programs). Is there a reason for these duplicates? We can go through and make each test individually names, or we could remove some of the duplicates.

VectorValues::print

Seems values are printed in arbitrary (binary tree?) order. Should be ordered by key.

Eigen issue

Hello, thanks for your patience. I cloned the latest develop branch of GTSAM on Ubuntu 16.04 with Boost 1.58 and tried importing it in my project.

Part of CMakeLists.txt looks like this:

find_package(Boost COMPONENTS date_time serialization program_options thread system signals regex filesystem REQUIRED )  
find_package( Eigen3 REQUIRED )  
find_package( GTSAM REQUIRED )

include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${Boost_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR} 
${GTSAM_INCLUDE_DIR}
${TBB_INCLUDE_DIRS})

add_library(${PROJECT_NAME}  SHARED
src/factor_graph.cpp)

target_link_libraries(${PROJECT_NAME}
${EIGEN3_LIBS}
${GTSAM_LIBRARY_DIRS}
/usr/lib/x86_64-linux-gnu/libtbb.so)

target_link_libraries(${PROJECT_NAME}
${Boost_LIBRARIES} -lgtsam -ltbb)

factor_graph.cpp is a source code file where I put all factors I need.

This cmakelist worked smoothly and I got a executable. But when I run it, the system broke down, and throw off segment fault directly before step into the main function in executable.cpp file. Then I commented the line src/factor_graph.cpp in CMakeLists and rebuilt it. The executable could run again.

Did I import gtsam right? please help. thanks in advance!

Missing EIGEN_MAKE_ALIGNED_OPERATOR_NEW in some classes

Description

I am having non-consistent behaviour with using a memory-sanitizer (-fsanitize=address). I get different results for instance depending on when I run it locally on my machine versus running the same in a Docker... I suspect it has to do with the use of the EIGEN_MAKE_ALIGNED_OPERATOR_NEW-flag.

Eigen has a special define that should be used in classes that have Eigen-types as member variables: EIGEN_MAKE_ALIGNED_OPERATOR_NEW. Many GTSAM-classes have this; e.g. CombinedImuFactor.h and ImuBias.h, however, many do not have this flag even though they have Eigen-members: ImuFactor.h for instance. Some do not have it but inherit it from their parent class, e.g. ManifoldPreintegration.h does not have it, but its base-class PreintegrationBase.h does. And TangenPreintegration.h does have it (even though its base-class also has it).. Noteworthy is that none of the noisemodels use it.

Steps to reproduce

I do not have a minimal working example yet to share. If I build everything (gtsam & project) with Debug it is fine. However, using Release I get something like:

1: ==15494==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x607000000b20 in thread T0
1:     #0 0x7f02eeb3d7b8 in __interceptor_free (/usr/lib/x86_64-linux-gnu/libasan.so.4+0xde7b8)
1:     #1 0x7f02ee09a6ae in Eigen::internal::compute_inverse<Eigen::Matrix<double, -1, -1, 0, -1, -1>, Eigen::Matrix<double, -1, -1, 0, -1, -1>, -1>::run(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, Eigen::Matrix<double, -1, -1, 0, -1, -1>&) (/usr/local/lib/libgtsam.so.4+0x25d6ae)
1:     #2 0x7f02ee09675e in gtsam::noiseModel::Gaussian::Covariance(Eigen::Matrix<double, -1, -1, 0, -1, -1> const&, bool) (/usr/local/lib/libgtsam.so.4+0x25975e)
1:     #3 0x7f02ee14b581 in gtsam::CombinedImuFactor::CombinedImuFactor(unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, gtsam::PreintegratedCombinedMeasurements const&) (/usr/local/lib/libgtsam.so.4+0x30e581)

Expected behavior

No problems with the sanitizer in release.

Questions/next steps

I expect it works in Debug because it (probably?) prevents Eigen from doing its fancy alignment-moves..

Is the inconsistent use of EIGEN_MAKE_ALIGNED_OPERATOR_NEW with a purpose throughout GTSAM? If not, I am ok with working through as much of GTSAM as I can and add many of these Eigen-flags where appropriate. But I'd like some of your thoughts before I start a million-changes approach.

Any other ideas or clues?

Travis not triggered

Description

Travis request is not handled correctly in release branch.
Travis says: Not found: 942a4d852bc74f2d

Steps to reproduce

  1. push release/3.2.3 (where I added travis.yml and travis.sh)

Expected behavior

Travis does CI

Environment

Pushed from Mac, but irrelevant?

something wrong with gtsam/gtsam/geometry

When I try to make check,It occured
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Vector3 {aka const Eigen::Matrix<double, 3, 1>}’ to ‘gtsam::Point3&&’
/home/zss/gtsam/gtsam/geometry/Point3.h: In static member function ‘static gtsam::Point3 gtsam::Point3::Expmap(const Vector3&)’:
/home/zss/gtsam/gtsam/geometry/Point3.h:130:61: error: no matching function for call to ‘gtsam::Point3::Point3(const Vector3&)’
/home/zss/gtsam/gtsam/geometry/Point3.h:130:61: note: candidates are:
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: gtsam::Point3::Point3()
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: candidate expects 0 arguments, 1 provided
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Vector3 {aka const Eigen::Matrix<double, 3, 1>}’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Vector3 {aka const Eigen::Matrix<double, 3, 1>}’ to ‘gtsam::Point3&&’
In file included from /home/zss/gtsam/gtsam/geometry/Rot3.h:25:0,
from /home/zss/gtsam/gtsam/geometry/Pose3.h:24,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Unit3.h: In function ‘gtsam::Point3 gtsam::operator*(double, const gtsam::Unit3&)’:
/home/zss/gtsam/gtsam/geometry/Unit3.h:141:27: error: no matching function for call to ‘gtsam::Point3::Point3(const ScalarMultipleReturnType)’
/home/zss/gtsam/gtsam/geometry/Unit3.h:141:27: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/Pose3.h:23:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: gtsam::Point3::Point3()
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: candidate expects 0 arguments, 1 provided
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const ScalarMultipleReturnType {aka const Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op, const Eigen::Matrix<double, 3, 1> >}’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const ScalarMultipleReturnType {aka const Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple_op, const Eigen::Matrix<double, 3, 1> >}’ to ‘gtsam::Point3&&’
In file included from /home/zss/gtsam/gtsam/geometry/Pose3.h:24:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Rot3.h: In static member function ‘static gtsam::Rot3 gtsam::Rot3::AxisAngle(const gtsam::Unit3&, double)’:
/home/zss/gtsam/gtsam/geometry/Rot3.h:201:47: error: no matching function for call to ‘gtsam::Rot3::AxisAngle(gtsam::Vector3, double&)’
/home/zss/gtsam/gtsam/geometry/Rot3.h:201:47: note: candidates are:
/home/zss/gtsam/gtsam/geometry/Rot3.h:186:17: note: static gtsam::Rot3 gtsam::Rot3::AxisAngle(const gtsam::Point3&, double)
/home/zss/gtsam/gtsam/geometry/Rot3.h:186:17: note: no known conversion for argument 1 from ‘gtsam::Vector3 {aka Eigen::Matrix<double, 3, 1>}’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Rot3.h:200:17: note: static gtsam::Rot3 gtsam::Rot3::AxisAngle(const gtsam::Unit3&, double)
/home/zss/gtsam/gtsam/geometry/Rot3.h:200:17: note: no known conversion for argument 1 from ‘gtsam::Vector3 {aka Eigen::Matrix<double, 3, 1>}’ to ‘const gtsam::Unit3&’
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Pose3.h: In constructor ‘gtsam::Pose3::Pose3(const Matrix&)’:
/home/zss/gtsam/gtsam/geometry/Pose3.h:73:49: error: no matching function for call to ‘gtsam::Point3::Point3(const double&, const double&, const double&)’
/home/zss/gtsam/gtsam/geometry/Pose3.h:73:49: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/Pose3.h:23:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: gtsam::Point3::Point3()
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: candidate expects 0 arguments, 3 provided
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: candidate expects 1 argument, 3 provided
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: candidate expects 1 argument, 3 provided
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Pose3.h: In member function ‘gtsam::Pose3 gtsam::Pose3::operator*(const gtsam::Pose3&) const’:
/home/zss/gtsam/gtsam/geometry/Pose3.h:113:43: error: no matching function for call to ‘gtsam::Pose3::Pose3(gtsam::Rot3, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >)’
/home/zss/gtsam/gtsam/geometry/Pose3.h:113:43: note: candidates are:
/home/zss/gtsam/gtsam/geometry/Pose3.h:71:3: note: gtsam::Pose3::Pose3(const Matrix&)
/home/zss/gtsam/gtsam/geometry/Pose3.h:71:3: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Pose3.h:68:12: note: gtsam::Pose3::Pose3(const gtsam::Pose2&)
/home/zss/gtsam/gtsam/geometry/Pose3.h:68:12: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Pose3.h:63:3: note: gtsam::Pose3::Pose3(const gtsam::Rot3&, const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Pose3.h:63:3: note: no known conversion for argument 2 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Pose3.h:58:3: note: gtsam::Pose3::Pose3(const gtsam::Pose3&)
/home/zss/gtsam/gtsam/geometry/Pose3.h:58:3: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Pose3.h:55:2: note: gtsam::Pose3::Pose3()
/home/zss/gtsam/gtsam/geometry/Pose3.h:55:2: note: candidate expects 0 arguments, 2 provided
In file included from /home/zss/gtsam/gtsam/geometry/Pose2.h:25:0,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:22,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Rot2.h: In member function ‘gtsam::Point2 gtsam::Rot2::unit() const’:
/home/zss/gtsam/gtsam/geometry/Rot2.h:169:27: error: no matching function for call to ‘gtsam::Point2::Point2(const double&, const double&)’
/home/zss/gtsam/gtsam/geometry/Rot2.h:169:27: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point2.h:63:12: note: gtsam::Point2::Point2(const Vector2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:63:12: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:51:5: note: gtsam::Point2::Point2()
/home/zss/gtsam/gtsam/geometry/Point2.h:51:5: note: candidate expects 0 arguments, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2::Point2(const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2::Point2(gtsam::Point2&&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: candidate expects 1 argument, 2 provided
In file included from /home/zss/gtsam/gtsam/geometry/triangulation.h:22:0,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Pose2.h: In constructor ‘gtsam::Pose2::Pose2(double, double, double)’:
/home/zss/gtsam/gtsam/geometry/Pose2.h:69:40: error: no matching function for call to ‘gtsam::Point2::Point2(double&, double&)’
/home/zss/gtsam/gtsam/geometry/Pose2.h:69:40: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point2.h:63:12: note: gtsam::Point2::Point2(const Vector2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:63:12: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:51:5: note: gtsam::Point2::Point2()
/home/zss/gtsam/gtsam/geometry/Point2.h:51:5: note: candidate expects 0 arguments, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2::Point2(const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2::Point2(gtsam::Point2&&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: candidate expects 1 argument, 2 provided
In file included from /home/zss/gtsam/gtsam/geometry/triangulation.h:22:0,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Pose2.h: In constructor ‘gtsam::Pose2::Pose2(const Matrix&)’:
/home/zss/gtsam/gtsam/geometry/Pose2.h:82:59: error: no matching function for call to ‘gtsam::Point2::Point2(const double&, const double&)’
/home/zss/gtsam/gtsam/geometry/Pose2.h:82:59: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point2.h:63:12: note: gtsam::Point2::Point2(const Vector2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:63:12: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:51:5: note: gtsam::Point2::Point2()
/home/zss/gtsam/gtsam/geometry/Point2.h:51:5: note: candidate expects 0 arguments, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2::Point2(const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2::Point2(gtsam::Point2&&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: candidate expects 1 argument, 2 provided
In file included from /home/zss/gtsam/gtsam/geometry/triangulation.h:22:0,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Pose2.h: In member function ‘gtsam::Pose2 gtsam::Pose2::operator*(const gtsam::Pose2&) const’:
/home/zss/gtsam/gtsam/geometry/Pose2.h:117:43: error: no matching function for call to ‘gtsam::Pose2::Pose2(gtsam::Rot2, const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, 2, 1> >)’
/home/zss/gtsam/gtsam/geometry/Pose2.h:117:43: note: candidates are:
/home/zss/gtsam/gtsam/geometry/Pose2.h:91:3: note: gtsam::Pose2::Pose2(const Vector&)
/home/zss/gtsam/gtsam/geometry/Pose2.h:91:3: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Pose2.h:81:3: note: gtsam::Pose2::Pose2(const Matrix&)
/home/zss/gtsam/gtsam/geometry/Pose2.h:81:3: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Pose2.h:78:3: note: gtsam::Pose2::Pose2(const gtsam::Rot2&, const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Pose2.h:78:3: note: no known conversion for argument 2 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, 2, 1> >’ to ‘const gtsam::Point2&’
/home/zss/gtsam/gtsam/geometry/Pose2.h:73:3: note: gtsam::Pose2::Pose2(double, const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Pose2.h:73:3: note: no known conversion for argument 1 from ‘gtsam::Rot2’ to ‘double’
/home/zss/gtsam/gtsam/geometry/Pose2.h:68:3: note: gtsam::Pose2::Pose2(double, double, double)
/home/zss/gtsam/gtsam/geometry/Pose2.h:68:3: note: candidate expects 3 arguments, 2 provided
/home/zss/gtsam/gtsam/geometry/Pose2.h:60:3: note: gtsam::Pose2::Pose2(const gtsam::Pose2&)
/home/zss/gtsam/gtsam/geometry/Pose2.h:60:3: note: candidate expects 1 argument, 2 provided
/home/zss/gtsam/gtsam/geometry/Pose2.h:55:3: note: gtsam::Pose2::Pose2()
/home/zss/gtsam/gtsam/geometry/Pose2.h:55:3: note: candidate expects 0 arguments, 2 provided
/home/zss/gtsam/gtsam/geometry/triangulation.cpp: In function ‘gtsam::Point3 gtsam::triangulateDLT(const std::vector<Eigen::Matrix<double, 3, 4> >&, const std::vectorgtsam::Point2&, double)’:
/home/zss/gtsam/gtsam/geometry/triangulation.cpp:62:35: error: no matching function for call to ‘gtsam::Point3::Point3(const Eigen::CwiseUnaryOp<Eigen::internal::scalar_quotient1_op, const Eigen::Block<Eigen::Matrix<double, 4, 1>, 3, 1, false> >)’
/home/zss/gtsam/gtsam/geometry/triangulation.cpp:62:35: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/Pose3.h:23:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: gtsam::Point3::Point3()
/home/zss/gtsam/gtsam/geometry/Point3.h:56:5: note: candidate expects 0 arguments, 1 provided
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseUnaryOp<Eigen::internal::scalar_quotient1_op, const Eigen::Block<Eigen::Matrix<double, 4, 1>, 3, 1, false> >’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3::Point3(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseUnaryOp<Eigen::internal::scalar_quotient1_op, const Eigen::Block<Eigen::Matrix<double, 4, 1>, 3, 1, false> >’ to ‘gtsam::Point3&&’
In file included from /home/zss/gtsam/gtsam/geometry/Point2.h:20:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/base/VectorSpace.h: In instantiation of ‘gtsam::internal::HasVectorSpacePrereqs::~HasVectorSpacePrereqs() [with Class = gtsam::Point2]’:
/usr/include/boost/concept/detail/general.hpp:38:28: required from ‘static void boost::concepts::requirement<boost::concepts::failed************ Model::>::failed() [with Model = gtsam::internal::HasVectorSpacePrereqsgtsam::Point2]’
/home/zss/gtsam/gtsam/base/VectorSpace.h:188:1: required from ‘struct gtsam::internal::VectorSpaceTraitsgtsam::Point2’
/home/zss/gtsam/gtsam/base/VectorSpace.h:207:8: required from ‘struct gtsam::internal::VectorSpacegtsam::Point2’
/home/zss/gtsam/gtsam/geometry/Point2.h:149:42: required from here
/home/zss/gtsam/gtsam/base/VectorSpace.h:173:5: error: no match for ‘operator=’ in ‘((gtsam::internal::HasVectorSpacePrereqsgtsam::Point2)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point2::q = Eigen::MatrixBase::operator+(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Matrix<double, 2, 1>; Derived = Eigen::Matrix<double, 2, 1>; typename Eigen::internal::traits::Scalar = double](((const Eigen::MatrixBase<Eigen::Matrix<double, 2, 1> >)(&((gtsam::internal::HasVectorSpacePrereqsgtsam::Point2)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point2::p)))’
/home/zss/gtsam/gtsam/base/VectorSpace.h:173:5: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2& gtsam::Point2::operator=(const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, 2, 1> >’ to ‘const gtsam::Point2&’
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2& gtsam::Point2::operator=(gtsam::Point2&&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, 2, 1> >’ to ‘gtsam::Point2&&’
In file included from /home/zss/gtsam/gtsam/geometry/Point2.h:20:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/base/VectorSpace.h:174:5: error: no match for ‘operator=’ in ‘((gtsam::internal::HasVectorSpacePrereqsgtsam::Point2)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point2::q = Eigen::MatrixBase::operator-(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Matrix<double, 2, 1>; Derived = Eigen::Matrix<double, 2, 1>; typename Eigen::internal::traits::Scalar = double](((const Eigen::MatrixBase<Eigen::Matrix<double, 2, 1> >)(&((gtsam::internal::HasVectorSpacePrereqsgtsam::Point2)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point2::p)))’
/home/zss/gtsam/gtsam/base/VectorSpace.h:174:5: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2& gtsam::Point2::operator=(const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, 2, 1> >’ to ‘const gtsam::Point2&’
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2& gtsam::Point2::operator=(gtsam::Point2&&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, 2, 1> >’ to ‘gtsam::Point2&&’
In file included from /home/zss/gtsam/gtsam/geometry/Point2.h:20:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/base/VectorSpace.h:176:5: error: no match for ‘operator=’ in ‘((gtsam::internal::HasVectorSpacePrereqsgtsam::Point2)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point2::q = Eigen::MatrixBase::operator+(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Matrix<double, -1, 1>; Derived = Eigen::Matrix<double, 2, 1>; typename Eigen::internal::traits::Scalar = double](((const Eigen::MatrixBase<Eigen::Matrix<double, -1, 1> >)(&((gtsam::internal::HasVectorSpacePrereqsgtsam::Point2)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point2::v)))’
/home/zss/gtsam/gtsam/base/VectorSpace.h:176:5: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22:0,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2& gtsam::Point2::operator=(const gtsam::Point2&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, -1, 1> >’ to ‘const gtsam::Point2&’
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: gtsam::Point2& gtsam::Point2::operator=(gtsam::Point2&&)
/home/zss/gtsam/gtsam/geometry/Point2.h:40:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 2, 1>, const Eigen::Matrix<double, -1, 1> >’ to ‘gtsam::Point2&&’
In file included from /home/zss/gtsam/gtsam/geometry/Point2.h:20:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/base/VectorSpace.h: In instantiation of ‘gtsam::internal::HasVectorSpacePrereqs::~HasVectorSpacePrereqs() [with Class = gtsam::Point3]’:
/usr/include/boost/concept/detail/general.hpp:38:28: required from ‘static void boost::concepts::requirement<boost::concepts::failed************ Model::>::failed() [with Model = gtsam::internal::HasVectorSpacePrereqsgtsam::Point3]’
/home/zss/gtsam/gtsam/base/VectorSpace.h:188:1: required from ‘struct gtsam::internal::VectorSpaceTraitsgtsam::Point3’
/home/zss/gtsam/gtsam/base/VectorSpace.h:207:8: required from ‘struct gtsam::internal::VectorSpacegtsam::Point3’
/home/zss/gtsam/gtsam/geometry/Point3.h:151:42: required from here
/home/zss/gtsam/gtsam/base/VectorSpace.h:173:5: error: no match for ‘operator=’ in ‘((gtsam::internal::HasVectorSpacePrereqsgtsam::Point3)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point3::q = Eigen::MatrixBase::operator+(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Matrix<double, 3, 1>; Derived = Eigen::Matrix<double, 3, 1>; typename Eigen::internal::traits::Scalar = double](((const Eigen::MatrixBase<Eigen::Matrix<double, 3, 1> >)(&((gtsam::internal::HasVectorSpacePrereqsgtsam::Point3)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point3::p)))’
/home/zss/gtsam/gtsam/base/VectorSpace.h:173:5: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/Pose3.h:23:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3& gtsam::Point3::operator=(const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3& gtsam::Point3::operator=(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >’ to ‘gtsam::Point3&&’
In file included from /home/zss/gtsam/gtsam/geometry/Point2.h:20:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/base/VectorSpace.h:174:5: error: no match for ‘operator=’ in ‘((gtsam::internal::HasVectorSpacePrereqsgtsam::Point3)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point3::q = Eigen::MatrixBase::operator-(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Matrix<double, 3, 1>; Derived = Eigen::Matrix<double, 3, 1>; typename Eigen::internal::traits::Scalar = double](((const Eigen::MatrixBase<Eigen::Matrix<double, 3, 1> >)(&((gtsam::internal::HasVectorSpacePrereqsgtsam::Point3)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point3::p)))’
/home/zss/gtsam/gtsam/base/VectorSpace.h:174:5: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/Pose3.h:23:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3& gtsam::Point3::operator=(const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3& gtsam::Point3::operator=(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_difference_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, 3, 1> >’ to ‘gtsam::Point3&&’
In file included from /home/zss/gtsam/gtsam/geometry/Point2.h:20:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/base/VectorSpace.h:176:5: error: no match for ‘operator=’ in ‘((gtsam::internal::HasVectorSpacePrereqsgtsam::Point3)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point3::q = Eigen::MatrixBase::operator+(const Eigen::MatrixBase&) const [with OtherDerived = Eigen::Matrix<double, -1, 1>; Derived = Eigen::Matrix<double, 3, 1>; typename Eigen::internal::traits::Scalar = double](((const Eigen::MatrixBase<Eigen::Matrix<double, -1, 1> >)(&((gtsam::internal::HasVectorSpacePrereqsgtsam::Point3)this)->gtsam::internal::HasVectorSpacePrereqsgtsam::Point3::v)))’
/home/zss/gtsam/gtsam/base/VectorSpace.h:176:5: note: candidates are:
In file included from /home/zss/gtsam/gtsam/geometry/Pose3.h:23:0,
from /home/zss/gtsam/gtsam/geometry/CalibratedCamera.h:23,
from /home/zss/gtsam/gtsam/geometry/PinholePose.h:22,
from /home/zss/gtsam/gtsam/geometry/PinholeCamera.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.h:21,
from /home/zss/gtsam/gtsam/geometry/triangulation.cpp:19:
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3& gtsam::Point3::operator=(const gtsam::Point3&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, -1, 1> >’ to ‘const gtsam::Point3&’
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: gtsam::Point3& gtsam::Point3::operator=(gtsam::Point3&&)
/home/zss/gtsam/gtsam/geometry/Point3.h:45:20: note: no known conversion for argument 1 from ‘const Eigen::CwiseBinaryOp<Eigen::internal::scalar_sum_op, const Eigen::Matrix<double, 3, 1>, const Eigen::Matrix<double, -1, 1> >’ to ‘gtsam::Point3&&’
/home/zss/gtsam/gtsam/geometry/triangulation.cpp:63:1: warning: control reaches end of non-void function [-Wreturn-type]
make[3]: *** [gtsam/CMakeFiles/gtsam.dir/geometry/triangulation.cpp.o] Error 1
make[2]: *** [gtsam/CMakeFiles/gtsam.dir/all] Error 2
make[1]: *** [CMakeFiles/check.dir/rule] Error 2
make: *** [check] Error 2
What should I do? many thanks!!!

build error

Hi, all,

I got the following build error:

[ 35%] Building CXX object gtsam/CMakeFiles/gtsam.dir/geometry/StereoCamera.cpp.o
[ 35%] Building CXX object gtsam/CMakeFiles/gtsam.dir/geometry/StereoPoint2.cpp.o
[ 38%] Building CXX object gtsam/CMakeFiles/gtsam.dir/geometry/Unit3.cpp.o
[ 38%] Building CXX object gtsam/CMakeFiles/gtsam.dir/geometry/triangulation.cpp.o
In file included from /data/code9/gtsam/gtsam/nonlinear/LevenbergMarquardtOptimizer.h:25:0,
                 from /data/code9/gtsam/gtsam/geometry/triangulation.cpp:22:
/data/code9/gtsam/gtsam/linear/VectorValues.h: In member function ‘std::pair<tbb::interface5::internal::solist_iterator<tbb::interface5::internal::split_ordered_list<std::pair<const long unsigned int, Eigen::Matrix<double, -1, 1> >, tbb::tbb_allocator<std::pair<const long unsigned int, Eigen::Matrix<double, -1, 1> > > >, std::pair<const long unsigned int, Eigen::Matrix<double, -1, 1> > >, bool> gtsam::VectorValues::tryInsert(gtsam::Key, const Vector&)’:
/data/code9/gtsam/gtsam/linear/VectorValues.h:200:22: error: ‘gtsam::VectorValues::Values {aka class gtsam::ConcurrentMap<long unsigned int, Eigen::Matrix<double, -1, 1> >}’ has no member named ‘emplace’
       return values_.emplace(j, value); 
                      ^
make[2]: *** [gtsam/CMakeFiles/gtsam.dir/geometry/triangulation.cpp.o] Error 1
make[1]: *** [gtsam/CMakeFiles/gtsam.dir/all] Error 2
make: *** [all] Error 2

Here is the cmake log.

Any hints to solve this problem?

THX!

Authorize reviewable

@dellaert I'm using reviewable.io, it's a great tool to review PRs on github. Could you help authorize the app so I can push my replies/comments from there? Thanks!

image

Feature Request: Make uninstall option

Hello,

Just a feature request. It would be great to have a make uninstall option. I uninstall gtsam (e.g. to upgrade to a new version) by using rm `cat install_manifest.txt` but an uninstall option would be helpful.

Thanks!
David

Make check fails because of GeographicLib

make check seems to fail on Mac, with default options, because of a link error. I think this might have been the recent PR? Maybe it's my version? But cmake did not complain :-)

[ 74%] Building CXX object gtsam/navigation/tests/CMakeFiles/testGeographicLib.dir/testGeographicLib.cpp.o
[ 74%] Linking CXX executable testGeographicLib
Undefined symbols for architecture x86_64:
  "GeographicLib::Geocentric::WGS84()", referenced from:
      __GLOBAL__sub_I_testGeographicLib.cpp in testGeographicLib.cpp.o
  "GeographicLib::UTMUPS::EncodeZone(int, bool, bool)", referenced from:
      GeographicLibUTMTest::run(TestResult&) in testGeographicLib.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[3]: *** [gtsam/navigation/tests/testGeographicLib] Error 1
make[2]: *** [gtsam/navigation/tests/CMakeFiles/testGeographicLib.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....

Linux Packaging

Feature

It would be great to have gtsam as a GNU/Linux package.

Motivation

Being able to sudo apt install gtsam will make it easy to install and develop on the gtsam library. Building from source does take a significant amount of time and is tedious. Having a precompiled package on for example, https://launchpad.net/, will speed this up and allow the development group to be more in control of the release versions available to the users.

Pitch

Have packages for widely available GNU/Linux distributions, such as Debian, Ubuntu, etc.
EDIT: There is a gtsam package maintained by the community for Arch Linux already here.

Alternatives

N/A

Additional context

N/A

Boost warning

before tagging GTSAM 4, I want to get rid of boost rvalue warning. I think the issue is that we are sometimes allowing boost::optional of references, which BTW caused some segfaults for me in the past: to fix I had to allocate the optional thing on the stack first.

Expression problem

Address Brice's compile problems (reported in Google groups) by patching slam/expressions.h like so:

namespace internal {
Rot3 rotation(const Pose3& pose, OptionalJacobian<3, 6> H) {
  return pose.rotation(H);
}
}  // namespace internal

inline Rot3_ rotation(const Pose3_& pose) { return Rot3_(internal::rotation, pose); }

TEST(SlamExpressions, rotation) {
  Pose3_ T_(0);
  const Rot3_ R_ = rotation(T_);
}

/* ************************************************************************* */
TEST(SlamExpressions, unrotate) {
  Rot3_ R_(0);
  Point3_ p_(1);
  const Point3_ q_ = unrotate(R_, p_);
}

"make doc" does not work

Typing "make doc" in the build directory does not work (instruction given in INSTALL.md)

I generated a build directory in doc folder and did cmake .. and make and that gave the following error
/bin/sh: 1:/path_to_doc_dir/build/Doxyfile: Permission denied

Is there anything I am missing out?

IndeterminantLinearSystemException for big numbers

Description

Hi !

I'm trying to use gtsam with big values for long car trajectory. The program thrown with this error
terminate called after throwing an instance of 'gtsam::IndeterminantLinearSystemException' what(): Indeterminant linear system detected while working near variable 5 (Symbol: 5). when using big numbers.

To show it's not a underconstrained variables problem, I made some change to Pose2SLAMExample to get 2 different examples with one that works and the other that crash.
Here are the 2 part of code :

  1. THE CODE THAT WORKS FINE :
noiseModel::Diagonal::shared_ptr priorNoise = noiseModel::Diagonal::Sigmas(Vector3(3e-6, 3e-6, 1e-3));
  graph.emplace_shared<PriorFactor<Pose2> >(1, Pose2(0, 0, 0), priorNoise);

  // For simplicity, we will use the same noise model for odometry and loop closures
  noiseModel::Diagonal::shared_ptr model = noiseModel::Diagonal::Sigmas(Vector3(2e-6, 2e-6, 1e-3));

  // 2b. Add odometry factors
  // Create odometry (Between) factors between consecutive poses
  graph.emplace_shared<BetweenFactor<Pose2> >(1, 2, Pose2(20000, 0, 0     ), model);
  graph.emplace_shared<BetweenFactor<Pose2> >(2, 3, Pose2(20000, 0, M_PI_2), model);
  graph.emplace_shared<BetweenFactor<Pose2> >(3, 4, Pose2(20000, 0, M_PI_2), model);
  graph.emplace_shared<BetweenFactor<Pose2> >(4, 5, Pose2(20000, 0, M_PI_2), model);

  // 2c. Add the loop closure constraint
  // This factor encodes the fact that we have returned to the same pose. In real systems,
  // these constraints may be identified in many ways, such as appearance-based techniques
  // with camera images. We will use another Between Factor to enforce this constraint:
  graph.emplace_shared<BetweenFactor<Pose2> >(5, 2, Pose2(20000, 0, M_PI_2), model);
  graph.print("\nFactor Graph:\n"); // print

  // 3. Create the data structure to hold the initialEstimate estimate to the solution
  // For illustrative purposes, these have been deliberately set to incorrect values
  Values initialEstimate;
  initialEstimate.insert(1, Pose2(50000,     0,  0.2   ));
  initialEstimate.insert(2, Pose2(23000,  1000, -0.2   ));
  initialEstimate.insert(3, Pose2(41000,  1000,  M_PI_2));
  initialEstimate.insert(4, Pose2(40000, 20000,  M_PI  ));
  initialEstimate.insert(5, Pose2(21000, 21000, -M_PI_2)); 
  1. THE CODE THAT CRASH :
noiseModel::Diagonal::shared_ptr priorNoise = noiseModel::Diagonal::Sigmas(Vector3(3e-6, 3e-6, 1e-3));
  graph.emplace_shared<PriorFactor<Pose2> >(1, Pose2(0, 0, 0), priorNoise);

  // For simplicity, we will use the same noise model for odometry and loop closures
  noiseModel::Diagonal::shared_ptr model = noiseModel::Diagonal::Sigmas(Vector3(2e-6, 2e-6, 1e-3));

  // 2b. Add odometry factors
  // Create odometry (Between) factors between consecutive poses
  graph.emplace_shared<BetweenFactor<Pose2> >(1, 2, Pose2(200000, 0, 0     ), model);
  graph.emplace_shared<BetweenFactor<Pose2> >(2, 3, Pose2(200000, 0, M_PI_2), model);
  graph.emplace_shared<BetweenFactor<Pose2> >(3, 4, Pose2(200000, 0, M_PI_2), model);
  graph.emplace_shared<BetweenFactor<Pose2> >(4, 5, Pose2(200000, 0, M_PI_2), model);

  // 2c. Add the loop closure constraint
  // This factor encodes the fact that we have returned to the same pose. In real systems,
  // these constraints may be identified in many ways, such as appearance-based techniques
  // with camera images. We will use another Between Factor to enforce this constraint:
  graph.emplace_shared<BetweenFactor<Pose2> >(5, 2, Pose2(200000, 0, M_PI_2), model);
  graph.print("\nFactor Graph:\n"); // print

  // 3. Create the data structure to hold the initialEstimate estimate to the solution
  // For illustrative purposes, these have been deliberately set to incorrect values
  Values initialEstimate;
  initialEstimate.insert(1, Pose2(500000,     0,  0.2   ));
  initialEstimate.insert(2, Pose2(203000,  1000, -0.2   ));
  initialEstimate.insert(3, Pose2(401000,  1000,  M_PI_2));
  initialEstimate.insert(4, Pose2(400000, 200000,  M_PI  ));
  initialEstimate.insert(5, Pose2(201000, 201000, -M_PI_2));

Hypothesis

In my opinion, the problem is that the graph use big values with very little noise and approximation are done to be able to use float for example.

You may be able to confirm my guess and peraps suggest solutions ?

Thank you very much,
Clément

TimeTBB example: no speedup - actually slower by a factor X20

Description

When running the example: TimeTBB.cpp, here are the results:

numberOfProblems = 1000000
problemSize = 4
With 1 threads:
Without memory allocation, grain size = 1, time = 0.284984
Without memory allocation, grain size = 10, time = 0.279206
Without memory allocation, grain size = 100, time = 0.256432
Without memory allocation, grain size = 1000, time = 0.253955
With memory allocation, grain size = 1, time = 0.422034
With memory allocation, grain size = 10, time = 0.444783
With memory allocation, grain size = 100, time = 0.437323
With memory allocation, grain size = 1000, time = 0.418359

With 4 threads:
Without memory allocation, grain size = 1, time = 4.46345
Without memory allocation, grain size = 10, time = 4.58412
Without memory allocation, grain size = 100, time = 4.66668
Without memory allocation, grain size = 1000, time = 4.60369
With memory allocation, grain size = 1, time = 5.07619
With memory allocation, grain size = 10, time = 5.38483
With memory allocation, grain size = 100, time = 5.23105
With memory allocation, grain size = 1000, time = 5.28864

With 8 threads:
Without memory allocation, grain size = 1, time = 5.24027
Without memory allocation, grain size = 10, time = 5.25576
Without memory allocation, grain size = 100, time = 5.2626
Without memory allocation, grain size = 1000, time = 5.25358
With memory allocation, grain size = 1, time = 5.95175
With memory allocation, grain size = 10, time = 5.93275
With memory allocation, grain size = 100, time = 5.92773
With memory allocation, grain size = 1000, time = 5.93785

Summary of results:
4 threads, without allocation, grain size = 1, speedup = 0.0638485
4 threads, without allocation, grain size = 10, speedup = 0.0609071
4 threads, without allocation, grain size = 100, speedup = 0.0549497
4 threads, without allocation, grain size = 1000, speedup = 0.0551635
4 threads, with allocation, grain size = 1, speedup = 0.0831399
4 threads, with allocation, grain size = 10, speedup = 0.0825993
4 threads, with allocation, grain size = 100, speedup = 0.0836012
4 threads, with allocation, grain size = 1000, speedup = 0.0791052
8 threads, without allocation, grain size = 1, speedup = 0.0543836
8 threads, without allocation, grain size = 10, speedup = 0.0531238
8 threads, without allocation, grain size = 100, speedup = 0.0487273
8 threads, without allocation, grain size = 1000, speedup = 0.0483396
8 threads, with allocation, grain size = 1, speedup = 0.0709091
8 threads, with allocation, grain size = 10, speedup = 0.0749709
8 threads, with allocation, grain size = 100, speedup = 0.0737758
8 threads, with allocation, grain size = 1000, speedup = 0.0704562

Steps to reproduce

Just run the example.

Expected behavior

i would expect some speedup, and not a slow down...

Environment

Linux 16.04
Intel i7

Here is my CMAKE output:

-- GTSAM_SOURCE_ROOT_DIR: [/home/izzys/samples/gtsam_samples]
-- Boost version: 1.58.0
-- Found the following Boost libraries:
-- serialization
-- system
-- filesystem
-- thread
-- program_options
-- date_time
-- timer
-- chrono
-- regex
-- atomic
-- GTSAM_BOOST_LIBRARIES: optimized;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_system.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_thread.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;optimized;/usr/lib/x86_64-linux-gnu/libboost_regex.so;debug;/usr/lib/x86_64-linux-gnu/libboost_serialization.so;debug;/usr/lib/x86_64-linux-gnu/libboost_system.so;debug;/usr/lib/x86_64-linux-gnu/libboost_filesystem.so;debug;/usr/lib/x86_64-linux-gnu/libboost_thread.so;debug;/usr/lib/x86_64-linux-gnu/libboost_date_time.so;debug;/usr/lib/x86_64-linux-gnu/libboost_regex.so
Ignoring Boost restriction on optional lvalue assignment from rvalues
-- Found Eigen version: 3.3.7
-- Building 3rdparty
-- checking for thread-local storage - found
-- Could NOT find GeographicLib (missing: GeographicLib_LIBRARY_DIRS GeographicLib_LIBRARIES GeographicLib_INCLUDE_DIRS)
-- Building base
-- Building geometry
-- Building inference
-- Building symbolic
-- Building discrete
-- Building linear
-- Building nonlinear
-- Building sam
-- Building sfm
-- Building slam
-- Building smart
-- Building navigation
-- GTSAM Version: 4.0.0
-- Install prefix: /usr/local
-- Building GTSAM - shared: ON
-- Wrote /home/tc34738/samples/gtsam_samples/gtsam-build/GTSAMConfig.cmake
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE)
-- ===============================================================
-- ================ Configuration Options ======================
-- CMAKE_CXX_COMPILER_ID type : GNU
-- CMAKE_CXX_COMPILER_VERSION : 5.4.0
-- CMake version : 3.5.1
-- CMake generator : Unix Makefiles
-- CMake build tool : /usr/bin/make
-- Build flags
-- Build Tests : Enabled
-- Build examples with 'make all' : Enabled
-- Build timing scripts with 'make all': Disabled
-- Build shared GTSAM libraries : Enabled
-- Put build type in library name : Enabled
-- Build libgtsam_unstable : Disabled
-- Build for native architecture : Enabled
-- Build type : Release
-- C compilation flags : -O3 -DNDEBUG
-- C++ compilation flags : -O3 -DNDEBUG
-- GTSAM_COMPILE_FEATURES_PUBLIC :
-- GTSAM_COMPILE_OPTIONS_PRIVATE : -Wall;$<$CONFIG:Debug:-g;-fno-inline>;$<$CONFIG:Release:-O3>;$<$CONFIG:Timing:-g;-O3>;$<$CONFIG:Profiling:-O3>;$<$CONFIG:RelWithDebInfo:-g;-O3>;-Wno-unused-local-typedefs
-- GTSAM_COMPILE_OPTIONS_PUBLIC : $&lt;$&lt;COMPILE_LANGUAGE:CXX>:-std=c++11>;-march=native
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE : $<$CONFIG:Debug:_DEBUG;EIGEN_INITIALIZE_MATRICES_BY_NAN>;$<$CONFIG:Release:NDEBUG>;$<$CONFIG:Timing:NDEBUG;ENABLE_TIMING>;$<$CONFIG:Profiling:NDEBUG>;$<$CONFIG:RelWithDebInfo:NDEBUG>
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC : BOOST_OPTIONAL_ALLOW_BINDING_TO_RVALUES;BOOST_OPTIONAL_CONFIG_ALLOW_BINDING_TO_RVALUES
-- GTSAM_COMPILE_OPTIONS_PRIVATE_DEBUG : -g;-fno-inline
-- GTSAM_COMPILE_OPTIONS_PUBLIC_DEBUG :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_DEBUG : _DEBUG;EIGEN_INITIALIZE_MATRICES_BY_NAN
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_DEBUG :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_RELEASE : -O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_RELEASE :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_RELEASE : NDEBUG
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_RELEASE :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_TIMING : -g;-O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_TIMING :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_TIMING : NDEBUG;ENABLE_TIMING
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_TIMING :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_PROFILING : -O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_PROFILING :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_PROFILING : NDEBUG
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_PROFILING :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_RELWITHDEBINFO : -g;-O3
-- GTSAM_COMPILE_OPTIONS_PUBLIC_RELWITHDEBINFO :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_RELWITHDEBINFO : NDEBUG
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_RELWITHDEBINFO :
-- GTSAM_COMPILE_OPTIONS_PRIVATE_MINSIZEREL :
-- GTSAM_COMPILE_OPTIONS_PUBLIC_MINSIZEREL :
-- GTSAM_COMPILE_DEFINITIONS_PRIVATE_MINSIZEREL :
-- GTSAM_COMPILE_DEFINITIONS_PUBLIC_MINSIZEREL :
-- Use System Eigen : OFF (Using version: 3.3.7)
-- Use Intel TBB : Yes
-- Eigen will use MKL : MKL found but GTSAM_WITH_EIGEN_MKL is disabled
-- Eigen will use MKL and OpenMP : OpenMP found but GTSAM_WITH_EIGEN_MKL is disabled
-- Default allocator : TBB
-- Build with ccache : No
-- Packaging flags
-- CPack Source Generator : TGZ
-- CPack Generator : TGZ
-- GTSAM flags
-- Quaternions as default Rot3 : Disabled
-- Runtime consistency checking : Disabled
-- Rot3 retract is full ExpMap : Disabled
-- Pose3 retract is full ExpMap : Disabled
-- Deprecated in GTSAM 4 allowed : Enabled
-- Point3 is typedef to Vector3 : Disabled
-- Metis-based Nested Dissection : Enabled
-- Use tangent-space preintegration: Enabled
-- Build Wrap : Disabled
-- MATLAB toolbox flags
-- Install matlab toolbox : Disabled
-- Cython toolbox flags
-- Install Cython toolbox : Disabled
-- ===============================================================
-- Configuring done
-- Generating done
-- Build files have been written to: /home/izzys/samples/gtsam_samples/gtsam-build

Guidance on new Line-type Factor

Hi

Pretty new to GTSAM, looks like an awesome project. It is a little daunting for a newby. Is there any support for Line-type landmark constraints or factors?

Or, any guidance on how to implement something like a "Between" Factor but for multiple observations of the same line?

Appreciate this question might be low on the list of priorities, or perhaps in the wrong place.

Thanks

CMAKE ERROR at wrap/CMakeLists.txt:29 (target_link_libraries):The "debug" argument must be followed by a library.

On trying to build version 4.0.0 found here: https://bitbucket.org/gtborg/gtsam/get/357e739127de.zip

I face the following issue:
CMAKE ERROR at wrap/CMakeLists.txt:29 (target_link_libraries):The "debug" argument must be followed by a library.

Below is what I see on the terminal window:
The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- GTSAM_SOURCE_ROOT_DIR: [/home/guhao/Documents/gtsam]
Boost 1.43 found.
Found Boost components:
serialization;system;filesystem;thread;program_options;date_time;timer;chrono;regex
-- GTSAM_BOOST_LIBRARIES: optimized;debug
-- Found TBB: /usr/include (found version "4.4") found components: tbb tbbmalloc
-- Could NOT find MKL (missing: MKL_INCLUDE_DIR MKL_LIBRARIES)
-- Try OpenMP C flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Try OpenMP CXX flag = [-fopenmp]
-- Performing Test OpenMP_FLAG_DETECTED
-- Performing Test OpenMP_FLAG_DETECTED - Success
-- Found OpenMP: -fopenmp
CMake Warning (dev) at wrap/CMakeLists.txt:29 (target_link_libraries):
Link library type specifier "optimized" is followed by specifier "debug"
instead of a library name. The first specifier will be ignored.
This warning is for project developers. Use -Wno-dev to suppress it.

CMake Error at wrap/CMakeLists.txt:29 (target_link_libraries):
The "debug" argument must be followed by a library.

-- Configuring incomplete, errors occurred!
See also "/home/guhao/Documents/gtsam/build/CMakeFiles/CMakeOutput.log".
See also "/home/guhao/Documents/gtsam/build/CMakeFiles/CMakeError.log".

Any idea what could be going on?
I did try turning the GTSAM_BUILD_WRAP flag to off in the CMakeLists.txt file but the above error merely persists.

IndeterminantLinearSystemException when computing marginals

I search to compute covariance marginals from a pose-graph that does not have any loop closure.

This happen even after slightly modifying Pose3SLAMExample_g2o as follow:
1-include marginal computation in examples/Pose3SLAMExample_g2o.cpp Pose3SLAMExample_g2o.cpp
2-remove loop-closure in examples/Data/pose3example.txt pose3example.txt

The optimization is done, but marginals computation is not done. Error message is:
terminate called after throwing an instance of
'gtsam::IndeterminantLinearSystemException' what():
Indeterminant linear system detected while working near variable 4 (Symbol: 4).

With prior of the first pose, I do not see why system could be underdetermined.

Warning in SmartRangeExample_plaza1

Recent travis run revealed:

[ 96%] Building CXX object gtsam_unstable/examples/CMakeFiles/SmartRangeExample_plaza1.dir/SmartRangeExample_plaza1.cpp.o
In file included from /home/travis/build/borglab/gtsam/gtsam/3rdparty/Eigen/Eigen/Core:450:0,
                 from /home/travis/build/borglab/gtsam/gtsam/3rdparty/Eigen/Eigen/Dense:1,
                 from /home/travis/build/borglab/gtsam/gtsam/base/OptionalJacobian.h:22,
                 from /home/travis/build/borglab/gtsam/gtsam/base/Matrix.h:25,
                 from /home/travis/build/borglab/gtsam/gtsam/base/Manifold.h:22,
                 from /home/travis/build/borglab/gtsam/gtsam/geometry/BearingRange.h:21,
                 from /home/travis/build/borglab/gtsam/gtsam/geometry/Pose2.h:23,
                 from /home/travis/build/borglab/gtsam/gtsam_unstable/examples/SmartRangeExample_plaza1.cpp:20:
/home/travis/build/borglab/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/DenseStorage.h: In member function ‘gtsam::Point2 gtsam::SmartRangeFactor::triangulate(const gtsam::Values&) const’:
/home/travis/build/borglab/gtsam/gtsam/3rdparty/Eigen/Eigen/src/Core/DenseStorage.h:194:66: warning: ‘*((void*)& bestCircle2 +16)’ may be used uninitialized in this function [-Wmaybe-uninitialized]
     DenseStorage(const DenseStorage& other) : m_data(other.m_data) {
                                                                  ^
In file included from /home/travis/build/borglab/gtsam/gtsam_unstable/examples/SmartRangeExample_plaza1.cpp:43:0:
/home/travis/build/borglab/gtsam/gtsam_unstable/slam/SmartRangeFactor.h:103:30: note: ‘*((void*)& bestCircle2 +16)’ was declared here
     boost::optional<Circle2> bestCircle2;
                              ^

cmake error when building with MATLAB flag ON

CMake Error at cmake/GtsamMatlabWrap.cmake:106 (message):
You must call find_package(GTSAM) before using wrap
Call Stack (most recent call first):
cmake/GtsamMatlabWrap.cmake:59 (wrap_library_internal)
gtsam/CMakeLists.txt:214 (wrap_and_install_library)

linearizeNumerically bug

Brice says (moving here from Bitbucket issue #460):

in linearizeNumerically I think dX should be created insice the factor loop instead of outside

https://bitbucket.org/gtborg/gtsam/src/357e739127deb7d9bec5dad2a5d117d9f4e4e1be/gtsam/nonlinear/factorTesting.h#lines-49

I am not too sure how this didn't affect current unit tests, but my unit test on my custom factor was failing because of that. After checking my jacobians for most of the day and banging my head against the walls, I figured thanks to gdb that this was happening. I moved dX in the loop and my unit test is now passing.

Triangulation support for SmartProjectionPoseFactor

Feature

Someone (probably @chrisbeall-nuro back in the day) added smart triangulation capabilities to the SmartProjectionFactor. Is there a reason why this cannot also be integrated in the SmartProjectionPoseFactor and hence could be pushed to the base class?

Motivation

This would enable using smart factors with triangulation support when the camera calibration is fixed, and optionally a sensor offset is known.

Pitch

Push triangulation code into base class SmartFactorBase.

Additional context

There is an issue that in theory not all smart factors are about projections. Hence, it might need interposing an intermediate smart factor base class that is specialized to image projections and can benefit from triangulation.

Build issue with GTSAM 4.0

I've just built GTSAM 4.0 with VC++ 14.1 on VS 2017. During full project build, I get the error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in libboost. It turns out that I need to remove libboost release dlls (those do not contain "gd" in their filename) in Linker > Input > Additional dependencies. I wonder if this is a bug. Also, 8 projects failed to build with the following error, I cannot seem to trace the reason why.

CMAKE: out of the box, with turned off GTSAM_BUILD_WRAP, GTSAM_WITH_EIGEN_MKL, GTSAM_WITH_EIGEN_MKL_OPENMP, GTSAM_WITH_TBB, and GTSAM_WRAP_SERIALIZATION.

Severity Code Description Project File Line Suppression State Error LNK2005 "public: static class Eigen::CwiseNullaryOp<struct Eigen::internal::scalar_constant_op<double>,class Eigen::Matrix<double,2,1,0,2,1> > const __cdecl Eigen::DenseBase<class Eigen::Matrix<double,2,1,0,2,1> >::Zero(void)" (?Zero@?$DenseBase@V?$Matrix@N$01$00$0A@$01$00@Eigen@@@Eigen@@SA?BV?$CwiseNullaryOp@U?$scalar_constant_op@N@internal@Eigen@@V?$Matrix@N$01$00$0A@$01$00@3@@2@XZ) already defined in Event.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: class Eigen::Matrix<double,3,1,0,3,1> & __thiscall Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::derived(void)" (?derived@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QAEAAV?$Matrix@N$02$00$0A@$02$00@2@XZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: class Eigen::Matrix<double,3,1,0,3,1> const & __thiscall Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::derived(void)const " (?derived@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEABV?$Matrix@N$02$00$0A@$02$00@2@XZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: class Eigen::Matrix<double,3,1,0,3,1> & __thiscall Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::const_cast_derived(void)const " (?const_cast_derived@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEAAV?$Matrix@N$02$00$0A@$02$00@2@XZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: int __thiscall Eigen::DenseCoeffsBase<class Eigen::Matrix<double,3,1,0,3,1>,3>::outerStride(void)const " (?outerStride@?$DenseCoeffsBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@$02@Eigen@@QBEHXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: static class Eigen::CwiseNullaryOp<struct Eigen::internal::scalar_constant_op<double>,class Eigen::Matrix<double,3,1,0,3,1> > const __cdecl Eigen::DenseBase<class Eigen::Matrix<double,3,1,0,3,1> >::Zero(void)" (?Zero@?$DenseBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@SA?BV?$CwiseNullaryOp@U?$scalar_constant_op@N@internal@Eigen@@V?$Matrix@N$02$00$0A@$02$00@3@@2@XZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: int __thiscall Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::rows(void)const " (?rows@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEHXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: int __thiscall Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::cols(void)const " (?cols@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEHXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: double const * __thiscall Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::data(void)const " (?data@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEPBNXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: void __thiscall Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::resize(int,int)" (?resize@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QAEXHH@Z) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: static void __cdecl Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::_check_template_params(void)" (?_check_template_params@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@SAXXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: int __thiscall Eigen::Matrix<double,3,1,0,3,1>::outerStride(void)const " (?outerStride@?$Matrix@N$02$00$0A@$02$00@Eigen@@QBEHXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "protected: __thiscall Eigen::MatrixBase<class Eigen::Matrix<double,3,1,0,3,1> >::MatrixBase<class Eigen::Matrix<double,3,1,0,3,1> >(void)" (??0?$MatrixBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@IAE@XZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: int __thiscall Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::rows(void)const " (?rows@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEHXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: int __thiscall Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::cols(void)const " (?cols@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEHXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: double & __thiscall Eigen::PlainObjectBase<class Eigen::Matrix<double,3,1,0,3,1> >::coeffRef(int)" (?coeffRef@?$PlainObjectBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QAEAANH@Z) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2005 "public: int __thiscall Eigen::EigenBase<class Eigen::Matrix<double,3,1,0,3,1> >::size(void)const " (?size@?$EigenBase@V?$Matrix@N$02$00$0A@$02$00@Eigen@@@Eigen@@QBEHXZ) already defined in SimPolygon2D.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\gtsamDebug.lib(gtsamDebug.dll) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Dummy.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\libboost_thread-vc141-mt-x32-1_70.lib(tss_pe.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Dummy.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\libboost_thread-vc141-mt-x32-1_70.lib(tss_pe.obj) 1 Error LNK2038 mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in Dummy.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\libboost_thread-vc141-mt-x32-1_70.lib(thread.obj) 1 Error LNK2038 mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MDd_DynamicDebug' in Dummy.obj gtsam_unstable D:\gtsam-4.0.0\build\gtsam_unstable\libboost_thread-vc141-mt-x32-1_70.lib(thread.obj) 1 Error LNK1169 one or more multiply defined symbols found gtsam_unstable D:\gtsam-4.0.0\build\bin\Debug\gtsam_unstableDebug.dll 1 Error LNK2001 unresolved external symbol "public: virtual void __thiscall gtsam::PreintegratedCombinedMeasurements::resetIntegration(void)" (?resetIntegration@PreintegratedCombinedMeasurements@gtsam@@UAEXXZ) ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK2001 unresolved external symbol "public: virtual void __thiscall gtsam::PreintegratedCombinedMeasurements::print(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)const " (?print@PreintegratedCombinedMeasurements@gtsam@@UBEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK2001 unresolved external symbol "public: virtual void __thiscall gtsam::PreintegratedCombinedMeasurements::integrateMeasurement(class Eigen::Matrix<double,3,1,0,3,1> const &,class Eigen::Matrix<double,3,1,0,3,1> const &,double)" (?integrateMeasurement@PreintegratedCombinedMeasurements@gtsam@@UAEXABV?$Matrix@N$02$00$0A@$02$00@Eigen@@0N@Z) ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK2019 unresolved external symbol "public: __thiscall gtsam::CombinedImuFactor::CombinedImuFactor(unsigned __int64,unsigned __int64,unsigned __int64,unsigned __int64,unsigned __int64,unsigned __int64,class gtsam::PreintegratedCombinedMeasurements const &)" (??0CombinedImuFactor@gtsam@@QAE@_K00000ABVPreintegratedCombinedMeasurements@1@@Z) referenced in function _main ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK2001 unresolved external symbol "public: virtual class boost::shared_ptr<class gtsam::NonlinearFactor> __thiscall gtsam::CombinedImuFactor::clone(void)const " (?clone@CombinedImuFactor@gtsam@@UBE?AV?$shared_ptr@VNonlinearFactor@gtsam@@@boost@@XZ) ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK2001 unresolved external symbol "public: virtual void __thiscall gtsam::CombinedImuFactor::print(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class boost::function<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > __cdecl(unsigned __int64)> const &)const " (?print@CombinedImuFactor@gtsam@@UBEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$function@$$A6A?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@_K@Z@boost@@@Z) ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK2001 unresolved external symbol "public: virtual bool __thiscall gtsam::CombinedImuFactor::equals(class gtsam::NonlinearFactor const &,double)const " (?equals@CombinedImuFactor@gtsam@@UBE_NABVNonlinearFactor@2@N@Z) ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK2001 unresolved external symbol "public: virtual class Eigen::Matrix<double,-1,1,0,-1,1> __thiscall gtsam::CombinedImuFactor::evaluateError(class gtsam::Pose3 const &,class Eigen::Matrix<double,3,1,0,3,1> const &,class gtsam::Pose3 const &,class Eigen::Matrix<double,3,1,0,3,1> const &,class gtsam::imuBias::ConstantBias const &,class gtsam::imuBias::ConstantBias const &,class boost::optional<class Eigen::Matrix<double,-1,-1,0,-1,-1> &>,class boost::optional<class Eigen::Matrix<double,-1,-1,0,-1,-1> &>,class boost::optional<class Eigen::Matrix<double,-1,-1,0,-1,-1> &>,class boost::optional<class Eigen::Matrix<double,-1,-1,0,-1,-1> &>,class boost::optional<class Eigen::Matrix<double,-1,-1,0,-1,-1> &>,class boost::optional<class Eigen::Matrix<double,-1,-1,0,-1,-1> &>)const " (?evaluateError@CombinedImuFactor@gtsam@@UBE?AV?$Matrix@N$0?0$00$0A@$0?0$00@Eigen@@ABVPose3@2@ABV?$Matrix@N$02$00$0A@$02$00@4@01ABVConstantBias@imuBias@2@2V?$optional@AAV?$Matrix@N$0?0$0?0$0A@$0?0$0?0@Eigen@@@boost@@33333@Z) ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\examples\ISAM2_SmartFactorStereo_IMU.obj 1 Error LNK1120 8 unresolved externals ISAM2_SmartFactorStereo_IMU D:\gtsam-4.0.0\build\bin\Debug\ISAM2_SmartFactorStereo_IMU.exe 1 Error C2678 binary '=': no operator found which takes a left-hand operand of type 'T' (or there is no acceptable conversion) StereoVOExample_large D:\gtsam-4.0.0\gtsam\base\GenericValue.h 171 Error C2027 use of undefined type 'gtsam::traits<T>' SmartRangeExample_plaza1 D:\gtsam-4.0.0\gtsam\base\GenericValue.h 152 Error C3861 'GetDimension': identifier not found SmartRangeExample_plaza1 D:\gtsam-4.0.0\gtsam\base\GenericValue.h 152 Error C2678 binary '=': no operator found which takes a left-hand operand of type 'T' (or there is no acceptable conversion) ConcurrentCalibration D:\gtsam-4.0.0\gtsam\base\GenericValue.h 171 Error C2678 binary '=': no operator found which takes a left-hand operand of type 'T' (or there is no acceptable conversion) SmartProjectionFactorExample D:\gtsam-4.0.0\gtsam\base\GenericValue.h 171 Error C2027 use of undefined type 'gtsam::traits<T>' SmartRangeExample_plaza2 D:\gtsam-4.0.0\gtsam\base\GenericValue.h 152 Error C3861 'GetDimension': identifier not found SmartRangeExample_plaza2 D:\gtsam-4.0.0\gtsam\base\GenericValue.h 152 Error C2678 binary '=': no operator found which takes a left-hand operand of type 'T' (or there is no acceptable conversion) SmartStereoProjectionFactorExample D:\gtsam-4.0.0\gtsam\base\GenericValue.h 171
May I have some suggestions on how to resolve this? Many thanks!

Rethink gradient values for Constrained Factors

The behavior of gradients, specifically gradientAtZero methods for constrained factors/noise models needs to be re-evaluated. Concretely, gradients for constrained factors should be undefined since they are point functions with 0 covariance.

This behavior is not respected in the BayesTree data structure since while the constrained factors set the gradient to zero, the BayesTree aggregates the gradients from other factors on a variable without considering the constraints.

Confusion about variable elimination order for loop closure

I read isam2 paper. How to build ayes Tree for a large loop closure really confuses me? In the example shown in the paper, this is an evolution of the Bayes tree. When loop closure happens, there should be a factor between x24 and x16, and when we update Bayesian Net, the factor will become a directed line, and there should be a clique that contains x_24 and x_16. But we do not find any clique contains x_24 and x_16 in the Bayes Tree show in the figure. I fail to figure out how to build the red nodes, variable elimination order matters, Can someone give a clue? Where can I find how to build Bayes Tree with loop closure in the code?
image

Improve plot3DTrajectory in Matlab

Hello,

As seen at https://bitbucket.org/gtborg/gtsam/issues/145/plot3dtrajectory-in-matlab, plot3DTrajectory in MATLAB is slow. For your reference, you can test it yourself by running Pose3SLAMExample_graph

I am thus trying to transform the use of for-loops to matrix manipulations.
For this to be achieved, I need to change the KeyVector.at(index) and Values.at functions(index) to work the same way on matrix input as well. In progress, but any help is more than welcome!

Stefanos C.

GTSAM related compile error with BLAM

This issue is centered around the blam library. I get the following error when trying to build blam.

In file included from /home/ben/Documents/blam/internal/src/laser_loop_closure/include/laser_loop_closure/LaserLoopClosure.h:45:0,
                 from /home/ben/Documents/blam/internal/src/laser_loop_closure/src/LaserLoopClosure.cc:37:
/usr/local/include/gtsam/base/Vector.h:72:1: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
 static_assert(
 ^

Is there a way to enforce GTSAM to use a specific version of Eigen?
GTSAM seems to come packaged with a version of Eigen, is there some way to get it to use the previously installed version?
How can I tell which version is being used in order to align the version of the other package?

OS: Ubuntu 16.04 LTS
Latest versions of each library from github repos.

GTSAM segfault on noiseModel::Diagonal::Sigmas

Just migrated from bitbucket repo commit c844966 to github newest version. GTSAM segfaults on running the code. GDB backtrace shows

Program received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x21) at malloc.c:2951
2951	malloc.c: No such file or directory.
#0  __GI___libc_free (mem=0x21) at malloc.c:2951;
#1  0x00007f675f9126b6 in gtsam::noiseModel::Diagonal::Sigmas(Eigen::Matrix<double, -1, 1, 0, -1, 1> const&, bool) () from /usr/local/lib/libgtsam.so.4;
#2  0x00007f675f8145d5 in _GLOBAL__sub_I_lago.cpp () from /usr/local/lib/libgtsam.so.4;
#3  0x00007f67605c56ba in call_init (l=<optimized out>, argc=argc@entry=9, argv=argv@entry=0x7ffe55b7b708, env=env@entry=0x7ffe55b7b758) at dl-init.c:72;
#4  0x00007f67605c57cb in call_init (env=0x7ffe55b7b758, argv=0x7ffe55b7b708, argc=9, l=<optimized out>) at dl-init.c:30;
#5  _dl_init (main_map=0x7f67607dc168, argc=9, argv=0x7ffe55b7b708, env=0x7ffe55b7b758) at dl-init.c:120;
#6  0x00007f67605b5c6a in _dl_start_user () from /lib64/ld-linux-x86-64.so.2;
#7  0x0000000000000009 in ?? ()
#8  0x00007ffc4f6f5d8c in ?? ()
#9  0x00007ffc4f6f5dd5 in ?? ()
#10 0x00007ffc4f6f5dd8 in ?? ()
#11 0x00007ffc4f6f5e0c in ?? ()
#12 0x00007ffc4f6f5e0f in ?? ()

However, I have no problem in the build c844966. Built with TBB enabled, MKL disabled, and using system Eigen. I tried both using system Eigen and using package Eigen, but none of them works. Would appreciate any help!

Get stuck in the optimization

Description

Hi, I'm trying to test segmap, which using gtsam to employ factor graph optimization. But some issue occurred when it called isam::update(const gtsam::NonlinearFactorGraph&, const gtsam::Vaules&). It got stuck in the factor graph optimization but didn't throw out any error. I have no idea why this happened. However, If calling 'isam::update() without any params the optimization perform normally.

Steps to reproduce and Environment

My environment is ubuntu16.04 with cuda 10, TF 1.8, ROS kinetic and eigen 3.3.4. I compiled segmap project following its README.md instruction. To avoid the mix-using of eigen, I set USE_SYSTEM_EIGEN = OFF in eigen_catkin camkelists to download 3.2.10 eigen and set USE_SYSTEM_EIGEN = OFF to use GTSAM-bundled Eigen which is also 3.2.10.

The ImuFactorExample2 is throwing an exception on second isam update

Windows 10 64bit
Visual Studio 2017 15.4.5
GTSAM project generated using CMAKE no TBB no MKL, using precompiled boost_1_70

The second time line 126 isam.update(newgraph, initialEstimate); gets called, the program throws line 282 in Values-inl.h throw ValuesIncorrectType(j, typeid(*pointer), typeid(ValueType));

This appears to happen on the second call to the operator.

gtsam with Eigen when catkin_make errors

Im using ros(kinetic), after installed ros, i build gtsam from source and it went well. nothing happens. But when i using catkin_make to build a workspace, Error comes.

Error description:

In file included from /usr/local/include/gtsam/base/Matrix.h:26:0,
from /usr/local/include/gtsam/base/Manifold.h:22,
from /usr/local/include/gtsam/base/Lie.h:25,
from /usr/local/include/gtsam/base/VectorSpace.h:11,
from /usr/local/include/gtsam/geometry/Point2.h:20,
from /usr/local/include/gtsam/geometry/Unit3.h:23,
from /usr/local/include/gtsam/geometry/Rot3.h:25,
from /home/joe/workspace/catkin_ws/src/LeGO-LOAM/LeGO-LOAM/src/mapOptmization.cpp:36:
/usr/local/include/gtsam/base/Vector.h:72:1: error: static assertion failed: Error: GTSAM was built against a different version of Eigen
static_assert(

#end description

Would someone help me ? Thanks very much!

FTBFS when using TBB

It seems there are now build errors when TBB is enabled:

gtsam/linear/VectorValues.h:200:22: error: no member named 'emplace' in 'gtsam::ConcurrentMap<unsigned long, Eigen::Matrix<double, -1, 1, 0, -1, 1> >'
      return values_.emplace(j, value); 
             ~~~~~~~ ^

due to the selection of CONCURRENT_MAP_BASE.

What's the preferred solution here? For now, disabling TBB is the only workaround.

Linking errors on MSVC (2017 Community)

Description

In MSVC 2017 (Community), including the gtsam library causes linking errors. Specifically, gstam_matlab_wrapper, testLieMatrix, testLieVector, testLieScalar, and testMatrix does not finish compiling. During the linking phase, 100s of errors are generated, but they all have to do with an "unresolved external symbol __declspec(dllimport)" and it talks about Eigen. An example error:

 Error	LNK2019	unresolved external symbol "__declspec(dllimport) public: __cdecl gtsam::LieVector::LieVector(class Eigen::Matrix<double,-1,1,0,-1,1> const &)" (__imp_??0LieVector@gtsam@@QEAA@AEBV?$Matrix@N$0?0$00$0A@$0?0$00@Eigen@@@Z) referenced in function "public: virtual void __cdecl LieVectorInvariantsTest::run(class TestResult &)" (?run@LieVectorInvariantsTest@@UEAAXAEAVTestResult@@@Z)	check_base_program	C:\AFIT\lib\gtsam\build\gtsam\base\tests\testLieVector.obj		

Steps to reproduce

  1. Use the branch msvc-fixes
  2. Run Cmake
  • Some switches of possible importance:
    • GTSAM_INSTALL_MATLAB_TOOLBOX is on
    • GTSAM_BUILD_TESTS is on
    • GTSAM_BUILD_WRAP is on
    • GTSAM_ALLOW_DEPRECATED... is off
    • GTSAM_BUILD_UNSTABLE is off
    • MEX directory and executable location are set appropriately
    • GTSAM_USE_SYSTEM_EIGEN is off (I don't have Eigen installed separately, so it can't be a conflict)
    • GTSAM_WITH_TBB is off
    • GTSAM_MEX_BUILD_STATIC_MODULE is off (documentation says it must be off for Windows!)
  1. Open the solution file and try to compile. gtsam compiles properly. Unit tests and gtsam_matlab_wrapper does not.

Expected behavior

Code completes compiling without errors

Environment

Windows 10, Visual Studio 2017 Community, Boost 1.67. Errors appear in DEBUG or RELEASE.

Additional information

I am not sure, but I think it has to do with something like the problem described on this webpage. Because Matrix is not declaring the size of the Matrix up front, then you have a not fully defined type being used as an interface to a dll. That is my best guess though and I have never dug into how dlls work on Windows.

Pose3 derivative w.r.t. quaternion components

I'm trying to implement custom factor derived from NoiseModelFactor1<Pose3>
As I understood concepts in method evaluateError() I should provide Jacobian matrix for error function with respect to pose vector components i.e. Rx, Ry, Rz, x, y, z, where Rx, Ry and Rz are euler angles components of corresponding Pose3.
In my case I need to perform some operations with rotation, which is better to do with quaternions. Also it helps to avoid trigonometric functions like sin/cos in error function and much simplifies derivatives.

Is there any way to provide Jacobian with respect to qw, qx, qy, qz of Pose3 with no breaking compatibility with current gtsam architecture and already implemented factors?

I've tried to set parameters USE_QUATERNIONS but it affects only internal representation of Rot3.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.