Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error #121

Closed
QinZiwen opened this issue Oct 1, 2016 · 36 comments
Closed

Build error #121

QinZiwen opened this issue Oct 1, 2016 · 36 comments

Comments

@QinZiwen
Copy link

QinZiwen commented Oct 1, 2016

I use Ubuntu14.04 , ros indigo and kinect2, but when I build, some error show me:

$ catkin_make
-- +++ processing catkin package: 'rtabmap_ros'
-- ==> add_subdirectory(rtabmap_ros)
-- Using these message generators: gencpp;genlisp;genpy
CMake Error at rtabmap_ros/CMakeLists.txt:21 (find_package):
  Could not find a configuration file for package "RTABMap" that is
  compatible with requested version "0.11.10".

  The following configuration files were considered but not accepted:

    /opt/ros/indigo/lib/x86_64-linux-gnu/rtabmap-0.11/RTABMapConfig.cmake, version: 0.11.7



-- Configuring incomplete, errors occurred!
See also "/home/turtlebot/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/turtlebot/catkin_ws/build/CMakeFiles/CMakeError.log".
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

help me, Thank you very much!

@matlabbe
Copy link
Member

matlabbe commented Oct 1, 2016

You should update ($ git pull) your rtabmap source repository and make install it again.

@QinZiwen
Copy link
Author

QinZiwen commented Oct 2, 2016

@matlabbe Thank you. I " git pull my rtabmap source", but when I "make -j4", some error show me:

[  9%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/edge_se3Switchable.cpp.o
[ 10%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/edge_switchPrior.cpp.o
[ 10%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/types_g2o_robust.cpp.o
[ 11%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/vertigo/g2o/vertex_switchLinear.cpp.o
In file included from /usr/local/include/gtsam/geometry/Pose2.h:24:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:39:
/usr/local/include/gtsam/base/Matrix.h: In function ‘void gtsam::inplace_QR(MATRIX&)’:
/usr/local/include/gtsam/base/Matrix.h:316:71: error: expected ‘;’ before ‘::’ token
   Eigen::internal::householder_qr_inplace_blocked<MATRIX, HCoeffsType>::run(A, hCoeffs, 48, temp.data());
                                                                       ^
In file included from /usr/local/include/gtsam/geometry/Pose2.h:26:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:39:
/usr/local/include/gtsam/geometry/Point2.h: In static member function ‘static gtsam::Vector gtsam::Point2::Logmap(const gtsam::Point2&)’:
/usr/local/include/gtsam/geometry/Point2.h:175:86: error: could not convert ‘Eigen::DenseBase<Derived>::operator<<(const Scalar&) [with Derived = Eigen::Matrix<double, -1, 1>; Eigen::DenseBase<Derived>::Scalar = double]((* &(& dp)->gtsam::Point2::x())).Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, 1> >((* &(& dp)->gtsam::Point2::y()))’ from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘gtsam::Vector {aka Eigen::Matrix<double, -1, 1>}’
   static inline Vector Logmap(const Point2& dp) { return (Vector(2) << dp.x(), dp.y()); }
                                                                                      ^
In file included from /usr/local/include/gtsam/geometry/Pose2.h:27:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:39:
/usr/local/include/gtsam/geometry/Rot2.h: In static member function ‘static gtsam::Vector gtsam::Rot2::Logmap(const gtsam::Rot2&)’:
/usr/local/include/gtsam/geometry/Rot2.h:173:25: error: could not convert ‘Eigen::DenseBase<Derived>::operator<<(const Scalar&) [with Derived = Eigen::Matrix<double, -1, 1>; Eigen::DenseBase<Derived>::Scalar = double]((* &(& r)->gtsam::Rot2::theta()))’ from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘gtsam::Vector {aka Eigen::Matrix<double, -1, 1>}’
       return (Vector(1) << r.theta());
                         ^
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:39:0:
/usr/local/include/gtsam/geometry/Pose2.h: In static member function ‘static gtsam::Matrix gtsam::Pose2::wedge(double, double, double)’:
/usr/local/include/gtsam/geometry/Pose2.h:178:20: error: could not convert ‘(&(&(&(&(&(&(& Eigen::DenseBase<Derived>::operator<<(const Scalar&) [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::DenseBase<Derived>::Scalar = double]((* &0.0)).Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &(- w))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& vx))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& w))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& vy))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0))’ from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, -1> >’ to ‘gtsam::Matrix {aka Eigen::Matrix<double, -1, -1>}’
         0., 0.,  0.);
                    ^
In file included from /usr/local/include/gtsam/geometry/Pose3.h:30:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:40:
/usr/local/include/gtsam/geometry/Rot3.h: In static member function ‘static gtsam::Rot3 gtsam::Rot3::rodriguez(double, double, double)’:
/usr/local/include/gtsam/geometry/Rot3.h:197:51: error: no matching function for call to ‘gtsam::Rot3::rodriguez(Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >&)’
       { return rodriguez((Vector(3) << wx, wy, wz));}
                                                   ^
/usr/local/include/gtsam/geometry/Rot3.h:197:51: note: candidates are:
/usr/local/include/gtsam/geometry/Rot3.h:164:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const Vector&, double)
     static Rot3 rodriguez(const Vector& w, double theta);
                 ^
/usr/local/include/gtsam/geometry/Rot3.h:164:17: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/gtsam/geometry/Rot3.h:172:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const gtsam::Point3&, double)
     static Rot3 rodriguez(const Point3& w, double theta);
                 ^
/usr/local/include/gtsam/geometry/Rot3.h:172:17: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/gtsam/geometry/Rot3.h:180:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const gtsam::Unit3&, double)
     static Rot3 rodriguez(const Unit3& w, double theta);
                 ^
/usr/local/include/gtsam/geometry/Rot3.h:180:17: note:   candidate expects 2 arguments, 1 provided
/usr/local/include/gtsam/geometry/Rot3.h:187:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(const Vector&)
     static Rot3 rodriguez(const Vector& v);
                 ^
/usr/local/include/gtsam/geometry/Rot3.h:187:17: note:   no known conversion for argument 1 from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, 1> >’ to ‘const Vector& {aka const Eigen::Matrix<double, -1, 1>&}’
/usr/local/include/gtsam/geometry/Rot3.h:196:17: note: static gtsam::Rot3 gtsam::Rot3::rodriguez(double, double, double)
     static Rot3 rodriguez(double wx, double wy, double wz)
                 ^
/usr/local/include/gtsam/geometry/Rot3.h:196:17: note:   candidate expects 3 arguments, 1 provided
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:40:0:
/usr/local/include/gtsam/geometry/Pose3.h: In static member function ‘static gtsam::Matrix gtsam::Pose3::wedge(double, double, double, double, double, double)’:
/usr/local/include/gtsam/geometry/Pose3.h:226:28: error: could not convert ‘(&(&(&(&(&(&(&(&(&(&(&(&(&(& Eigen::DenseBase<Derived>::operator<<(const Scalar&) [with Derived = Eigen::Matrix<double, -1, -1>; Eigen::DenseBase<Derived>::Scalar = double]((* &0.0)).Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &(- wz))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& wy))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& vx))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& wz))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &(- wx))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& vy))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &(- wy))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& wx))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((*(const Scalar*)(& vz))))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0)))->Eigen::CommaInitializer<MatrixType>::operator,<Eigen::Matrix<double, -1, -1> >((* &0.0))’ from ‘Eigen::CommaInitializer<Eigen::Matrix<double, -1, -1> >’ to ‘gtsam::Matrix {aka Eigen::Matrix<double, -1, -1>}’
           0.,  0.,  0.,  0.);
                            ^
