Giter Club home page Giter Club logo

g2o's People

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  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

g2o's Issues

Error: undefined reference to `g2o::globalStats'

Hi all,

after managing to compile successfully on OpenSuse, I try to compile some dummy code, trying to learn the library. I keep getting this Error though:

undefined reference to `g2o::globalStats'

right at the point when I try to execute this:

linearSolver = new g2o::LinearSolverCholmod< g2o::BlockSolverX::PoseMatrixType >();

Do you have any idea about this?

Best,
dimitris

using namespace in headers

There are using namespace in headers of the g2o library. Please remove them, so one can compile without problems.

Regards,

Taihú

Compilation in aislib failed!!!

hogman2d.cpp:(.text+0x1104): undefined reference to cs_sfree' hogman2d.cpp:(.text+0x14ed): undefined reference toAISNavigation::Graph::vertex(int)'
hogman2d.o: In function AISNavigation::ActivePathUniformCostFunction<AISNavigation::PoseGraph2D>::operator()(AISNavigation::Graph::Edge*, AISNavigation::Graph::Vertex*, AISNavigation::Graph::Vertex*)': hogman2d.cpp:(.text._ZN13AISNavigation29ActivePathUniformCostFunctionINS_11PoseGraph2DEEclEPNS_5Graph4EdgeEPNS3_6VertexES7_[AISNavigation::ActivePathUniformCostFunction<AISNavigation::PoseGraph2D>::operator()(AISNavigation::Graph::Edge*, AISNavigation::Graph::Vertex*, AISNavigation::Graph::Vertex*)]+0x18): undefined reference totypeinfo for AISNavigation::Graph::Edge'
hogman2d.o: In function AISNavigation::PoseGraph<_Transformation<_Angle<double> >, _Matrix<3, 3, double> >::PathLengthCostFunction::operator()(AISNavigation::Graph::Edge*, AISNavigation::Graph::Vertex*, AISNavigation::Graph::Vertex*)': hogman2d.cpp:(.text._ZN13AISNavigation9PoseGraphI15_TransformationI6_AngleIdEE7_MatrixILi3ELi3EdEE22PathLengthCostFunctionclEPNS_5Graph4EdgeEPNS9_6VertexESD_[AISNavigation::PoseGraph<_Transformation<_Angle<double> >, _Matrix<3, 3, double> >::PathLengthCostFunction::operator()(AISNavigation::Graph::Edge*, AISNavigation::Graph::Vertex*, AISNavigation::Graph::Vertex*)]+0x18): undefined reference totypeinfo for AISNavigation::Graph::Edge'

problem using tutorial_slam2d with g2o_viewer

Hi, i am new to g2o so i am trying to use the tutorial_slam2d as a starting point. when i try to load in g2o_viewer the tutorial_slam2d's output, namely the "tutorial_after.g2o" and "tutorial_before.g2o" i get errors like "unknown type TUTORIAL_VERTEX_SE2" "unknown type TUTORIAL_VERTEX_POINT_XY", etc.

reading answer of issue 45, i tryed to delete all of the "TUTORIAL_", but still it doesnt work.
finally i change the .g2o like this:

TUTORIAL_VERTEX_POINT_XY replaced with VERTEX_XY
TUTORIAL_VERTEX_SE2 replaced with VERTEX_SE2
TUTORIAL_EDGE_SE2 replaced with EDGE_SE2
TUTORIAL_EDGE_SE2_POINT_XY replaced with EDGE_SE2_XY

this way it seems to load correctly, but it fails later (matrix not positive definite)

As i said, i am still trying to understand the framework, so i don't know if this is a problem with it or is something i am doing wrong.

thanks!

Assertion failure for Vertex::pop()

Hi,
I amusing SparseOptimizerIncremental for a SLAM problem.
I am adding nodes and edges very similar fashion as are done in example g2o_interactive slam.
I am getting this error :
void g2o::BaseVertex<D, T>::pop()[with int D=3, T=g2o::SE2]::Assertion failed '_backup.empty()'

I am not able to debug this error.

What advantage push() and pop method provide? My guess is t may be related to Cache management with vertices. It is not documented any where?
thanks
prince

rosmake dvo_slam error about g2o

hello, Mr RainerKuemmerle. i am newbie. i have build the project "dvo_slam" at https://github.com/tum-vision/dvo_slam. when i followed the installation course,running "rosmake dvo_slam",there were some errors about g2o:

[ rosmake ] Last 40 lineso_slam: 23.1 sec ] [ 1 Active 74/75 Complete ]
{-------------------------------------------------------------------------------
from /home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_slam/include/dvo_slam/keyframe_graph.h:25,
from /home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_slam/src/keyframe_graph.cpp:21:
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/sparse_block_matrix.hpp: In member function ‘void g2o::SparseBlockMatrix::takePatternFromHash(g2o::SparseBlockMatrixHashMap&) [with MatrixType = Eigen::Matrix]’:
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/block_solver.hpp:287:3: instantiated from ‘bool g2o::BlockSolver::buildStructure(bool) [with Traits = g2o::BlockSolverTraits]’
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_slam/src/keyframe_graph.cpp:942:1: instantiated from here
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/sparse_block_matrix.hpp:631:73: error: no type named ‘SparseColumn’ in ‘class g2o::SparseBlockMatrixHashMap >’
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/sparse_block_matrix.hpp:632:21: error: request for member ‘size’ in ‘(& hashMatrix)->g2o::SparseBlockMatrixHashMap::blockCols with MatrixType = Eigen::Matrix’, which is of non-class type ‘int’
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/block_solver.hpp:287:3: instantiated from ‘bool g2o::BlockSolver::buildStructure(bool) [with Traits = g2o::BlockSolverTraits]’
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_slam/src/keyframe_graph.cpp:942:1: instantiated from here
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/sparse_block_matrix.hpp:644:7: error: ‘swap’ was not declared in this scope
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/sparse_block_matrix.hpp:644:7: note: suggested alternatives:
/usr/include/c++/4.6/bits/stl_deque.h:1971:5: note: ‘std::swap’
/usr/include/boost/detail/compressed_pair.hpp:431:1: note: ‘boost::swap’
/usr/include/boost/thread/locks.hpp:1103:14: note: ‘boost::detail::swap’
/usr/include/boost/variant/detail/backup_holder.hpp:86:6: note: ‘boost::detail::variant::swap’
/usr/include/boost/signals2/connection.hpp:239:17: note: ‘boost::signals2::swap’
/usr/include/boost/signals2/detail/auto_buffer.hpp:1080:17: note: ‘boost::signals2::detail::swap’
/usr/include/c++/4.6/bits/stl_deque.h:1971:5: note: ‘std::swap’
/usr/include/c++/4.6/bits/stl_deque.h:1971:5: note: ‘std::swap’
/usr/include/c++/4.6/bits/stl_deque.h:1971:5: note: ‘std::swap’
/usr/include/c++/4.6/bits/stl_deque.h:1971:5: note: ‘std::swap’
/usr/include/c++/4.6/bits/move.h:122:5: note: ‘std::swap’
/opt/ros/hydro/include/opencv2/core/core.hpp:2126:17: note: ‘cv::swap’
/usr/include/tbb/concurrent_vector.h:1053:13: note: ‘tbb::swap’
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_core/include/dvo/core/datatypes.h: At global scope:
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_core/include/dvo/core/datatypes.h:33:28: warning: ‘dvo::core::Invalid’ defined but not used [-Wunused-variable]
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_core/include/dvo/core/datatypes.h:36:24: warning: ‘dvo::core::InvalidDepth’ defined but not used [-Wunused-variable]
make[3]: *** [CMakeFiles/dvo_slam.dir/src/keyframe_tracker.cpp.o] Error 1
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/sparse_block_matrix_ccs.h: In member function ‘MatrixType* g2o::SparseBlockMatrixHashMap::addBlock(int, int, bool) [with MatrixType = Eigen::Matrix]’:
/home/exbot/rosbuild_ws/sandbox/dvo_slam/g2o/include/g2o/core/sparse_block_matrix_ccs.h:268:7: warning: control reaches end of non-void function [-Wreturn-type]
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_core/include/dvo/core/datatypes.h: At global scope:
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_core/include/dvo/core/datatypes.h:33:28: warning: ‘dvo::core::Invalid’ defined but not used [-Wunused-variable]
/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_core/include/dvo/core/datatypes.h:36:24: warning: ‘dvo::core::InvalidDepth’ defined but not used [-Wunused-variable]
make[3]: *** [CMakeFiles/dvo_slam.dir/src/keyframe_graph.cpp.o] Error 1
make[3]: Leaving directory /home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_slam/build' make[2]: *** [CMakeFiles/dvo_slam.dir/all] Error 2 make[2]: Leaving directory/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_slam/build'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/exbot/rosbuild_ws/sandbox/dvo_slam/dvo_slam/build'
-------------------------------------------------------------------------------}

could you help me to solve the problem? i will thank you very much for your help!
my ROS is hydro with ubuntu 12.04.

Illegal memory usage in Windows

I compiled and used 'g2o' in MSVC 2009. When I ran 'slam2d' example in Debug mode, the example became crushed.

I found the reason as follows. In the function "initializeOptimization()" in "sparse_optimizer.cpp", there is a wrong memory allocation as like "double* estimateData = new double[];".

It should be "double* estimateData = new double[estimateDim];"

Thanks.

Endless loop in OptimizableGraph::save()

Saving the optimizer results in an endless loop in saveVertex() because d is not advanced.