[ 11%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/OctoMap.cpp.o
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/betweenFactorSwitchable.h:17:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:55:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h: In member function ‘gtsam::Vector vertigo::SwitchVariableLinear::localCoordinates(const vertigo::SwitchVariableLinear&) const’:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:62:90: error: ‘Vector1’ is not a member of ‘gtsam’
     inline gtsam::Vector localCoordinates(const SwitchVariableLinear& t2) const { return gtsam::Vector1(t2.value() - value()); }
                                                                                          ^
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/betweenFactorSwitchable.h:17:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:55:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h: In static member function ‘static gtsam::Vector vertigo::SwitchVariableLinear::Logmap(const vertigo::SwitchVariableLinear&)’:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:96:80: error: ‘Vector1’ is not a member of ‘gtsam’
     static inline gtsam::Vector Logmap(const SwitchVariableLinear& p) { return gtsam::Vector1(p.value()); }
                                                                                ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h: At global scope:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:115:11: error: ‘OptionalJacobian’ does not name a type
   typedef OptionalJacobian<3, 3> ChartJacobian;
           ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:118:3: error: ‘ChartJacobian’ has not been declared
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
   ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:118:40: error: ‘ChartJacobian’ has not been declared
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
                                        ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:122:9: error: ‘ChartJacobian’ has not been declared
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
         ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:122:41: error: ‘ChartJacobian’ has not been declared
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
                                         ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:118:34: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
                                  ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:118:70: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
                                                                      ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:122:35: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
                                   ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:122:67: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
                                                                   ^
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/betweenFactorSwitchable.h:18:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:55:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h: In member function ‘gtsam::Vector vertigo::SwitchVariableSigmoid::localCoordinates(const vertigo::SwitchVariableSigmoid&) const’:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:62:91: error: ‘Vector1’ is not a member of ‘gtsam’
     inline gtsam::Vector localCoordinates(const SwitchVariableSigmoid& t2) const { return gtsam::Vector1(t2.value() - value()); }
                                                                                           ^
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/betweenFactorSwitchable.h:18:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:55:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h: In static member function ‘static gtsam::Vector vertigo::SwitchVariableSigmoid::Logmap(const vertigo::SwitchVariableSigmoid&)’:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:96:81: error: ‘Vector1’ is not a member of ‘gtsam’
     static inline gtsam::Vector Logmap(const SwitchVariableSigmoid& p) { return gtsam::Vector1(p.value()); }
                                                                                 ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h: At global scope:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:116:11: error: ‘OptionalJacobian’ does not name a type
   typedef OptionalJacobian<3, 3> ChartJacobian;
           ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:119:3: error: ‘ChartJacobian’ has not been declared
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
   ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:119:40: error: ‘ChartJacobian’ has not been declared
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
                                        ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:123:9: error: ‘ChartJacobian’ has not been declared
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
         ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:123:41: error: ‘ChartJacobian’ has not been declared
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
                                         ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:119:34: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
                                  ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:119:70: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
   ChartJacobian Horigin = boost::none, ChartJacobian Hother = boost::none) {
                                                                      ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:123:35: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
                                   ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:123:67: error: could not convert ‘boost::none’ from ‘const none_t {aka int boost::detail::none_helper::* const}’ to ‘int’
         ChartJacobian H1 = boost::none, ChartJacobian H2 = boost::none) {
                                                                   ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp: In member function ‘virtual std::map<int, rtabmap::Transform> rtabmap::OptimizerGTSAM::optimize(int, const std::map<int, rtabmap::Transform>&, const std::multimap<int, rtabmap::Link>&, std::list<std::map<int, rtabmap::Transform> >*, double*, int*)’:
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:152:100: error: ‘Vector1’ is not a member of ‘gtsam’
     gtsam::noiseModel::Diagonal::shared_ptr switchPriorModel = gtsam::noiseModel::Diagonal::Sigmas(gtsam::Vector1(1.0));
                                                                                                    ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:246:37: error: ‘const class gtsam::Value’ has no member named ‘cast’
        gtsam::Pose2 p = iter->value.cast<gtsam::Pose2>();
                                     ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:246:54: error: expected primary-expression before ‘>’ token
        gtsam::Pose2 p = iter->value.cast<gtsam::Pose2>();
                                                      ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:246:56: error: expected primary-expression before ‘)’ token
        gtsam::Pose2 p = iter->value.cast<gtsam::Pose2>();
                                                        ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:251:37: error: ‘const class gtsam::Value’ has no member named ‘cast’
        gtsam::Pose3 p = iter->value.cast<gtsam::Pose3>();
                                     ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:251:54: error: expected primary-expression before ‘>’ token
        gtsam::Pose3 p = iter->value.cast<gtsam::Pose3>();
                                                      ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:251:56: error: expected primary-expression before ‘)’ token
        gtsam::Pose3 p = iter->value.cast<gtsam::Pose3>();
                                                        ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:308:35: error: ‘const class gtsam::Value’ has no member named ‘cast’
      gtsam::Pose2 p = iter->value.cast<gtsam::Pose2>();
                                   ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:308:52: error: expected primary-expression before ‘>’ token
      gtsam::Pose2 p = iter->value.cast<gtsam::Pose2>();
                                                    ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:308:54: error: expected primary-expression before ‘)’ token
      gtsam::Pose2 p = iter->value.cast<gtsam::Pose2>();
                                                      ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:313:35: error: ‘const class gtsam::Value’ has no member named ‘cast’
      gtsam::Pose3 p = iter->value.cast<gtsam::Pose3>();
                                   ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:313:52: error: expected primary-expression before ‘>’ token
      gtsam::Pose3 p = iter->value.cast<gtsam::Pose3>();
                                                    ^
/home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:313:54: error: expected primary-expression before ‘)’ token
      gtsam::Pose3 p = iter->value.cast<gtsam::Pose3>();
                                                      ^
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/betweenFactorSwitchable.h:17:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:55:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h: In member function ‘gtsam::Vector vertigo::SwitchVariableLinear::localCoordinates(const vertigo::SwitchVariableLinear&) const’:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableLinear.h:62:128: warning: control reaches end of non-void function [-Wreturn-type]
     inline gtsam::Vector localCoordinates(const SwitchVariableLinear& t2) const { return gtsam::Vector1(t2.value() - value()); }
                                                                                                                                ^
In file included from /home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/betweenFactorSwitchable.h:18:0,
                 from /home/turtlebot/Project_slam/rtabmap/corelib/src/OptimizerGTSAM.cpp:55:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h: In member function ‘gtsam::Vector vertigo::SwitchVariableSigmoid::localCoordinates(const vertigo::SwitchVariableSigmoid&) const’:
/home/turtlebot/Project_slam/rtabmap/corelib/src/vertigo/gtsam/switchVariableSigmoid.h:62:129: warning: control reaches end of non-void function [-Wreturn-type]
     inline gtsam::Vector localCoordinates(const SwitchVariableSigmoid& t2) const { return gtsam::Vector1(t2.value() - value()); }
                                                                                                                                 ^
make[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/OptimizerGTSAM.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
make: *** [all] Error 2

My gtsam version is 3.2.1, The error is appear because my gtsam version mistake?

@matlabbe
Copy link
Member

matlabbe commented Oct 2, 2016

indeed you should use gtsam latest version:
git clone https://bitbucket.org/gtborg/gtsam.git

@QinZiwen
Copy link
Author

QinZiwen commented Oct 3, 2016

new error appear:

[  8%] Built target rtabmap_ros_gencfg
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/icp_odometry
[  8%] Built target _rtabmap_ros_generate_messages_check_deps_OdomInfo
[  8%] Built target _rtabmap_ros_generate_messages_check_deps_Point2f
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbdicp_odometry
[  9%] Built target rtabmap
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/stereo_odometry
/usr/bin/ld: warning: libfreenect.so.0.2, needed by /opt/ros/indigo/lib/x86_64-linux-gnu/librtabmap_core.so, may conflict with libfreenect.so.0.5
CMakeFiles/icp_odometry.dir/src/ICPOdometryNode.cpp.o: In function `main':
ICPOdometryNode.cpp:(.text+0x110): undefined reference to `rtabmap::Parameters::getDefaultOdometryParameters(bool, bool, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/icp_odometry] Error 1
make[1]: *** [rtabmap_ros/CMakeFiles/icp_odometry.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: warning: libfreenect.so.0.2, needed by /opt/ros/indigo/lib/x86_64-linux-gnu/librtabmap_core.so, may conflict with libfreenect.so.0.5
CMakeFiles/stereo_odometry.dir/src/StereoOdometryNode.cpp.o: In function `main':
StereoOdometryNode.cpp:(.text+0x110): undefined reference to `rtabmap::Parameters::getDefaultOdometryParameters(bool, bool, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/stereo_odometry] Error 1
make[1]: *** [rtabmap_ros/CMakeFiles/stereo_odometry.dir/all] Error 2
/usr/bin/ld: warning: libfreenect.so.0.2, needed by /opt/ros/indigo/lib/x86_64-linux-gnu/librtabmap_core.so, may conflict with libfreenect.so.0.5
CMakeFiles/rgbd_odometry.dir/src/RGBDOdometryNode.cpp.o: In function `main':
RGBDOdometryNode.cpp:(.text+0x110): undefined reference to `rtabmap::Parameters::getDefaultOdometryParameters(bool, bool, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry] Error 1
make[1]: *** [rtabmap_ros/CMakeFiles/rgbd_odometry.dir/all] Error 2
/usr/bin/ld: warning: libfreenect.so.0.2, needed by /opt/ros/indigo/lib/x86_64-linux-gnu/librtabmap_core.so, may conflict with libfreenect.so.0.5
CMakeFiles/rgbdicp_odometry.dir/src/RGBDICPOdometryNode.cpp.o: In function `main':
RGBDICPOdometryNode.cpp:(.text+0x110): undefined reference to `rtabmap::Parameters::getDefaultOdometryParameters(bool, bool, bool)'
collect2: error: ld returned 1 exit status
make[2]: *** [/home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbdicp_odometry] Error 1
make[1]: *** [rtabmap_ros/CMakeFiles/rgbdicp_odometry.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

@matlabbe
Copy link
Member

matlabbe commented Oct 3, 2016

Can you do:

$ catkin_make -j1 VERBOSE=1

Looks like you have still rtabmap binaries installed (/opt/ros/indigo/...). You should remove them:

$ sudo apt-get remove ros-indigo-rtabmap

cheers

@QinZiwen
Copy link
Author

QinZiwen commented Oct 4, 2016

Thanks for your help, but there are new errors:

[ 10%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap.dir/src/CoreNode.cpp.o
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/icp_odometry
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbdicp_odometry
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry
In file included from /home/turtlebot/catkin_ws/src/rtabmap_ros/src/CoreNode.cpp:28:0:
/home/turtlebot/catkin_ws/src/rtabmap_ros/include/rtabmap_ros/CoreWrapper.h:47:32: fatal error: rtabmap_ros/GetMap.h: No such file or directory
 #include "rtabmap_ros/GetMap.h"
                                ^
compilation terminated.
[ 10%] Built target icp_odometry
Scanning dependencies of target stereo_odometry
[ 10%] Building CXX object rtabmap_ros/CMakeFiles/stereo_odometry.dir/src/StereoOdometryNode.cpp.o
[ 10%] Built target rgbdicp_odometry
[ 11%] Built target find_object_2d_generate_messages_lisp
[ 11%] Built target rgbd_odometry
[ 11%] Built target find_object_2d_generate_messages_cpp
[ 12%] Built target find_object_2d_generate_messages_py
[ 16%] Built target frontier_exploration_generate_messages_cpp
[ 16%] Built target turtlebot_exploration_3d
[ 21%] Built target frontier_exploration_generate_messages_lisp
[ 26%] Scanning dependencies of target rtabmap_ros_generate_messages_cpp
Built target frontier_exploration_generate_messages_py
[ 27%] Generating C++ code from rtabmap_ros/MapData.msg
Scanning dependencies of target rtabmap_ros_generate_messages_py
[ 28%] Generating Python from MSG rtabmap_ros/MapData
[ 28%] Generating Python from MSG rtabmap_ros/NodeData
[ 29%] Generating Python from MSG rtabmap_ros/OdomInfo
[ 29%] Generating C++ code from rtabmap_ros/NodeData.msg
[ 29%] Generating Python from MSG rtabmap_ros/MapGraph
[ 30%] Generating Python from MSG rtabmap_ros/Goal
[ 30%] Generating Python from MSG rtabmap_ros/UserData
[ 30%] Generating Python from MSG rtabmap_ros/Link
[ 31%] Generating C++ code from rtabmap_ros/OdomInfo.msg
[ 32%] Generating Python from MSG rtabmap_ros/Info
[ 32%] Generating Python from MSG rtabmap_ros/RGBDImage
[ 34%] Generating Python from MSG rtabmap_ros/KeyPoint
[ 34%] Generating C++ code from rtabmap_ros/MapGraph.msg
[ 34%] Generating Python from MSG rtabmap_ros/Point2f
[ 35%] Generating Python from MSG rtabmap_ros/Point3f
[ 35%] Generating Python code from SRV rtabmap_ros/GetMap
[ 35%] [ 35%] Generating Python code from SRV rtabmap_ros/ListLabels
Generating C++ code from rtabmap_ros/Goal.msg
[ 36%] Generating Python code from SRV rtabmap_ros/SetGoal
[ 36%] Generating Python code from SRV rtabmap_ros/ResetPose
[ 37%] Generating Python code from SRV rtabmap_ros/SetLabel
[ 38%] Generating C++ code from rtabmap_ros/UserData.msg
[ 38%] Generating Python code from SRV rtabmap_ros/PublishMap
[ 38%] Generating Python msg __init__.py for rtabmap_ros
[ 39%] Generating Python srv __init__.py for rtabmap_ros
[ 39%] Built target rtabmap_ros_generate_messages_py
Scanning dependencies of target rtabmap_ros_generate_messages_lisp
[ 39%] [ 39%] Generating C++ code from rtabmap_ros/Link.msg
Generating Lisp code from rtabmap_ros/MapData.msg
[ 40%] Generating Lisp code from rtabmap_ros/NodeData.msg
[ 40%] Generating Lisp code from rtabmap_ros/OdomInfo.msg
[ 41%] Generating C++ code from rtabmap_ros/Info.msg
[ 42%] Generating Lisp code from rtabmap_ros/MapGraph.msg
[ 42%] Generating Lisp code from rtabmap_ros/Goal.msg
[ 42%] Generating Lisp code from rtabmap_ros/UserData.msg
[ 42%] Generating C++ code from rtabmap_ros/RGBDImage.msg
[ 43%] Generating Lisp code from rtabmap_ros/Link.msg
[ 43%] Generating Lisp code from rtabmap_ros/Info.msg
[ 44%] Generating Lisp code from rtabmap_ros/RGBDImage.msg
[ 45%] Generating C++ code from rtabmap_ros/KeyPoint.msg
[ 45%] Generating Lisp code from rtabmap_ros/KeyPoint.msg
[ 46%] Generating Lisp code from rtabmap_ros/Point2f.msg
[ 46%] Generating Lisp code from rtabmap_ros/Point3f.msg
[ 46%] Generating Lisp code from rtabmap_ros/GetMap.srv
[ 46%] Generating C++ code from rtabmap_ros/Point2f.msg
[ 47%] Generating Lisp code from rtabmap_ros/ListLabels.srv
[ 47%] Generating Lisp code from rtabmap_ros/SetGoal.srv
[ 48%] Generating Lisp code from rtabmap_ros/ResetPose.srv
[ 48%] Generating C++ code from rtabmap_ros/Point3f.msg
[ 48%] Generating Lisp code from rtabmap_ros/SetLabel.srv
[ 48%] Generating Lisp code from rtabmap_ros/PublishMap.srv
[ 48%] Built target rtabmap_ros_generate_messages_lisp
[ 48%] Built target find_object_2d_generate_messages
[ 49%] Generating C++ code from rtabmap_ros/GetMap.srv
[ 76%] Built target find_object
[ 77%] Built target print_objects_detected
[ 78%] Built target tf_example
[ 78%] Built target explore_client
[ 79%] Built target explore_costmap
[ 79%] Built target explore_server
[ 79%] Built target frontier_exploration_generate_messages
[ 79%] Built target find_object_2d
[ 79%] Generating C++ code from rtabmap_ros/ListLabels.srv
[ 80%] Generating C++ code from rtabmap_ros/SetGoal.srv
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/stereo_odometry
[ 80%] Generating C++ code from rtabmap_ros/ResetPose.srv
[ 80%] Generating C++ code from rtabmap_ros/SetLabel.srv
[ 81%] Generating C++ code from rtabmap_ros/PublishMap.srv
[ 81%] Built target rtabmap_ros_generate_messages_cpp
Scanning dependencies of target camera
[ 81%] Generating src/rviz/moc_OrbitOrientedViewController.cxx
[ 82%] Building CXX object rtabmap_ros/CMakeFiles/camera.dir/src/CameraNode.cpp.o
[ 82%] Generating src/rviz/moc_MapCloudDisplay.cxx
[ 83%] Generating src/rviz/moc_MapGraphDisplay.cxx
[ 83%] Generating src/rviz/moc_InfoDisplay.cxx
Scanning dependencies of target rtabmap_ros
[ 83%] Built target stereo_odometry
Scanning dependencies of target rtabmap_ros_generate_messages
[ 83%] Built target rtabmap_ros_generate_messages
[ 84%] [ 84%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/costmap_2d/static_layer.cpp.o
Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/rgbd_odometry.cpp.o
Linking CXX executable /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/camera
The bug is not reproducible, so it is likely a hardware or OS problem.
make[2]: *** [rtabmap_ros/CMakeFiles/rtabmap.dir/src/CoreNode.cpp.o] Error 1
make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 85%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/stereo_odometry.cpp.o
[ 85%] Built target camera
[ 85%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/rgbdicp_odometry.cpp.o
[ 86%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/icp_odometry.cpp.o
[ 86%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/data_throttle.cpp.o
[ 86%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/stereo_throttle.cpp.o
[ 87%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/data_odom_sync.cpp.o
[ 87%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/point_cloud_xyzrgb.cpp.o
[ 88%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/point_cloud_xyz.cpp.o
[ 88%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/disparity_to_depth.cpp.o
[ 89%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/obstacles_detection.cpp.o
[ 89%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/obstacles_detection_old.cpp.o
[ 89%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/point_cloud_aggregator.cpp.o
[ 90%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/nodelets/rgbd_sync.cpp.o
[ 90%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/OdometryROS.cpp.o
[ 91%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/MsgConversion.cpp.o
[ 91%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/MapsManager.cpp.o
[ 91%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/CommonDataSubscriber.cpp.o
[ 92%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/CoreWrapper.cpp.o
[ 92%] Building CXX object rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/impl/CommonDataSubscriberDepth.cpp.o
/home/turtlebot/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp: In member function ‘std::map<int, rtabmap::Transform> MapsManager::updateMapCaches(const std::map<int, rtabmap::Transform>&, const rtabmap::Memory*, bool, bool, const std::map<int, rtabmap::Signature>&)’:
/home/turtlebot/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp:451:73: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’
       data = memory->getSignatureDataConst(iter->first, occupancyGrid_->isGridFromDepth() && !occupancySavedInDB, !occupancyGrid_->isGridFromDepth() && !occupancySavedInDB, false, true);
                                                                         ^
/home/turtlebot/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp:451:132: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’
       data = memory->getSignatureDataConst(iter->first, occupancyGrid_->isGridFromDepth() && !occupancySavedInDB, !occupancyGrid_->isGridFromDepth() && !occupancySavedInDB, false, true);
                                                                                                                                    ^
/home/turtlebot/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp:478:26: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’
          occupancyGrid_->isGridFromDepth() && generateGrid?&rgb:0,
                          ^
/home/turtlebot/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp:479:26: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’
          occupancyGrid_->isGridFromDepth() && generateGrid?&depth:0,
                          ^
/home/turtlebot/catkin_ws/src/rtabmap_ros/src/MapsManager.cpp:480:27: error: ‘class rtabmap::OccupancyGrid’ has no member named ‘isGridFromDepth’
          !occupancyGrid_->isGridFromDepth() && generateGrid?&scan:0,
                           ^
make[2]: *** [rtabmap_ros/CMakeFiles/rtabmap_ros.dir/src/MapsManager.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [rtabmap_ros/CMakeFiles/rtabmap_ros.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

@matlabbe
Copy link
Member

matlabbe commented Oct 4, 2016

The isGridFromDepth method was added yesterday to rtabmap. Update your rtabmap source and make install again.

For the GetMap.h error, it is an header created when ros services are generated (here GetMap.srv). Make sure to re-run cmake in your catkin_ws/build directory so the header can be generated.

cheers

@QinZiwen
Copy link
Author

QinZiwen commented Oct 6, 2016

Sorry for the delay in my reply, my lab have been power cut in pass two days. when I run kinect2's launch , some errors show as following:

$ roslaunch kinect2_bridge kinect2_bridge.launch publish_tf:=true 
$ roslaunch rtabmap_ros rgbd_mapping_kinect2.launch resolution:=qhd
... logging to /home/turtlebot/.ros/log/09ca26f4-8b6b-11e6-bf86-6480999b1afe/roslaunch-turtlebot-HP-ZBook-14-G2-5931.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://192.168.1.103:33172/

SUMMARY
========

PARAMETERS
 * /rosdistro: indigo
 * /rosversion: 1.11.20
 * /rtabmap/rtabmap/Vis/InlierDistance: 0.02
 * /rtabmap/rtabmap/Vis/MinInliers: 20
 * /rtabmap/rtabmap/approx_sync: True
 * /rtabmap/rtabmap/frame_id: kinect2_base_link
 * /rtabmap/rtabmap/subscribe_depth: True
 * /rtabmap/rtabmapviz/approx_sync: True
 * /rtabmap/rtabmapviz/frame_id: kinect2_base_link
 * /rtabmap/rtabmapviz/subscribe_depth: True
 * /rtabmap/rtabmapviz/subscribe_odom_info: True
 * /rtabmap/visual_odometry/GFTT/MinDistance: 7
 * /rtabmap/visual_odometry/Odom/FillInfoData: true
 * /rtabmap/visual_odometry/Odom/Strategy: 0
 * /rtabmap/visual_odometry/OdomF2M/MaxSize: 1000
 * /rtabmap/visual_odometry/Vis/CorNNType: 3
 * /rtabmap/visual_odometry/Vis/FeatureType: 6
 * /rtabmap/visual_odometry/Vis/InlierDistance: 0.02
 * /rtabmap/visual_odometry/Vis/MaxDepth: 10.0
 * /rtabmap/visual_odometry/Vis/MaxFeatures: 1000
 * /rtabmap/visual_odometry/Vis/MinInliers: 20
 * /rtabmap/visual_odometry/approx_sync: True
 * /rtabmap/visual_odometry/frame_id: kinect2_base_link

NODES
  /rtabmap/
    rtabmap (rtabmap_ros/rtabmap)
    rtabmapviz (rtabmap_ros/rtabmapviz)
    visual_odometry (rtabmap_ros/rgbd_odometry)
  /
    kinect2_base_link (tf/static_transform_publisher)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[kinect2_base_link-1]: started with pid [5949]
process[rtabmap/visual_odometry-2]: started with pid [5950]
process[rtabmap/rtabmap-3]: started with pid [5960]
process[rtabmap/rtabmapviz-4]: started with pid [5962]
[rtabmap/visual_odometry-2] process has died [pid 5950, exit code -11, cmd /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry rgb/image:=/kinect2/qhd/image_color_rect depth/image:=/kinect2/qhd/image_depth_rect rgb/camera_info:=/kinect2/qhd/camera_info __name:=visual_odometry __log:=/home/turtlebot/.ros/log/09ca26f4-8b6b-11e6-bf86-6480999b1afe/rtabmap-visual_odometry-2.log].
log file: /home/turtlebot/.ros/log/09ca26f4-8b6b-11e6-bf86-6480999b1afe/rtabmap-visual_odometry-2*.log
[rtabmap/rtabmap-3] process has died [pid 5960, exit code -11, cmd /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rtabmap --delete_db_on_start rgb/image:=/kinect2/qhd/image_color_rect depth/image:=/kinect2/qhd/image_depth_rect rgb/camera_info:=/kinect2/qhd/camera_info __name:=rtabmap __log:=/home/turtlebot/.ros/log/09ca26f4-8b6b-11e6-bf86-6480999b1afe/rtabmap-rtabmap-3.log].
log file: /home/turtlebot/.ros/log/09ca26f4-8b6b-11e6-bf86-6480999b1afe/rtabmap-rtabmap-3*.log
[rtabmap/rtabmapviz-4] process has died [pid 5962, exit code -11, cmd /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rtabmapviz -d /home/turtlebot/catkin_ws/src/rtabmap_ros/launch/config/rgbd_gui.ini rgb/image:=/kinect2/qhd/image_color_rect depth/image:=/kinect2/qhd/image_depth_rect rgb/camera_info:=/kinect2/qhd/camera_info __name:=rtabmapviz __log:=/home/turtlebot/.ros/log/09ca26f4-8b6b-11e6-bf86-6480999b1afe/rtabmap-rtabmapviz-4.log].
log file: /home/turtlebot/.ros/log/09ca26f4-8b6b-11e6-bf86-6480999b1afe/rtabmap-rtabmapviz-4*.log

@willdzeng
Copy link
Contributor

looks like visual_odometry crashed, did you subscribed the right topic?
try to pull the new rtabmap and rtabmap_ros and build again.

@QinZiwen
Copy link
Author

QinZiwen commented Oct 7, 2016

The topic right, and I am try to pull the new rtabmap and rtabmap_ros, build again, no error. But when I run, the errors above show again. In .ros/log/, there no have the log file that my terminal cue.

@willdzeng
Copy link
Contributor

feel like it's because you didn't clean the old rtabmap in indigo
try
sudo apt-get purge ros-indigo-rtabmap ros-indigo-rtabmap-ros
and do
sudo ldconfig

after you rebuild and installed both.

@matlabbe
Copy link
Member

matlabbe commented Oct 7, 2016

The nodes may not load the right version of librtabmap_core.so, so crashing when loading shared libraries. Can you show the output of:

$ ldd /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry

@QinZiwen
Copy link
Author

QinZiwen commented Oct 8, 2016

$ ldd /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry
    linux-vdso.so.1 =>  (0x00007ffeca1e1000)
    libroscpp.so => /opt/ros/indigo/lib/libroscpp.so (0x00007ff67ce29000)
    librosconsole.so => /opt/ros/indigo/lib/librosconsole.so (0x00007ff67cbfd000)
    libboost_system.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_system.so.1.54.0 (0x00007ff67c9f9000)
    libnodeletlib.so => /opt/ros/indigo/lib/libnodeletlib.so (0x00007ff67c79f000)
    librtabmap_core.so.0.11 => /usr/local/lib/librtabmap_core.so.0.11 (0x00007ff67bf8e000)
    librtabmap_utilite.so.0.11 => /usr/local/lib/librtabmap_utilite.so.0.11 (0x00007ff67bd71000)
    libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff67ba6d000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff67b857000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff67b492000)
    libroscpp_serialization.so => /opt/ros/indigo/lib/libroscpp_serialization.so (0x00007ff67b28f000)
    librostime.so => /opt/ros/indigo/lib/librostime.so (0x00007ff67b065000)
    libxmlrpcpp.so => /opt/ros/indigo/lib/libxmlrpcpp.so (0x00007ff67ae47000)
    libcpp_common.so => /opt/ros/indigo/lib/libcpp_common.so (0x00007ff67ac3f000)
    libboost_thread.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.54.0 (0x00007ff67aa29000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff67a80b000)
    libboost_filesystem.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_filesystem.so.1.54.0 (0x00007ff67a5f5000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff67a2ef000)
    librosconsole_log4cxx.so => /opt/ros/indigo/lib/librosconsole_log4cxx.so (0x00007ff67a0db000)
    librosconsole_backend_interface.so => /opt/ros/indigo/lib/librosconsole_backend_interface.so (0x00007ff679ed9000)
    liblog4cxx.so.10 => /usr/lib/liblog4cxx.so.10 (0x00007ff679af1000)
    libboost_regex.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_regex.so.1.54.0 (0x00007ff6797ea000)
    libbondcpp.so => /opt/ros/indigo/lib/libbondcpp.so (0x00007ff6795ba000)
    libtinyxml.so.2.6.2 => /usr/lib/x86_64-linux-gnu/libtinyxml.so.2.6.2 (0x00007ff6793a5000)
    libclass_loader.so => /opt/ros/indigo/lib/libclass_loader.so (0x00007ff679186000)
    libroslib.so => /opt/ros/indigo/lib/libroslib.so (0x00007ff678f74000)
    libconsole_bridge.so.0.2 => /usr/lib/x86_64-linux-gnu/libconsole_bridge.so.0.2 (0x00007ff678d6a000)
    libopencv_video.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_video.so.2.4 (0x00007ff678b16000)
    libopencv_imgproc.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_imgproc.so.2.4 (0x00007ff678686000)
    libopencv_highgui.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4 (0x00007ff67843b000)
    libopencv_gpu.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_gpu.so.2.4 (0x00007ff6781f1000)
    libopencv_features2d.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_features2d.so.2.4 (0x00007ff677f4e000)
    libopencv_core.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_core.so.2.4 (0x00007ff677b17000)
    libopencv_calib3d.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_calib3d.so.2.4 (0x00007ff677881000)
    libpcl_common.so.1.7 => /usr/lib/libpcl_common.so.1.7 (0x00007ff6775c7000)
    libvtkCommon.so.5.8 => /usr/lib/libvtkCommon.so.5.8 (0x00007ff677051000)
    libpcl_io.so.1.7 => /usr/lib/libpcl_io.so.1.7 (0x00007ff676c22000)
    libpcl_kdtree.so.1.7 => /usr/lib/libpcl_kdtree.so.1.7 (0x00007ff676905000)
    libpcl_search.so.1.7 => /usr/lib/libpcl_search.so.1.7 (0x00007ff676566000)
    libpcl_sample_consensus.so.1.7 => /usr/lib/libpcl_sample_consensus.so.1.7 (0x00007ff67591d000)
    libpcl_filters.so.1.7 => /usr/lib/libpcl_filters.so.1.7 (0x00007ff6750e0000)
    libpcl_features.so.1.7 => /usr/lib/libpcl_features.so.1.7 (0x00007ff6737e1000)
    libpcl_segmentation.so.1.7 => /usr/lib/libpcl_segmentation.so.1.7 (0x00007ff672cbc000)
    libpcl_surface.so.1.7 => /usr/lib/libpcl_surface.so.1.7 (0x00007ff67269f000)
    libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007ff672486000)
    libfreenect.so.0.5 => /opt/ros/indigo/lib/libfreenect.so.0.5 (0x00007ff672277000)
    libOpenNI2.so.0 => /usr/lib/libOpenNI2.so.0 (0x00007ff67201c000)
    libdc1394.so.22 => /usr/lib/x86_64-linux-gnu/libdc1394.so.22 (0x00007ff671da8000)
    libg2o_core.so => /opt/ros/indigo/lib/libg2o_core.so (0x00007ff671b52000)
    libg2o_types_slam2d.so => /opt/ros/indigo/lib/libg2o_types_slam2d.so (0x00007ff671913000)
    libg2o_types_slam3d.so => /opt/ros/indigo/lib/libg2o_types_slam3d.so (0x00007ff6716c6000)
    libg2o_types_sba.so => /opt/ros/indigo/lib/libg2o_types_sba.so (0x00007ff67147f000)
    libg2o_stuff.so => /opt/ros/indigo/lib/libg2o_stuff.so (0x00007ff671264000)
    libg2o_csparse_extension.so => /opt/ros/indigo/lib/libg2o_csparse_extension.so (0x00007ff67105f000)
    libcxsparse.so.3.1.2 => /usr/lib/x86_64-linux-gnu/libcxsparse.so.3.1.2 (0x00007ff670e35000)
    libcholmod.so.2.1.2 => /usr/lib/x86_64-linux-gnu/libcholmod.so.2.1.2 (0x00007ff670b62000)
    libgtsam.so.4 => /usr/local/lib/libgtsam.so.4 (0x00007ff6705b6000)
    libgomp.so.1 => /usr/lib/x86_64-linux-gnu/libgomp.so.1 (0x00007ff6703a7000)
    libcvsba.so => /usr/local/lib/libcvsba.so (0x00007ff670174000)
    liboctomap.so.1.6 => /opt/ros/indigo/lib/liboctomap.so.1.6 (0x00007ff66ff2c000)
    liboctomath.so.1.6 => /opt/ros/indigo/lib/liboctomath.so.1.6 (0x00007ff66fd26000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff66fb22000)
    libtbb.so.2 => /usr/lib/libtbb.so.2 (0x00007ff66f8ee000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff67d18e000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff66f6e6000)
    libaprutil-1.so.0 => /usr/lib/x86_64-linux-gnu/libaprutil-1.so.0 (0x00007ff66f4bf000)
    libapr-1.so.0 => /usr/lib/x86_64-linux-gnu/libapr-1.so.0 (0x00007ff66f28e000)
    libicuuc.so.52 => /usr/lib/x86_64-linux-gnu/libicuuc.so.52 (0x00007ff66ef15000)
    libicui18n.so.52 => /usr/lib/x86_64-linux-gnu/libicui18n.so.52 (0x00007ff66eb0e000)
    libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ff66e909000)
    libPocoFoundation.so.9 => /usr/lib/libPocoFoundation.so.9 (0x00007ff66e5bd000)
    librospack.so => /opt/ros/indigo/lib/librospack.so (0x00007ff66e37d000)
    libGL.so.1 => /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 (0x00007ff66e0ed000)
    libjpeg.so.8 => /usr/lib/x86_64-linux-gnu/libjpeg.so.8 (0x00007ff66de98000)
    libpng12.so.0 => /lib/x86_64-linux-gnu/libpng12.so.0 (0x00007ff66dc72000)
    libtiff.so.5 => /usr/lib/x86_64-linux-gnu/libtiff.so.5 (0x00007ff66da00000)
    libjasper.so.1 => /usr/lib/x86_64-linux-gnu/libjasper.so.1 (0x00007ff66d7a9000)
    libIlmImf.so.6 => /usr/lib/x86_64-linux-gnu/libIlmImf.so.6 (0x00007ff66d4fa000)
    libHalf.so.6 => /usr/lib/x86_64-linux-gnu/libHalf.so.6 (0x00007ff66d2b7000)
    libgtk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0 (0x00007ff66cc7a000)
    libgdk-x11-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0 (0x00007ff66c9c7000)
    libgobject-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007ff66c776000)
    libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007ff66c46e000)
    libgtkglext-x11-1.0.so.0 => /usr/lib/libgtkglext-x11-1.0.so.0 (0x00007ff66c26a000)
    libgdkglext-x11-1.0.so.0 => /usr/lib/libgdkglext-x11-1.0.so.0 (0x00007ff66c006000)
    libv4l1.so.0 => /usr/lib/x86_64-linux-gnu/libv4l1.so.0 (0x00007ff66be00000)
    libavcodec.so.54 => /usr/lib/x86_64-linux-gnu/libavcodec.so.54 (0x00007ff66b0ac000)
    libavformat.so.54 => /usr/lib/x86_64-linux-gnu/libavformat.so.54 (0x00007ff66ad8a000)
    libavutil.so.52 => /usr/lib/x86_64-linux-gnu/libavutil.so.52 (0x00007ff66ab65000)
    libswscale.so.2 => /usr/lib/x86_64-linux-gnu/libswscale.so.2 (0x00007ff66a91e000)
    libopencv_flann.so.2.4 => /usr/lib/x86_64-linux-gnu/libopencv_flann.so.2.4 (0x00007ff66a6b4000)
    libvtksys.so.5.8 => /usr/lib/libvtksys.so.5.8 (0x00007ff66a478000)
    libpcl_io_ply.so.1.7 => /usr/lib/libpcl_io_ply.so.1.7 (0x00007ff66a229000)
    libvtkIO.so.5.8 => /usr/lib/libvtkIO.so.5.8 (0x00007ff669aa8000)
    libvtkImaging.so.5.8 => /usr/lib/libvtkImaging.so.5.8 (0x00007ff6694bb000)
    libvtkFiltering.so.5.8 => /usr/lib/libvtkFiltering.so.5.8 (0x00007ff668f32000)
    libusb-1.0.so.0 => /lib/x86_64-linux-gnu/libusb-1.0.so.0 (0x00007ff668d1a000)
    libOpenNI.so.0 => /usr/lib/libOpenNI.so.0 (0x00007ff668aa2000)
    libpcl_octree.so.1.7 => /usr/lib/libpcl_octree.so.1.7 (0x00007ff66871f000)
    libvtkGraphics.so.5.8 => /usr/lib/libvtkGraphics.so.5.8 (0x00007ff667d63000)
    libqhull.so.6 => /usr/lib/x86_64-linux-gnu/libqhull.so.6 (0x00007ff667b0d000)
    libraw1394.so.11 => /usr/lib/x86_64-linux-gnu/libraw1394.so.11 (0x00007ff6678ff000)
    libblas.so.3 => /usr/lib/libblas.so.3 (0x00007ff667682000)
    liblapack.so.3 => /usr/lib/liblapack.so.3 (0x00007ff666ee6000)
    libamd.so.2.3.1 => /usr/lib/x86_64-linux-gnu/libamd.so.2.3.1 (0x00007ff666cdd000)
    libcolamd.so.2.8.0 => /usr/lib/x86_64-linux-gnu/libcolamd.so.2.8.0 (0x00007ff666ad6000)
    libcamd.so.2.3.1 => /usr/lib/x86_64-linux-gnu/libcamd.so.2.3.1 (0x00007ff6668cc000)
    libccolamd.so.2.8.0 => /usr/lib/x86_64-linux-gnu/libccolamd.so.2.8.0 (0x00007ff6666c2000)
    libboost_serialization.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_serialization.so.1.54.0 (0x00007ff666457000)
    libboost_timer.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_timer.so.1.54.0 (0x00007ff666252000)
    libtbbmalloc.so.2 => /usr/lib/libtbbmalloc.so.2 (0x00007ff66601a000)
    libmetis.so => /usr/local/lib/libmetis.so (0x00007ff665dab000)
    libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007ff665b72000)
    libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007ff665948000)
    libicudata.so.52 => /usr/lib/x86_64-linux-gnu/libicudata.so.52 (0x00007ff6640db000)
    libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007ff663e9d000)
    libboost_program_options.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_program_options.so.1.54.0 (0x00007ff663c2f000)
    libpython2.7.so.1.0 => /usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0 (0x00007ff6636cb000)
    libglapi.so.0 => /usr/lib/x86_64-linux-gnu/libglapi.so.0 (0x00007ff6634a2000)
    libXext.so.6 => /usr/lib/x86_64-linux-gnu/libXext.so.6 (0x00007ff663290000)
    libXdamage.so.1 => /usr/lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007ff66308d000)
    libXfixes.so.3 => /usr/lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007ff662e87000)
    libX11-xcb.so.1 => /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1 (0x00007ff662c85000)
    libX11.so.6 => /usr/lib/x86_64-linux-gnu/libX11.so.6 (0x00007ff662950000)
    libxcb-glx.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-glx.so.0 (0x00007ff662739000)
    libxcb-dri2.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri2.so.0 (0x00007ff662534000)
    libxcb-dri3.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-dri3.so.0 (0x00007ff662331000)
    libxcb-present.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-present.so.0 (0x00007ff66212e000)
    libxcb-sync.so.1 => /usr/lib/x86_64-linux-gnu/libxcb-sync.so.1 (0x00007ff661f28000)
    libxcb.so.1 => /usr/lib/x86_64-linux-gnu/libxcb.so.1 (0x00007ff661d09000)
    libxshmfence.so.1 => /usr/lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007ff661b07000)
    libXxf86vm.so.1 => /usr/lib/x86_64-linux-gnu/libXxf86vm.so.1 (0x00007ff661901000)
    libdrm.so.2 => /usr/lib/x86_64-linux-gnu/libdrm.so.2 (0x00007ff6616f4000)
    liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007ff6614d2000)
    libjbig.so.0 => /usr/lib/x86_64-linux-gnu/libjbig.so.0 (0x00007ff6612c4000)
    libIex.so.6 => /usr/lib/x86_64-linux-gnu/libIex.so.6 (0x00007ff6610a6000)
    libIlmThread.so.6 => /usr/lib/x86_64-linux-gnu/libIlmThread.so.6 (0x00007ff660ea0000)
    libgmodule-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007ff660c9c000)
    libpangocairo-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007ff660a8f000)
    libatk-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007ff66086d000)
    libcairo.so.2 => /usr/lib/x86_64-linux-gnu/libcairo.so.2 (0x00007ff660562000)
    libgdk_pixbuf-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007ff660341000)
    libgio-2.0.so.0 => /usr/lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007ff65ffce000)
    libpangoft2-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007ff65fdb9000)
    libpango-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007ff65fb6c000)
    libfontconfig.so.1 => /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007ff65f930000)
    libXrender.so.1 => /usr/lib/x86_64-linux-gnu/libXrender.so.1 (0x00007ff65f726000)
    libXinerama.so.1 => /usr/lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007ff65f523000)
    libXi.so.6 => /usr/lib/x86_64-linux-gnu/libXi.so.6 (0x00007ff65f313000)
    libXrandr.so.2 => /usr/lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007ff65f109000)
    libXcursor.so.1 => /usr/lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007ff65eeff000)
    libXcomposite.so.1 => /usr/lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007ff65ecfc000)
    libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007ff65eaf4000)
    libGLU.so.1 => /usr/lib/x86_64-linux-gnu/libGLU.so.1 (0x00007ff65e886000)
    libXmu.so.6 => /usr/lib/x86_64-linux-gnu/libXmu.so.6 (0x00007ff65e66d000)
    libpangox-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libpangox-1.0.so.0 (0x00007ff65e44e000)
    libv4l2.so.0 => /usr/lib/x86_64-linux-gnu/libv4l2.so.0 (0x00007ff65e240000)
    libxvidcore.so.4 => /usr/lib/x86_64-linux-gnu/libxvidcore.so.4 (0x00007ff65df02000)
    libx264.so.142 => /usr/lib/x86_64-linux-gnu/libx264.so.142 (0x00007ff65db6c000)
    libvpx.so.1 => /usr/lib/x86_64-linux-gnu/libvpx.so.1 (0x00007ff65d78d000)
    libvorbisenc.so.2 => /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2 (0x00007ff65d2be000)
    libvorbis.so.0 => /usr/lib/x86_64-linux-gnu/libvorbis.so.0 (0x00007ff65d091000)
    libtheoraenc.so.1 => /usr/lib/x86_64-linux-gnu/libtheoraenc.so.1 (0x00007ff65ce51000)
    libtheoradec.so.1 => /usr/lib/x86_64-linux-gnu/libtheoradec.so.1 (0x00007ff65cc38000)
    libspeex.so.1 => /usr/lib/x86_64-linux-gnu/libspeex.so.1 (0x00007ff65ca1f000)
    libschroedinger-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libschroedinger-1.0.so.0 (0x00007ff65c75b000)
    libopus.so.0 => /usr/lib/x86_64-linux-gnu/libopus.so.0 (0x00007ff65c513000)
    libopenjpeg.so.2 => /usr/lib/x86_64-linux-gnu/libopenjpeg.so.2 (0x00007ff65c2f1000)
    libmp3lame.so.0 => /usr/lib/x86_64-linux-gnu/libmp3lame.so.0 (0x00007ff65c064000)
    libgsm.so.1 => /usr/lib/x86_64-linux-gnu/libgsm.so.1 (0x00007ff65be56000)
    libva.so.1 => /usr/lib/x86_64-linux-gnu/libva.so.1 (0x00007ff65bc3a000)
    librtmp.so.0 => /usr/lib/x86_64-linux-gnu/librtmp.so.0 (0x00007ff65ba20000)
    libgnutls.so.26 => /usr/lib/x86_64-linux-gnu/libgnutls.so.26 (0x00007ff65b762000)
    libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007ff65b552000)
    libpq.so.5 => /usr/lib/libpq.so.5 (0x00007ff65b323000)
    libmysqlclient.so.18 => /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 (0x00007ff65adeb000)
    libvtkDICOMParser.so.5.8 => /usr/lib/libvtkDICOMParser.so.5.8 (0x00007ff65abd2000)
    libnetcdf.so.7 => /usr/lib/libnetcdf.so.7 (0x00007ff65a895000)
    libnetcdf_c++.so.4 => /usr/lib/libnetcdf_c++.so.4 (0x00007ff65a678000)
    libvtkmetaio.so.5.8 => /usr/lib/libvtkmetaio.so.5.8 (0x00007ff65a3eb000)
    libsqlite3.so.0 => /usr/lib/x86_64-linux-gnu/libsqlite3.so.0 (0x00007ff65a132000)
    libudev.so.1 => /lib/x86_64-linux-gnu/libudev.so.1 (0x00007ff659f21000)
    libvtkverdict.so.5.8 => /usr/lib/libvtkverdict.so.5.8 (0x00007ff659ceb000)
    libgfortran.so.3 => /usr/lib/x86_64-linux-gnu/libgfortran.so.3 (0x00007ff6599d1000)
    libboost_chrono.so.1.54.0 => /usr/lib/x86_64-linux-gnu/libboost_chrono.so.1.54.0 (0x00007ff6597ca000)
    libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007ff6595c7000)
    libXau.so.6 => /usr/lib/x86_64-linux-gnu/libXau.so.6 (0x00007ff6593c3000)
    libXdmcp.so.6 => /usr/lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007ff6591bd000)
    libfreetype.so.6 => /usr/lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007ff658f1a000)
    libpixman-1.so.0 => /usr/lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007ff658c72000)
    libxcb-shm.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007ff658a6f000)
    libxcb-render.so.0 => /usr/lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007ff658866000)
    libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007ff658643000)
    libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007ff658428000)
    libharfbuzz.so.0 => /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007ff6581d3000)
    libthai.so.0 => /usr/lib/x86_64-linux-gnu/libthai.so.0 (0x00007ff657fca000)
    libXt.so.6 => /usr/lib/x86_64-linux-gnu/libXt.so.6 (0x00007ff657d64000)
    libv4lconvert.so.0 => /usr/lib/x86_64-linux-gnu/libv4lconvert.so.0 (0x00007ff657aeb000)
    libogg.so.0 => /usr/lib/x86_64-linux-gnu/libogg.so.0 (0x00007ff6578e2000)
    liborc-0.4.so.0 => /usr/lib/x86_64-linux-gnu/liborc-0.4.so.0 (0x00007ff657660000)
    libgcrypt.so.11 => /lib/x86_64-linux-gnu/libgcrypt.so.11 (0x00007ff6573e0000)
    libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007ff6571cc000)
    libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007ff656f8a000)
    libssl.so.1.0.0 => /lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007ff656d2b000)
    libcrypto.so.1.0.0 => /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007ff65694f000)
    libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007ff656684000)
    libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007ff656480000)
    libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007ff656239000)
    libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007ff655fe8000)
    libhdf5_hl.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5_hl.so.7 (0x00007ff655db8000)
    libhdf5.so.7 => /usr/lib/x86_64-linux-gnu/libhdf5.so.7 (0x00007ff65591c000)
    libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007ff6556ba000)
    libcgmanager.so.0 => /lib/x86_64-linux-gnu/libcgmanager.so.0 (0x00007ff65549f000)
    libnih.so.1 => /lib/x86_64-linux-gnu/libnih.so.1 (0x00007ff655287000)
    libnih-dbus.so.1 => /lib/x86_64-linux-gnu/libnih-dbus.so.1 (0x00007ff65507d000)
    libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007ff654e38000)
    libquadmath.so.0 => /usr/lib/x86_64-linux-gnu/libquadmath.so.0 (0x00007ff654bfc000)
    libgraphite2.so.3 => /usr/lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007ff6549d6000)
    libdatrie.so.1 => /usr/lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007ff6547cf000)
    libSM.so.6 => /usr/lib/x86_64-linux-gnu/libSM.so.6 (0x00007ff6545c7000)
    libICE.so.6 => /usr/lib/x86_64-linux-gnu/libICE.so.6 (0x00007ff6543ab000)
    libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007ff6541a6000)
    libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007ff653f77000)
    libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007ff653d6c000)
    libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007ff653b68000)
    liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007ff653959000)
    libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007ff65373e000)
    libgssapi.so.3 => /usr/lib/x86_64-linux-gnu/libgssapi.so.3 (0x00007ff653500000)
    libidn.so.11 => /usr/lib/x86_64-linux-gnu/libidn.so.11 (0x00007ff6532cd000)
    libheimntlm.so.0 => /usr/lib/x86_64-linux-gnu/libheimntlm.so.0 (0x00007ff6530c4000)
    libkrb5.so.26 => /usr/lib/x86_64-linux-gnu/libkrb5.so.26 (0x00007ff652e3c000)
    libasn1.so.8 => /usr/lib/x86_64-linux-gnu/libasn1.so.8 (0x00007ff652b9b000)
    libhcrypto.so.4 => /usr/lib/x86_64-linux-gnu/libhcrypto.so.4 (0x00007ff652968000)
    libroken.so.18 => /usr/lib/x86_64-linux-gnu/libroken.so.18 (0x00007ff652753000)
    libwind.so.0 => /usr/lib/x86_64-linux-gnu/libwind.so.0 (0x00007ff65252a000)
    libheimbase.so.1 => /usr/lib/x86_64-linux-gnu/libheimbase.so.1 (0x00007ff65231c000)
    libhx509.so.5 => /usr/lib/x86_64-linux-gnu/libhx509.so.5 (0x00007ff6520d3000)