bool OptimizableGraph::saveVertex(std::ostream& os, OptimizableGraph::Vertex* v) const
{
    ...
    while (d) { // write the data packet for the vertex
      tag = factory->tag(d);
      if (tag.size() > 0) {
        os << tag << " ";
        d->write(os);
        os << endl;
        d=d->next();     // << fix by moving one line down
      }
    }

Eigen Compatibility Issue

Hi,

i cannot build g2o with eigen-3.2.3 on OS X due to:

no viable conversion from 'Scalar' (aka 'double') to
'Eigen::Rotation2D'

[ 41%] Building CXX object g2o/types/slam2d/CMakeFiles/types_slam2d.dir/edge_se2.cpp.o
In file included from /Users/tatsch/g2o/g2o/types/slam2d/edge_se2.cpp:27:
In file included from /Users/tatsch/g2o/g2o/types/slam2d/edge_se2.h:30:
In file included from /Users/tatsch/g2o/g2o/types/slam2d/vertex_se2.h:30:
In file included from /Users/tatsch/g2o/build/g2o/config.h:18:
In file included from /Users/tatsch/g2o/g2o/core/eigen_types.h:31:
In file included from /usr/local/include/eigen3/Eigen/Geometry:39:
/usr/local/include/eigen3/Eigen/src/Geometry/Rotation2D.h:74:46: error: no viable conversion from 'Scalar' (aka 'double') to
'Eigen::Rotation2D'
inline Rotation2D inverse() const { return -m_angle; }
^~~~~~~~
/Users/tatsch/g2o/g2o/types/slam2d/se2.h:84:19: note: in instantiation of member function 'Eigen::Rotation2D::inverse' requested here
ret._R=_R.inverse();
^
/usr/local/include/eigen3/Eigen/src/Geometry/Rotation2D.h:41:7: note: candidate constructor (the implicit copy constructor) not viable: no known
conversion from 'Scalar' (aka 'double') to 'const Eigen::Rotation2D &' for 1st argument
class Rotation2D : public RotationBase<Rotation2D<_Scalar>,2>
^
/usr/local/include/eigen3/Eigen/src/Geometry/Rotation2D.h:41:7: note: candidate constructor (the implicit move constructor) not viable: no known
conversion from 'Scalar' (aka 'double') to 'Eigen::Rotation2D &&' for 1st argument
class Rotation2D : public RotationBase<Rotation2D<_Scalar>,2>
^
1 error generated.
make[2]: *** [g2o/types/slam2d/CMakeFiles/types_slam2d.dir/edge_se2.cpp.o] Error 1
make[1]: *** [g2o/types/slam2d/CMakeFiles/types_slam2d.dir/all] Error 2
make: *** [all] Error 2

Can you check if you can still compile with eigen-3.2.3?

Example calibration_odom_laser gives opposing output

I fed the calibration_odom_laser example with some recorded data (I had to adapt the reading function to cope with my data format) and the output is a kind of confusing:

Performing full non-linear estimation
Calibrated laser offset (x, y, theta): -0.205733 0.00878369  -0.064972
Odometry parameters (scaling factors (v_l, v_r, b)): -0.99672 -0.93228 -1.00952

linearSolution.transpose() = -0.98481 0.926628

Performing partial non-linear estimation
Calibrated laser offset (x, y, theta): -0.205686 0.00725779  -0.064534
Odometry parameters (scaling factors (v_l, v_r, b)): -0.993747 -0.935036  -1.00907

Obtaining closed form solution
Calibrated laser offset (x, y, theta): 0.209128 0.0167183   3.07643
Odometry parameters (scaling factors (v_l, v_r, b)): 0.989488 0.931029  1.00475

If I interpret that correctly, four different solving strategies are followed leading to different results. It seems that the coordinate conventions for the solutions differ. The expected one is the latter as our robot has x pointing forward, y pointing left and the laser is about 20cm in front of the odometry center.

Is the solution really ambiguous (robot driving forward with laser in front or robot driving backwards with laser in the back)? If yes, would v_l and v_r not swap between the two solutions?

Fix assertion/compiler crash in Visual Studio 2013 in gicp_sba_demo

Please, fix matrix_operations.h:

diff --git a/g2o/core/matrix_operations.h b/g2o/core/matrix_operations.h
index 28e6fbe..a1082cf 100644
--- a/g2o/core/matrix_operations.h
+++ b/g2o/core/matrix_operations.h
@@ -45,7 +45,7 @@ namespace g2o {
     }

     template<>
-    inline void axpy(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
+    inline void axpy<Eigen::MatrixXd>(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
     {
       y.segment(yoff, A.rows()) += A * x.segment(xoff, A.cols());
     }
@@ -63,7 +63,7 @@ namespace g2o {
     }

     template<>
-    inline void atxpy(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
+    inline void atxpy<Eigen::MatrixXd>(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
     {
       y.segment(yoff, A.cols()) += A.transpose() * x.segment(xoff, A.rows());
     }

The full story is the following.
Visual Studio crashed when compiling implicit template specializations for g2o::internal::axpy and g2o::internal::atxpy, therefore I've removed template<> and made them overload.

Then it has not called overloaded functions and incorrectly specialized template. Therefore I had to add full explicit template specialization

Cholesky Failure when using EdgeSE3Calib

Hello,

I have setup a very simply graph using EdgeSE3 connecting the '+' and EdgeSE3Calib connecting the '+' with the 'o'. Thereis an additional calibration vertex that is added to all the EdgeSE3Calib edges. I set the estimate of this calibration edge to the calibration value that goes from 'o' to '+'.

screenshot from 2014-09-26 11 49 41

(Figure: An attempt to draw in 3D - constant offset between + and o)
However when I try to optimize this graph it gives a "cholesky failed!" error. All the '+' vertices end up far away from their initial estimate.
On a different ticket I read the three reasons that this might happen and I seem to have addressed all three:
(i) One of the 'o' vertices is set to fixed.
(ii) I also verified that all the information matrices that are set on all edges are PSD (using a call to verifyInformationMatrices()).
(iii) the graph is connected (though the ids may not be sequential)

Any thoughts would be appreciated?

PS: If I replace the EdgeSE3Calib with a regular EdgeSE3 (and remove the calibration vertex), it seems to optimize correctly.

Thank you

Windows + OpenMP crash calling sba_demo.cpp

I know it's not directly supported, but maybe this is a general bug/problem.
As soon as I compile the code with MSVC and enabled OpenMP support, I get crashes in this function.

template
bool BlockSolver::solve(){

in here:

ifdef G2O_OPENMP

  ScopedOpenMPMutex mutexLock(&_coefficientsMutex[i1]);

endif

Without OpenMP support the code runs fine without any problems.

Maybe this is a general bug in the OpenMP support? Still trying to evaluate what exactly causes the problem.

Unable to view ONLINE_VERTEX_SE2 in g2o_viewer

Hi
Is it possible to view g20 file with types ONLINE_EDGE_SE2, ONLINE_VERTEX_SE2 in g2o_viewer?
I am not able to load any graph with above mentioned type of nodes and vertices.

thanks
nitin

Issue in cloning SpargeOptimizer's edges

Hi
I am trying to write online optimization code for slam back-end. The aim is to read g2o dataset file using SparseOptimizer::load() function and Copy (clone) the nodes/edges into other SparseOptimizer object depending on an data-associated time stamp file.

g2o::SparseOptimizer optimizer;
optimizer.load("/tmp/intel.g2o");
auto eItr= optimizer.edges().begin(), endItr= optimizer.edges.end();

for(; eItr!=endItr; ++eItr)
{
g2o::OptmizableGraph::Edge * e = ( g2o::OptmizableGraph::Edge _)(_eItr);
g2o::OptmizableGraph::Edge * eClone = e->clone(); // error for this line
}

But I am getting error in last line of for loop. The error is "cannot allocate object of abstract type". I was hoping the it is correct as polymorphism will handle the correctness of this statement. The dataset is 2D. What am I doing wrong here.

Also what is the difference between SparseOptimizerIncremental and SparseOptimizerOnline. What am I trying to implement is online behaviour but I am not able to understand how SparseOptimizerOnline works.

rgds
nitin

Incompatible core with openslam version!

Hi,

I am trying to compile a code that uses g2o. The code was made to use g2o implementation of linux (http://openslam.informatik.uni-freiburg.de/data/svn/g2o/trunk/). However, i am trying to compile the code in vs2010. I have manged to compile g2o under vs2010 but the problem is that this version of g2o seems incompatible with the orignal one on openslam link given above. The class 'SparseOptimizer' is defined in a different header 'graph_optimizer_sparse.h' whose member functions are different. For example a call to setMthod function is only available in 'graph-optimizer_sparse.h' version of the class while it is not available in 'sparse_optimizer.h".

Would you please tell if this version is compatible with the openslam? If not how can i use this 'graph_optiumizer_sparse.h" functionality with minimal hassle.?

I've also tried to compile the above openslam version (linux one) of the g2o in vs2010 by changing the desired API exports where needed but it is not compiling correctly. Some linker errors are popping up which i can't solve. They are due to dllexports.

Best regards,

incorrect cholmod.h include

I get the following error when trying to compile a file which includes:

#include <g2o/core/sparse_optimizer.h>

/opt/ros/fuerte/include/g2o/solvers/cholmod/linear_solver_cholmod.h:36:21: fatal error: cholmod.h: No such file or directory
compilation terminated.
make[2]: *** [CMakeFiles/rgbdtools.dir/src/graph/keyframe_graph_solver_g2o.cpp.o] Error 1
make[1]: *** [CMakeFiles/rgbdtools.dir/all] Error 2
make: *** [all] Error 2

I'm running ros fuerte. Prior to compiliing, I ran:

sudo apt-get install ros-fuerte-libg2o

I'm fairly certain this patch resolves the issue:

-#include <cholmod.h>
+#include <suitesparse/cholmod.h>

Some examples do not work when building g2o to static libraries

Hi Rainer,

Thank you for the great g2o work and I am trying to use it.

Are you aware of that some examples do not work when building g2o to static libraries (.a files). For example, I got a bunch of errors of tutorial_slam2d
fatal error in creating cache of type TUTORIAL_CACHE_SE2_OFFSET
addEdge: FATAL, cannot resolve caches for edge 0x23416e0
g2o::Cache* g2o::CacheContainer::createCache(const g2o::Cache::CacheKey&)
fatal error in creating cache of type TUTORIAL_CACHE_SE2_OFFSET
addEdge: FATAL, cannot resolve caches for edge 0x23419a0
...

cmake commands: $cmake -DBUILD_SHARED_LIBS=OFF ../
OS: Ubuntu 14.04

Build to shared libraries are completely perfect and all the examples work well. Do you have an idea what is the possible reasons for it? Thanks

XQ

VCE2010 Win7 x64 - Slow compilation time

Hi all. I successfully compiled the g2o library (MSVCE 2010 on windows 7 64 bit) and I'm using it in my SLAM framework as back-end optimization step.
I noticed that the time required for compiling the SLAM framework considerably increased since when I added the g2o library. In particular, the compilation itself goes really slow (more than 2 minute) and requires a huge amount of memory (more than 1GB). Linking instead is pretty fast. Once I remove the g2o from the project, everything compiles in reasonable time.
Do you have any hint to explain this behavior? It seems to me that the compiler waste a lot of time scanning all the header file hierarchy.. Can be?

PS. I'm not rebuilding the whole g2o library in my project

Thank you

SparseOptmizer use

Hi
I have a couple of questions :

  1. In directory g2o/examples/interactive_slam/g20_incremental, SparseIncrementalOptimizer expects a grammer. I am not able to access the mentioned willowgarage webpage. Also RSS11 workshop page http://rss2011.kaini.org/ is not of much help. Is there any other resource from where i can read about this grammer?
  2. I am using SparseIncrementalOptimizer to perform incremental 2dslam. The data i have is a g2o dataset with timestamp. This dataset fiel mentions tags as VERTEX_SE2, EDGE_SE2. I construct object of same class using Factory. On running SparseIncrementalOptimzer, program terminates with Segmentation fault error.
    Do SparseIncrementalOptimizer always expects edge type to be OnlineEdgeSE2 ?
  3. How g2o_hierarchical branch implementation is different from main trunk? I have a couple of open source implementations, which uses different g2o versions. I will like to them to use identicle g2o lib.

Thank you
nitin

bug in SparseOptimizerIncremental

Hello,
I believe there is a bug in class SparseOptimizerIncremental.
The optimize method of this class uses _underlyingSolver class member ( please refer to file graph_optmizer_sparse_incremental.cpp, line number 101, 124 etc.) But _underlyingSolver is never instantiated. It is always null. This results in SIGSEGV.
Similar problems will occur for SparseOptimizerOnline as well.
I propose that one of following solutions is implemented:

  1. SparseOptimizer::setAlgorithm(OptimizationAlgorithm* algorithm) may be made virtual and an overriding implementation will set the _underlyingSolver object using algorithm->solver(). algorithm->solver() will work only for OptimizableAlgorithmWithHessian class objects.
  2. A new method should be incorporated into SparseOptimizerOnline which will enable setting of _underlyingSolver.
  3. Re-implementation of SparseOptimizerIncremental::optimize() such that _underlyingSolver is accessed only through _algorithm. SparseOptimizer::optimize() have this neat implementation.
    I also feel a lot of code is redundant in SparseOptimizerIncremental::optimize() for example code line 99-108 do not serve any purpose as line 125 is performing the task unconditionally. I am assuming that repeat call to a function do not serve any purpose. I may be wrong.

I will also suggest renaming of variable 'solver' in SparseOptimizerIncremental::optimize() (line no. 93 of graph_optmizer_sparse_incremental.cpp) to 'algorithm' as it causes confusion to reader. This class also have an data member _underlyingSolver.

I have still not identified all the errors with this part of code but it certainly needs attention.
regards
nitin

cs.h no such file or directory

I went through the issue mentioned here #23
But I am still facing the error even after making the suggested changes. I am downloading the g2o package from github as I have mentioned the link to download the package in my Makefile. I tried making the suggested changes to the files that are downloaded but I get the error again and again.

Any help on it will be appreciated.

Thanks

Missing Type Registration in 'slam2d' example

When I loaded '.g2o' file in 'slam2d' example, the example did not read the file correctly as like "0 vertex and 0 edge".

When I applied the below codes to "slam2d_g2o.cpp" file, it worked well.
...

include "g2o/core/factory.h"

include "g2o/types/slam2d/types_slam2d.h

...
int main(int argc, char** argv)
{
Factory* factory = Factory::instance();
factory->registerType("VERTEX_SE2", new HyperGraphElementCreator);
factory->registerType("VERTEX_POINT_XY", new HyperGraphElementCreator);
factory->registerType("PARAMS_SE2_OFFSET", new HyperGraphElementCreator);
factory->registerType("CACHE_SE2_OFFSET", new HyperGraphElementCreator);
factory->registerType("EDGE_SE2", new HyperGraphElementCreator);
factory->registerType("EDGE_SE2_POINT_XY", new HyperGraphElementCreator);
...
factory->destory();
reutrn 0;
}

Now, I use 'g2o' in MSVC as static libraries. I am not sure whether this problem is common for all other platform or not.

Thanks.

A wrong return value in "ParameterSE2Offset::read()"

When I read "PARAMETER_SE2_OFFSET" from ".g2o" files, it became failed.

Now, the function "ParameterSE2Offset::read()" (in "parameter_se2_offset.cpp" file) returns "is.good()". However, "good()" function returns "false" even when the input stream is successfully utilized but reaches its end. Please refer the below link for further information.
http://www.cplusplus.com/reference/iostream/ios/good/
Therefore, "ParameterSE2Offset::read()" function always returns "false".

The wrong return statement should be "return is.good() || is.eof()".

Thanks.

assigning long to int

../../../usr/include/g2o/stuff/string_tools.h:82:14: error: implicit conversion loses integer precision: 'long' to 'int'
[-Werror,-Wshorten-64-to-32]
int id = strtol(cl, &cle, 10);
~~   ^~~~~~~~~~~~~~~~~~~~

There seem to be a few other cases where this is an issue. Perhaps you should try compiling with -Werror and check for conversions like the above -Wshorten-64-to-32

built executables don't work on Mac

All the executables compiled into bin/ produce missing library errors. Some will work if the .dylib libraries are moved/copied/hardlinked into the bin/ directory.

The g2o_simulator2d and g2o_simulator3d however immediately crash with "pointer being freed was not allocated."

These problems occur in Snow Leopard 10.6 and Lion 10.7. I didn't try 10.8.

Cmake fails with MSVC12 due to CXX11 and CXX0X test failures.

CMake output:

Performing Test COMPILER_SUPPORTS_CXX11
Performing Test COMPILER_SUPPORTS_CXX11 - Failed
Performing Test COMPILER_SUPPORTS_CXX0X
Performing Test COMPILER_SUPPORTS_CXX0X - Failed
CMake Error at CMakeLists.txt:223 (message):
The compiler C:/Program Files (x86)/Microsoft Visual Studio
12.0/VC/bin/x86_amd64/cl.exe has no C++11 support. Please use a different
C++ compiler.

Yet support for msvc is claimed. Can I ignore this error?

minor mac os x compilation issue + fix

Hey,

I was able to successfully compile g2o on both my Apple iMac and my Macbook Air, but I first received the following error:
/Users/tmalisie/projects/g2o/g2o/stuff/opengl_primitives.cpp:31:20: error: GL/glu.h: No such file or directory

Simple hack to get it working on my macs is to change the "#ifdef" lines in opengl_primitives.cpp to:

ifdef APPLE

#include <OpenGL/glu.h>

else

#ifdef _WINDOWS
#include <gl/GLU.h>
#else
#ifdef UNIX
#include <GL/glu.h>
#endif
#endif

endif

I enabled verbose mode in ccmake and it appears -DUNIX is being passed to gcc, so both APPLE and UNIX are firing and its trying to look for GL/glu.h which is invalid on my mac install. Not sure whether -DUNIX is in fact necessary on my mac or not... There's probably a clean fix for this, but in case any mac hackers want a quick fix, here is one.

--Tomasz

C++11 support

C++11 completely changes the way that random numbers are generated, and deprecates things such as tr1.

I was thinking of setting up a separate branch to look at the C++11 issues and to see if it works okay on various platforms. (In particular, the Mavericks clang build on a Mac is currently broken as a result.)

Any concerns?

HyperGraph DataContainer and Data double free

the destructor of HyperGraph::DataContainer deletes the whole chain of HyperGraph::Data objects. However, the destructor of HyperGraph::Data also tries to delete the next element in the object chain. Therefore, delete is called twice on some HyperGraph::Data objects. This is not an issue if there is only one HyperGraph::Data object in the container (I guess that is the reason why it was not reported earlier). The correct fix would be to change the HyperGraph::Data destructor to noop?!

DataContainer destructor:
https://github.com/RainerKuemmerle/g2o/blob/master/g2o/core/hyper_graph.h#L124
Data destructor:
https://github.com/RainerKuemmerle/g2o/blob/master/g2o/core/hyper_graph.cpp#L39

How to check for convergence

Hello,

I have constructed a very simple slam3d-graph problem with just 3 nodes and 3 edges. The optimization works correctly, however it always does as many iterations as I give it in SparseOptimizer::optimize(int iterations). Shouldn't such a simple problem converge much faster? Or do I have to call it with iterations=1 and check any criteria myself?

Best regards,
Sebastian

Viewer crashes with std::bad_typeid when opening an EdgeProjectXYZ2UV

Hi,

I'm having trouble with the g2o_viewer. I added the line

optimizer.save("before_optimization.g2o");

to the sba example after the optimizer initialization (file sba_demo, line 361). Then I opened the file with the g2o_viewer: it crashes and it gives me the error std::bad_typeid.

This line of code (optimizable_graph::resolveParameters::181)

if (typeid(**_parameters[i]).name()!=_parameterTypes[i]){ 
[...]

throws the error.

I believe that something wrong happens in this initialization of the edge type:

EdgeProjectXYZ2UV::EdgeProjectXYZ2UV() : BaseBinaryEdge<2, Vector2d, VertexSBAPointXYZ, VertexSE3Expmap>() {
  _cam = 0;
  resizeParameters(1);
  installParameter(_cam, 0);
}

Indeed, by commenting the lines inside the brackets, the viewer does not crash (but it shows nothing). I did not manage to fix this issue and I would be very grateful if you can help me.

Thanks a lot,

Andrea

Interleaved execution of SparseOptimizerIncremental::initiateOptimization and updateInitialization

Hi
I am trying to do incremental optimization . The algorithm demand that only a selected edges be optimized in some steps! Any edge could be part of optimization in one iteration but may not in future or vice-versa!
In current implementation, I do following steps:

  1. SparseOptimizerIncremental::initializeOptimization
    followed by
    SparseOptimizerIncremental::updateInitialization(vset,eset) for newly added edges.

This works fine. Now I want to include only a subset of edges in optimization process.
I perform SparseOptimizerIncremental::initializeOptimization( EdgeSet::subset_active_edges) with subset of edges. It is resulting in Cholmod failure because matrix in not psd. Same error is reported for SparseOptimizerIncremental::initializeOptimization(0). I presumed that this will clean the current stored calculations, hence will enable a fresh optimization iteration!!

Do one need to create a fresh instance of optimizer for each iteration which involves only a subset of total edges of optimizer?

thanks

Fix Visual Studio 2013 crashes

Please, apply the following fixes. VS seems to be very bad in type deduction

diff --git a/g2o/core/sparse_block_matrix.hpp b/g2o/core/sparse_block_matrix.hpp
index 2086aa1..660f777 100644
--- a/g2o/core/sparse_block_matrix.hpp
+++ b/g2o/core/sparse_block_matrix.hpp
@@ -273,9 +273,9 @@ namespace g2o {
         if (destOffset > srcOffset) // only upper triangle
           break;
         // destVec += *a * srcVec (according to the sub-vector parts)
-        internal::axpy(*a, srcVec, srcOffset, destVec, destOffset);
+        internal::template axpy<typename SparseBlockMatrix<MatrixType>::SparseMatrixBlock>(*a, srcVec, srcOffset, destVec, destOffset);
         if (destOffset < srcOffset)
-          internal::atxpy(*a, srcVec, destOffset, destVec, srcOffset);
+            internal::template atxpy<typename SparseBlockMatrix<MatrixType>::SparseMatrixBlock>(*a, srcVec, destOffset, destVec, srcOffset);
       }
     }
   }
diff --git a/g2o/core/sparse_block_matrix_diagonal.h b/g2o/core/sparse_block_matrix_diagonal.h
index 245eab7..b773263 100644
--- a/g2o/core/sparse_block_matrix_diagonal.h
+++ b/g2o/core/sparse_block_matrix_diagonal.h
@@ -94,7 +94,7 @@ namespace g2o {
           int srcOffset = destOffset;
           const SparseMatrixBlock& A = _diagonal[i];
           // destVec += *A.transpose() * srcVec (according to the sub-vector parts)
-          internal::axpy(A, srcVec, srcOffset, destVec, destOffset);
+          internal::template axpy<SparseMatrixBlock>(A, srcVec, srcOffset, destVec, destOffset);
         }
       }


And fix in matrix_operations.h:

diff --git a/g2o/core/matrix_operations.h b/g2o/core/matrix_operations.h
index 28e6fbe..a1082cf 100644
--- a/g2o/core/matrix_operations.h
+++ b/g2o/core/matrix_operations.h
@@ -45,7 +45,7 @@ namespace g2o {
     }

     template<>
-    inline void axpy(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
+    inline void axpy<Eigen::MatrixXd>(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
     {
       y.segment(yoff, A.rows()) += A * x.segment(xoff, A.cols());
     }
@@ -63,7 +63,7 @@ namespace g2o {
     }

     template<>
-    inline void atxpy(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
+    inline void atxpy<Eigen::MatrixXd>(const Eigen::MatrixXd& A, const Eigen::Map<const Eigen::VectorXd>& x, int xoff, Eigen::Map<Eigen::VectorXd>& y, int yoff)
     {
       y.segment(yoff, A.cols()) += A.transpose() * x.segment(xoff, A.rows());
     }

FindG2O.cmake does not work for ROS

FindG2O.cmake does not look under the libg2o_*.so binaries under standard ROS library install path that comes with ros-hydro-libg2o.

Ideally, CMAKE_PREFIX_PATH would be appended to the end of the find_library call such that when ROS is present, FindG2O.cmake will be able to find these libraries if they are not found in paths that precede it.

exception std::bad_typeid when I try insert an edge of type EdgeSE3PointXYZ

Hi, I have a problem to insert the edges EdgeSE3PointXYZ in the graph. For example, I have wrote this code:

g2o::VertexSE3 *vert_to;
g2o::EdgeSE3 *edgeSE3;

g2o::VertexPointXYZ *vpXYZ;
g2o::EdgeSE3PointXYZ *epXYZ;

//adding firts vertex of pose. (0,0,0,0,0,0)
long int ID = 0;
//adding vertex and its restriction to graph

g2o::VertexSE3 *vert_from = new g2o::VertexSE3();
vert_from->setId(ID++);
Eigen::Isometry3d cameraPose;
Eigen::Matrix3d R;
R << 0, 0, 0,
    0, 0, 0,
    0, 0, 0;
cameraPose = R;
cameraPose.translation() = g2o::Vector3d(0, 0, 0);

vert_from->setEstimate(cameraPose);

optimizer.addVertex(vert_from);

//--------------CREATING VERTEX POINT XYZ (LANDMARK)-------------------

vpXYZ = new g2o::VertexPointXYZ();
vpXYZ->setEstimate(Eigen::Vector3d(3, 3, 3));
vpXYZ->setId(ID++);


//--------------CREATING EDGE MEASUREMENT CONSTRAINS-------------------
epXYZ = new g2o::EdgeSE3PointXYZ();
epXYZ->vertices()[0] = vert_from;
epXYZ->vertices()[1] = vpXYZ;
epXYZ->setId(ID++);
epXYZ->setMeasurement(Eigen::Vector3d(3, 3, 3)); //revisar bien esta parte...!!!!

//--------------ADDING VERTEX AND EDGE TO GRAPH------------------------
//add to graph
optimizer.addVertex(vpXYZ);
cout << epXYZ->Dimension << " " << epXYZ->informationData()[0] << " " << epXYZ->informationData()[1] << " " << epXYZ->informationData()[2] << endl;
double data[7];
g2o::HyperGraph::Vertex* v = epXYZ->vertex(0);
((g2o::VertexPointXYZ*)v)->getEstimateData(data);
cout << data[2] << " " << data[5] << " " << data[8];
optimizer.addEdge(epXYZ);

Implement clone() method in VertexSE3 and EdgeSE3

Currently, VertexSE3 and EdgeSE3 don't implement the clone method. This is probably also true for other Vertex and Edge classes. Therefore, addGraph(...) fails. I could assist to implement this feature, but I have some doubts about the "deep copy" mentioned in the comment of the clone() declaration. If a vertex is cloned should also the associated edges be duplicated? If recursed this would clone the whole graph, right? Or is the method intended to clone only the data contained in/owned by the vertex/edge and just copy the pointer to edges/user data/...?

Homebrew g2o formula

Hi There,

Do you mind if I submit the g2o library as a Homebrew Formula for easy installation and compiling on mac?

The current formula downloads/installs/compiles correctly on my device but I have yet to open it up to additional testing as I wanted to get approval before I did that.

This is the current ruby script for the g2o lib in Homebrew:

require 'formula'

class G2o < Formula
  homepage 'http://openslam.org/g2o.html'
  url 'https://github.com/RainerKuemmerle/g2o.git', :branch => 'master'
  version '13.'

  depends_on 'cmake'
  depends_on 'eigen'
  depends_on 'suite-sparse'
  depends_on 'qt'
  depends_on 'libqglviewer'

  def options
    [
      ['--no_apps',"Don't build applications"],
      ['--deprecated', "Build deprecated types"],
      ['--examples', "Build examples"],
      ['--linked', "Build linked applications"],
      ['--csparse', "Build csparse"],
      ['--no_opengl',"Disable use opengl"],
      ['--use_openmp', "Use openmp"],
    ]
  end

  def install
    args = std_cmake_parameters.split

    if ARGV.include? '--no_apps'
      args << "-DG2O_BUILD_APPS:BOOL=OFF"
    end
    if ARGV.include? '--deprecated'
      args << "-DG2O_BUILD_DEPRECATED_TYPES:BOOL=ON"
    end
    if ARGV.include? '--examples'
      args << "-DG2O_BUILD_EXAMPLES:BOOL=OFF"
    end
    if ARGV.include? '--linked'
      args << "-DG2O_BUILD_LINKED_APPS:BOOL=ON"
    end
    if ARGV.include? '--csparse'
      args << "-DBUILD_CSPARSE:BOOL=ON"
    end
    if ARGV.include? '--no_opengl'
      args << "DG2O_USE_OPENGL:BOOL=OFF"
    end
    if ARGV.include? '--use_opengl'
      args << "DG2O_USE_OPENMP:BOOL=ON"
    end

    system "mkdir build"
    args << ".."
    Dir.chdir 'build' do
      system "cmake", *args
      system "make install"
    end
  end
end

Cheers,
James

Macro redefinition issue

I tried to include g2o in another program and when I include the header file g2o/core/optimization_algorithm_gauss_newton.h

it returns the error ' _optimizer is not declared in this scope' in ' g2o / core / optimization_algorithm.h '.

After some hours of debugging, we figured out we have defined a macro OK in our own header file. But 'OK' is redefined in
enum G2O_CORE_API SolverResult {Terminate=2, OK=1, Fail=-1};

I just report this issue to see if it can be avoided later. Thanks a lot.

Jin

EdgeSE3Prior: bad typeid

Hello,

I am trying to use the unary edge EdgeSE3Prior as a prior to a vertex. However, when I try adding it the the SparseOptimizer it throws an exception of bad_typeid. The error occurs in OptimizableGraph::Edge::resolveParameters().
Any ideas on what's going on there?

Thanks

Cholesky failure

Hallo,

I am using g2o to solve a laser based 2D-SLAM. I used the types from types/slam2d to build the graph and the Cholmod-LinearSolver for the optimization process. It seems to work correctly from time to time, but often the call to optimize() fails and I get:

Cholesky failure, writing debug.txt (Hessian loadable by Octave)

on the console. What could be a reason / solution for this?

Best regards,
Sebastian

exception std::bad_typeid when I try insert an edge of type EdgeSE3PointXYZ

Hi, I have a problem to insert the edges EdgeSE3PointXYZ in the graph. For example, I have wrote this code:

    g2o::VertexSE3 *vert_to;
    g2o::EdgeSE3 *edgeSE3;

    g2o::VertexPointXYZ *vpXYZ;
    g2o::EdgeSE3PointXYZ *epXYZ;


//adding firts vertex of pose. (0,0,0,0,0,0)
long int ID = 0;
//adding vertex and its restriction to graph

g2o::VertexSE3 *vert_from = new g2o::VertexSE3();
vert_from->setId(ID++);
Eigen::Isometry3d cameraPose;
Eigen::Matrix3d R;
R << 0, 0, 0,
    0, 0, 0,
    0, 0, 0;
cameraPose = R;
cameraPose.translation() = g2o::Vector3d(0, 0, 0);

vert_from->setEstimate(cameraPose);

optimizer.addVertex(vert_from);

//--------------CREATING VERTEX POINT XYZ (LANDMARK)-------------------

vpXYZ = new g2o::VertexPointXYZ();
vpXYZ->setEstimate(Eigen::Vector3d(3, 3, 3));
vpXYZ->setId(ID++);


//--------------CREATING EDGE MEASUREMENT CONSTRAINS-------------------
epXYZ = new g2o::EdgeSE3PointXYZ();
epXYZ->vertices()[0] = vert_from;
epXYZ->vertices()[1] = vpXYZ;
epXYZ->setId(ID++);
epXYZ->setMeasurement(Eigen::Vector3d(3, 3, 3)); //revisar bien esta parte...!!!!

//--------------ADDING VERTEX AND EDGE TO GRAPH------------------------
//add to graph
optimizer.addVertex(vpXYZ); 
optimizer.addEdge(epXYZ);

Then, in the last line, when I insert the edge epXYZ in the graph I get the exception std::bad_typeid.
Please, can you help me? What I have wrong??

thanks
Maikel

Problems in Windows Native Development Environment

Hi. I finally compiled and tested 'g2o' in my Windows native development environment, MSVC 2008 with Qt SDK and libQGLViewer.

I found the following problems in the current version for Windows. Since I cannot access 'g2o' repository, I cannot apply my solutions to work 'g2o' correctly in Windows. Even though the problems and solutions are trivial, please apply solutions to 'g2o' for further Windows users' convenience.

[Compile Error 1] 'usleep()' functions in 'g2o/examples/slam2d/slam2d_g2o.cpp' and 'g2o/apps/g2o_viewer/g2o_viewer.cpp'
Solution:
#ifdef _WINDOWS

include < windows.h >

#else

include < unistd.h >

#endif

ifdef _WINDOWS

Sleep(10);           // [msec]

else

usleep(10000);  // [usec]

endif

[Compile Error 2] Missing GLU-related definitions in 'g2o/examples/slam2d/draw_helper.cpp'
Solution:

ifdef _WINDOWS

include < gl/GLU.h >

endif

[Compile Error 3] Missing 'M_PI' definitions in 'g2o/examples/slam2d/draw_helper.cpp'
Solutions:

define _USE_MATH_DEFINES

include < cmath >

Finally, I found more bugs especially in 'examples', and I will report them later.

cs.h: No such file or directory

When trying including g2o/solvers/csparse/linear_solver_csparse.h, like is done in tutorial_slam2d, I get the following error from csparse_helper.h when compiling:

cs.h: No such file or directory

It seems that rather than including cs.h, csparse_helper should be looking to include suitesparse/cs.h?

Do you have any insight on this?

Thanks

Linking Error in Windows 7

Hello,

I currently have problems linking g2o to my program in Windows.

I have successfully built the g2o with the help of CMake. I used MSVC 2010 Pro Edition (VC10) and built 2 variants of the library - 32/64 bit. I am using Windows 7 Professional Edition.

After placing the .dll and .lib files in the directories my solution/project files search for libraries, I get the following linking error when I try to build the project:

1>graph_optimizer_sparse_online.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl g2o::SE2::fromVector(class Eigen::Matrix<double,3,1,0,3,1> const &)" (_imp?fromVector@SE2@g2o@@QEAAXAEBV?$Matrix@N$02$00$0A@$02$00@Eigen@@@z) referenced in function "public: void __cdecl g2o::OnlineVertexSE2::oplusUpdatedEstimate(double *)" (?oplusUpdatedEstimate@OnlineVertexSE2@g2o@@QEAAXPEAN@Z)
1>graph_optimizer_sparse_online.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class Eigen::Matrix<double,3,1,0,3,1> __cdecl g2o::SE2::toVector(void)const " (_imp?toVector@SE2@g2o@@qeba?AV?$Matrix@N$02$00$0A@$02$00@Eigen@@xz) referenced in function "public: void __cdecl g2o::OnlineVertexSE2::oplusUpdatedEstimate(double *)" (?oplusUpdatedEstimate@OnlineVertexSE2@g2o@@QEAAXPEAN@Z)
1>graph_optimizer_sparse_online.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __cdecl g2o::BaseVertex<3,class g2o::SE2>::setEstimate(class g2o::SE2 const &)" (_imp?setEstimate@?$BaseVertex@$02VSE2@g2o@@@g2o@@QEAAXAEBVSE2@2@@z) referenced in function "public: virtual int __cdecl g2o::SparseOptimizerOnline::optimize(int,bool)" (?optimize@SparseOptimizerOnline@g2o@@UEAAHH_N@Z)

This seems to suggest that in the process of building the library itself, certain symbols were left out, resulting in link error related to __declspec.

Is there any way I can fix this problem? Or am I using the library in the wrong manner?

Do let me know if you need more information from me to resolve this problem.

Thank you.

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.