@QinZiwen
Copy link
Author

QinZiwen commented Oct 8, 2016

@willdzeng , I follow you running this command, but the error show again.

@willdzeng
Copy link
Contributor

willdzeng commented Oct 8, 2016

Looks like it's using the right library.

An easy way to fix is just to reinstall ubuntu and ROS and build rtabmap from source again.
Sometimes linkage problem just wired and hard to fix for some reason.

One thing it worked for me is go to rtbamap's build folder and do a
sudo make uninstall
and make install again.
sudo make install

@matlabbe
Copy link
Member

Sorry rgbd_odometry is a nodelet, so we cannot see which librtabmap_ros.so is linked. Can you show ldd for rtabmapviz? similarly to this:

~/catkin_ws/devel/lib/rtabmap_ros$ ldd rtabmapviz | grep rtabmap
    librtabmap_ros.so => /home/mathieu/catkin_ws/devel/lib/librtabmap_ros.so (0x00007feb8dd7e000)
    librtabmap_core.so.0.11 => /home/mathieu/catkin_ws/devel/lib/librtabmap_core.so.0.11 (0x00007feb8acea000)
    librtabmap_utilite.so.0.11 => /home/mathieu/catkin_ws/devel/lib/librtabmap_utilite.so.0.11 (0x00007feb8aacc000)
    librtabmap_gui.so.0.11 => /home/mathieu/catkin_ws/devel/lib/librtabmap_gui.so.0.11 (0x00007feb8a57a000)

@QinZiwen
Copy link
Author

QinZiwen commented Oct 12, 2016

turtlebot@turtlebot-HP-ZBook-14-G2:~/catkin_ws/devel/lib/rtabmap_ros$ ldd rtabmapviz | grep rtabmap
    librtabmap_ros.so => /home/turtlebot/catkin_ws/devel/lib/librtabmap_ros.so (0x00007f368c4d8000)
    librtabmap_core.so.0.11 => /usr/local/lib/librtabmap_core.so.0.11 (0x00007f36894e4000)
    librtabmap_utilite.so.0.11 => /usr/local/lib/librtabmap_utilite.so.0.11 (0x00007f36892c7000)
    librtabmap_gui.so.0.11 => /usr/local/lib/librtabmap_gui.so.0.11 (0x00007f3688d73000)

@matlabbe
Copy link
Member

I don't have a cue of what is the problem. Is standalone $ rtabmap crash too? You can look at the issue Debugging "process has died" errors on startup for more debugging tips. I've also seen on some machines that sometimes Release version of the compiled libraries crashes while Debug version doesn't.

@QinZiwen
Copy link
Author

@matlabbe Thank you very much!

@QinZiwen
Copy link
Author

When I rebuild rtabmap, terminal show some thing as follows which I think that it maybe is a bug:

In file included from /usr/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:52:0,
                 from /usr/include/pcl-1.7/pcl/visualization/cloud_viewer.h:39,
                 from /home/turtlebot/Project_slam/rtabmap/examples/NoEventsExample/main.cpp:32:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h: In member function ‘bool pcl::visualization::AreaPickingEvent::getPointsIndices(std::vector<int>&) const’:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h:64:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (nb_points_ == -1)

@willdzeng
Copy link
Contributor

that's just a warning in pcl 1.7 library.

@QinZiwen
Copy link
Author

I type " roslaunch rtabmap_ros rgbd_mapping.launch launch_prefix:="xterm -e gdb -ex run --args" to debug rtabmap for tacking some useful thing.The log is as follows:

GNU gdb (Ubuntu 7.7.1-0ubuntu5~14.04.2) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rtabmapviz...done.
Starting program: /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rtabmapviz -d /home/turtlebot/catkin_ws/src/rtabmap_ros/launch/config/rgbd_gui.ini rgb/image:=/camera/rgb/image_rect_color depth/image:=/camera/depth_registered/image_raw rgb/camera_info:=/camera/rgb/camera_info left/image_rect:=/stereo_camera/left/image_rect_color right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info scan:=/scan scan_cloud:=/scan_cloud __name:=rtabmapviz __log:=/home/turtlebot/.ros/log/7f5138ec-9109-11e6-956c-6480999b1afe/rtabmap-rtabmapviz-4.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
l
[New Thread 0x7fffbc409700 (LWP 16537)]

---Type <return> to continue, or q <return> to quit---l
Program received signal SIGSEGV, Segmentation fault.
0x00007fffe70f4adc in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() ()
   from /usr/lib/libpcl_io.so.1.7
(gdb) l
38
39      void my_handler(int s){
40              ROS_INFO("rtabmapviz: ctrl-c catched! Exiting Qt app...");
41              spinner->stop();
42              exit(-1);
43      }
44
45      int main(int argc, char** argv)
46      {
47              ROS_INFO("Starting node...");
(gdb) break 47
Breakpoint 1 at 0x50cdf8: file /home/turtlebot/catkin_ws/src/rtabmap_ros/src/GuiNode.cpp, line 47.
(gdb) info break
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   0x000000000050cdf8 in main(int, char**) 
                                                   at /home/turtlebot/catkin_ws/src/rtabmap_ros/src/GuiNode.cpp:47
(gdb) r
The program being debugged has been started already.
Start it from the beginning? (y or n) y

Starting program: /home/turtlebot/catkin_ws/devel/lib/rtabmap_ros/rtabmapviz -d /home/turtlebot/catkin_ws/src/rtabmap_ros/launch/config/rgbd_gui.ini rgb/image:=/camera/rgb/image_rect_color depth/image:=/camera/depth_registered/image_raw rgb/camera_info:=/camera/rgb/camera_info left/image_rect:=/stereo_camera/left/image_rect_color right/image_rect:=/stereo_camera/right/image_rect left/camera_info:=/stereo_camera/left/camera_info right/camera_info:=/stereo_camera/right/camera_info scan:=/scan scan_cloud:=/scan_cloud __name:=rtabmapviz __log:=/home/turtlebot/.ros/log/7f5138ec-9109-11e6-956c-6480999b1afe/rtabmap-rtabmapviz-4.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffbc409700 (LWP 16540)]

Program received signal SIGSEGV, Segmentation fault.
0x00007fffe70f4adc in boost::math::lanczos::lanczos_initializer<boost::math::lanczos::lanczos17m64, long double>::init::init() ()
   from /usr/lib/libpcl_io.so.1.7
(gdb) n
Single stepping until exit from function _ZN5boost4math7lanczos19lanczos_initializerINS1_12lanczos17m64EeE4initC2Ev,
which has no line number information.
[Thread 0x7fffbc409700 (LWP 16540) exited]

Program terminated with signal SIGSEGV, Segmentation fault.
The program no longer exists.
(gdb) n
The program is not being run.
(gdb) 

@matlabbe
Copy link
Member

matlabbe commented Oct 13, 2016

@QinZiwen Looks like a PCL error. I found this post: http://answers.ros.org/question/194699/segmentation-fault-when-using-correspondencerejectorsampleconsensus/

maybe related to C++11 or a bug in that PCL version:

Removing "-std=c++0x" from my CMakeLists.txt worked as charm.

Can you show the output of CMake for the rtabmap library? So we can see if c++11 is used.

@matlabbe
Copy link
Member

@jacksonkr yeah I moved the question to #127

@willdzeng
Copy link
Contributor

area_picking_event.h:64:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nb_points_ == -1)

is this really causing an issue?

@matlabbe
Copy link
Member

I see this warning all the time, should not be the problem here.

@QinZiwen
Copy link
Author

@matlabbe

turtlebot@turtlebot-HP-ZBook-14-G2:~/Project_slam/rtabmap/build$ cmake -DCMAKE_INSTALL_PREFIX=~/catkin_ws/devel -DCMAKE_BUILD_TYPE=Debug .. 
-- The C compiler identification is GNU 4.8.4
-- The CXX compiler identification is GNU 4.8.4
-- 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
-- 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
-- checking for module 'eigen3'
--   found eigen3, version 3.2.0
-- Found eigen: /usr/include/eigen3  
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Found openni: /usr/lib/libOpenNI.so  
-- Found libusb-1.0: /usr/include  
-- checking for module 'flann'
--   found flann, version 1.8.4
-- Found Flann: /usr/lib/x86_64-linux-gnu/libflann_cpp_s.a  
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Found qhull: /usr/lib/x86_64-linux-gnu/libqhull.so  
-- checking for module 'openni-dev'
--   package 'openni-dev' not found
-- Found PCL_COMMON: /usr/lib/libpcl_common.so  
-- Found PCL_OCTREE: /usr/lib/libpcl_octree.so  
-- Found PCL_IO: /usr/lib/libpcl_io.so  
-- Found PCL_KDTREE: /usr/lib/libpcl_kdtree.so  
-- Found PCL_SEARCH: /usr/lib/libpcl_search.so  
-- Found PCL_SAMPLE_CONSENSUS: /usr/lib/libpcl_sample_consensus.so  
-- Found PCL_FILTERS: /usr/lib/libpcl_filters.so  
-- Found PCL_FEATURES: /usr/lib/libpcl_features.so  
-- Found PCL_KEYPOINTS: /usr/lib/libpcl_keypoints.so  
-- Found PCL_GEOMETRY: /usr/include/pcl-1.7  
-- Found PCL_SEGMENTATION: /usr/lib/libpcl_segmentation.so  
-- Found PCL_VISUALIZATION: /usr/lib/libpcl_visualization.so  
-- Found PCL_OUTOFCORE: /usr/lib/libpcl_outofcore.so  
-- Found PCL_REGISTRATION: /usr/lib/libpcl_registration.so  
-- Found PCL_RECOGNITION: /usr/lib/libpcl_recognition.so  
-- Found PCL_SURFACE: /usr/lib/libpcl_surface.so  
-- Found PCL_PEOPLE: /usr/lib/libpcl_people.so  
-- Found PCL_TRACKING: /usr/lib/libpcl_tracking.so  
-- Found PCL_APPS: /usr/lib/libpcl_apps.so  
-- 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  
-- Found OpenMP
-- Found OpenCV: /usr/include/opencv;/usr/include
-- Found PCL: /usr/include/pcl-1.7;/usr/include/eigen3;/usr/include;/usr/include/ni;/usr/include/vtk-5.8
-- Found ZLIB: /usr/include
-- Looking for Q_WS_X11
-- Looking for Q_WS_X11 - found
-- Looking for Q_WS_WIN
-- Looking for Q_WS_WIN - not found
-- Looking for Q_WS_QWS
-- Looking for Q_WS_QWS - not found
-- Looking for Q_WS_MAC
-- Looking for Q_WS_MAC - not found
-- Found Qt4: /usr/bin/qmake (found version "4.8.6") 
-- Found QVTK: /usr/lib/libQVTK.so  
-- Found Freenect: /usr/include
-- Found OpenNI2: /usr/include/openni2
-- Found DC1394: /usr/include/dc1394
-- Found CSPARSE: /usr/include/suitesparse  
-- Found g2o: /opt/ros/indigo/include;/usr/include/suitesparse;/usr/include/suitesparse
-- GTSAM include directory:  /usr/local/lib/cmake/GTSAM/../../../include;/usr/include;/usr/local/include/gtsam/3rdparty/Eigen/
-- Found cvsba: /usr/local/include
-- Found octomap: /opt/ros/indigo/include
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Performing Test COMPILER_SUPPORTS_CXX0X
-- Performing Test COMPILER_SUPPORTS_CXX0X - Success
-- Found Pthreads
-- --------------------------------------------
-- Info :
--   Version : 0.11.11
--   CMAKE_INSTALL_PREFIX = /home/turtlebot/catkin_ws/devel
--   CMAKE_BUILD_TYPE =     Debug
--   CMAKE_INSTALL_LIBDIR = lib
--   BUILD_APP =            ON
--   BUILD_TOOLS =          ON
--   BUILD_EXAMPLES =       ON
--   BUILD_SHARED_LIBS =    ON
--   CMAKE_CXX_FLAGS =  -fmessage-length=0  -Wno-deprecated -fopenmp -std=c++11
--   With OpenCV 2 nonfree module (SIFT/SURF) = NO (not found, License: BSD)
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = YES (License: Apache v2)
--   With Freenect2            = NO (libfreenect2 not found)
--   With dc1394               = YES (License: LGPL)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--   With g2o                  = YES (License: BSD)
--   With GTSAM                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = YES (License: GPLv2)
--   With ZED                  = NO (ZED sdk not found)
--   With RealSense            = NO (librealsense not found)
--   With OCTOMAP              = YES (License: BSD)
--   With Qt4                  = YES (License: Open Source or Commercial)
-- --------------------------------------------
-- Configuring done
-- Generating done
-- Build files have been written to: /home/turtlebot/Project_slam/rtabmap/build

@matlabbe
Copy link
Member

Ok, we will try without -std=c++11. Do:

$ cd /home/turtlebot/Project_slam/rtabmap/build
$ cmake -DWITH_G2O=OFF -DWITH_GTSAM=OFF ..
# make sure on the cmake status there is no "-std=c++11" in CMAKE_CXX_FLAGS
$ make
$ ../bin/rtabmap

@QinZiwen
Copy link
Author

@matlabbe So sorry for the delay in my reply. The problem has been solve, thank you for your help."cmake -DWITH_G2O=OFF -DWITH_GTSAM=OFF .." means trying to without g2o and gtsam?

@willdzeng
Copy link
Contributor

yes, you will build the rtabmap without g2o and gtsam.

@matlabbe
Copy link
Member

matlabbe commented Oct 17, 2016

So it is indeed a problem of libraries supporting c++11 and others not. The best is that all libraries are built with or without c++11. If you want to use g2o or GTSAM, upgrading to Ubuntu 16.04 may help for c++11 compatibility.

@QinZiwen
Copy link
Author

@matlabbe @willdzeng Thanks for your help during this time!

@QinZiwen
Copy link
Author

@matlabbe I had read your paper "Appearance-Based Loop Closure Detection for Online Large-Scale and Long-Term Operation". Does this paper main idea is memory management? In addition, what difference Rtabmap has compared with other SLAM?

@matlabbe
Copy link
Member

Yes the main novelty is the memory management for long-term online loop closure detection. In that particular paper, you can compare loop closure detection approach with other BOW (bag-of-words) approaches. I'm working on a paper comparing the whole SLAM system.

cheers

@svg091
Copy link

svg091 commented Jun 28, 2019

Hi

I am getting below error, please help to solve the above error

-- The C compiler identification is GNU 7.2.1
-- The CXX compiler identification is GNU 7.2.1
-- 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
-- Building on a 64 bit system
-- Using GNU gold as linker.
-- Disabling gc-sections on gold binutils < 2.26, see: https://sourceware.org/bugzilla/show_bug.cgi?id=17639
-- No build type specified, defaulting to Release
-- Configuring OSRM in release mode
-- Configuring release mode optimizations
-- Performing Test LTO_AVAILABLE
-- Performing Test LTO_AVAILABLE - Success
-- Performing Test HAS_COLOR_FLAG
-- Performing Test HAS_COLOR_FLAG - Success
-- Setting linker optimizations
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Boost version: 1.54.0
-- Found the following Boost libraries:
-- date_time
-- chrono
-- filesystem
-- iostreams
-- program_options
-- regex
-- system
-- thread
-- unit_test_framework
-- atomic
-- Found Intel TBB
-- TBB interface version: 4001
-- Found EXPAT: /usr/lib64/libexpat.so (found version "2.1.0")
-- Found BZip2: /usr/lib64/libbz2.so (found version "1.0.6")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.27.1")
-- Found Lua: /usr/local/lib/liblua.a;/usr/lib64/libm.so;dl (found suitable version "5.3.5", minimum required is "5.2")
-- Using Lua 5.3.5
-- Found Doxygen: /usr/bin/doxygen (found version "1.8.2")
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.8")
-- Found Protozero: /home/vishu/route_eta_18_0_1/third_party/protozero/include (found suitable version "1.6.2", minimum required is "1.5.1")
-- Found Osmium: /home/vishu/route_eta_18_0_1/third_party/libosmium/include
-- Configuring done
CMake Warning at CMakeLists.txt:164 (add_executable):
Cannot generate a safe runtime search path for target osrm-extract because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:714 (add_executable):
Cannot generate a safe runtime search path for target osrm-components
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:169 (add_executable):
Cannot generate a safe runtime search path for target osrm-datastore
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:166 (add_executable):
Cannot generate a safe runtime search path for target osrm-customize
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:165 (add_executable):
Cannot generate a safe runtime search path for target osrm-partition
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:167 (add_executable):
Cannot generate a safe runtime search path for target osrm-contract because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at CMakeLists.txt:168 (add_executable):
Cannot generate a safe runtime search path for target osrm-routed because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:122 (add_executable):
Cannot generate a safe runtime search path for target util-tests because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:117 (add_executable):
Cannot generate a safe runtime search path for target server-tests because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:113 (add_executable):
Cannot generate a safe runtime search path for target
library-partition-tests because files in some directories may conflict with
libraries in implicit directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:109 (add_executable):
Cannot generate a safe runtime search path for target
library-customize-tests because files in some directories may conflict with
libraries in implicit directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:62 (add_executable):
Cannot generate a safe runtime search path for target engine-tests because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:72 (add_executable):
Cannot generate a safe runtime search path for target extractor-tests
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:77 (add_executable):
Cannot generate a safe runtime search path for target partitioner-tests
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:105 (add_executable):
Cannot generate a safe runtime search path for target
library-contract-tests because files in some directories may conflict with
libraries in implicit directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:82 (add_executable):
Cannot generate a safe runtime search path for target customizer-tests
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:87 (add_executable):
Cannot generate a safe runtime search path for target updater-tests because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:92 (add_executable):
Cannot generate a safe runtime search path for target storage-tests because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:67 (add_executable):
Cannot generate a safe runtime search path for target contractor-tests
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:97 (add_executable):
Cannot generate a safe runtime search path for target library-tests because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at unit_tests/CMakeLists.txt:101 (add_executable):
Cannot generate a safe runtime search path for target library-extract-tests
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at src/benchmarks/CMakeLists.txt:6 (add_executable):
Cannot generate a safe runtime search path for target rtree-bench because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at src/benchmarks/CMakeLists.txt:21 (add_executable):
Cannot generate a safe runtime search path for target match-bench because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at src/benchmarks/CMakeLists.txt:33 (add_executable):
Cannot generate a safe runtime search path for target alias-bench because
files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

CMake Warning at src/benchmarks/CMakeLists.txt:44 (add_executable):
Cannot generate a safe runtime search path for target packedvector-bench
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libtbb.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib
runtime library [libtbbmalloc.so.2] in /usr/lib64 may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.

-- Generating done
-- Build files have been written to:

@matlabbe
Copy link
Member

matlabbe commented Jul 2, 2019

Those warnings don't seem related to rtabmap_ros, though they are warnings, you should be able to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants