Orbslam2 with rtabmap in ubuntu 20 and ros noetic

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Orbslam2 with rtabmap in ubuntu 20 and ros noetic

ferrangg
Hello,

I am using rtabmap ros with some modifications on ubuntu 20 and ros noetic. I would like to try the ORBSLAM2 odometry, but ORBSLAM 2 does not buld well with opencv 4. I am using this modifications (https://github.com/raulmur/ORB_SLAM2/pull/790/files) and ORBSLAM2 is building ok in ubuntu 20 with opencv 4. Then, when I build rtabmap with -DWITH_G2O=OFF -DWITH_ORB_SLAM=ON  and previously setting the environment variable ORB_SLAM_ROOT_DIR to the ORBSLAM source code, I am getting the following error. Is it something that can be fixed? Or maybe there is another way to use ORBSLAM2 odometry with rtabmap in ubuntu 20?

Many thanks,

Ferran

#27 403.9 [ 28%] Building CXX object corelib/src/CMakeFiles/rtabmap_core.dir/odometry/OdometryORBSLAM.cpp.o
#27 407.6 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
#27 407.6                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.6                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.6                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.6                  from /ORB_SLAM2/include/System.h:29,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.6 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:74: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.6    62 |     typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned >  HessianBlockType;
#27 407.6       |                                                                          ^~~~~~~~~~
#27 407.6 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.6 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.6   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.6       |                                     ^~~~~~~~~~
#27 407.6 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 407.6                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.6                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.6                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.6                  from /ORB_SLAM2/include/System.h:29,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.6 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:82: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.6    59 |       typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
#27 407.6       |                                                                                  ^~~~~~~~~~
#27 407.6 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.6 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.6   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.6       |                                     ^~~~~~~~~~
#27 407.6 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 407.6                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.6                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.6                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.6                  from /ORB_SLAM2/include/System.h:29,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.6 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:82: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.6    60 |       typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
#27 407.6       |                                                                                  ^~~~~~~~~~
#27 407.6 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.6                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.6 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.6   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.6       |                                     ^~~~~~~~~~
#27 407.8 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
#27 407.8                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.8                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.8                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.8                  from /ORB_SLAM2/include/System.h:29,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h: In instantiation of ‘class g2o::BaseVertex<3, Eigen::Matrix<double, 3, 1> >’:
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_sba.h:40:35:   required from here
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:72: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.8    62 |     typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned >  HessianBlockType;
#27 407.8       |                                                                  ~~~~~~^~~~~~~~~~~~
#27 407.8 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.8 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.8   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.8       |                                     ^~~~~~~~~~
#27 407.8 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
#27 407.8                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.8                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.8                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.8                  from /ORB_SLAM2/include/System.h:29,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h: In instantiation of ‘class g2o::BaseVertex<6, g2o::SE3Quat>’:
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_six_dof_expmap.h:59:33:   required from here
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:72: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.8    62 |     typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned >  HessianBlockType;
#27 407.8       |                                                                  ~~~~~~^~~~~~~~~~~~
#27 407.8 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.8 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.8   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.8       |                                     ^~~~~~~~~~
#27 407.8 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 407.8                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.8                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.8                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.8                  from /ORB_SLAM2/include/System.h:29,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<2, Eigen::Matrix<double, 2, 1>, g2o::VertexSBAPointXYZ, g2o::VertexSE3Expmap>’:
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_six_dof_expmap.h:80:35:   required from here
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.8    59 |       typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
#27 407.8       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 407.8 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.8 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.8   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.8       |                                     ^~~~~~~~~~
#27 407.8 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 407.8                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.8                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.8                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.8                  from /ORB_SLAM2/include/System.h:29,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.8 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.8    60 |       typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
#27 407.8       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 407.8 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.8                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.8 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.8   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.8       |                                     ^~~~~~~~~~
#27 407.9 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 407.9                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.9                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.9                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.9                  from /ORB_SLAM2/include/System.h:29,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.9 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<3, Eigen::Matrix<double, 3, 1>, g2o::VertexSBAPointXYZ, g2o::VertexSE3Expmap>’:
#27 407.9 /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_six_dof_expmap.h:112:41:   required from here
#27 407.9 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.9    59 |       typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
#27 407.9       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 407.9 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.9 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.9   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.9       |                                     ^~~~~~~~~~
#27 407.9 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 407.9                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 407.9                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 407.9                  from /ORB_SLAM2/include/Tracking.h:32,
#27 407.9                  from /ORB_SLAM2/include/System.h:29,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 407.9 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 407.9    60 |       typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
#27 407.9       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 407.9 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 407.9                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 407.9 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 407.9   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 407.9       |                                     ^~~~~~~~~~
#27 408.0 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
#27 408.0                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 408.0                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 408.0                  from /ORB_SLAM2/include/Tracking.h:32,
#27 408.0                  from /ORB_SLAM2/include/System.h:29,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h: In instantiation of ‘class g2o::BaseVertex<7, g2o::Sim3>’:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:48:35:   required from here
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:72: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 408.0    62 |     typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned >  HessianBlockType;
#27 408.0       |                                                                  ~~~~~~^~~~~~~~~~~~
#27 408.0 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 408.0 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 408.0   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 408.0       |                                     ^~~~~~~~~~
#27 408.0 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 408.0                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 408.0                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 408.0                  from /ORB_SLAM2/include/Tracking.h:32,
#27 408.0                  from /ORB_SLAM2/include/System.h:29,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<7, g2o::Sim3, g2o::VertexSim3Expmap, g2o::VertexSim3Expmap>’:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:99:27:   required from here
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 408.0    59 |       typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
#27 408.0       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 408.0 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 408.0 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 408.0   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 408.0       |                                     ^~~~~~~~~~
#27 408.0 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 408.0                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 408.0                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 408.0                  from /ORB_SLAM2/include/Tracking.h:32,
#27 408.0                  from /ORB_SLAM2/include/System.h:29,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 408.0    60 |       typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
#27 408.0       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 408.0 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 408.0 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 408.0   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 408.0       |                                     ^~~~~~~~~~
#27 408.0 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 408.0                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 408.0                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 408.0                  from /ORB_SLAM2/include/Tracking.h:32,
#27 408.0                  from /ORB_SLAM2/include/System.h:29,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<2, Eigen::Matrix<double, 2, 1>, g2o::VertexSBAPointXYZ, g2o::VertexSim3Expmap>’:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:130:36:   required from here
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 408.0    59 |       typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
#27 408.0       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 408.0 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 408.0 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 408.0   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 408.0       |                                     ^~~~~~~~~~
#27 408.0 In file included from /ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35,
#27 408.0                  from /ORB_SLAM2/include/LoopClosing.h:41,
#27 408.0                  from /ORB_SLAM2/include/LocalMapping.h:30,
#27 408.0                  from /ORB_SLAM2/include/Tracking.h:32,
#27 408.0                  from /ORB_SLAM2/include/System.h:29,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 408.0 /ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
#27 408.0    60 |       typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
#27 408.0       |                                                                          ~~~~~~^~~~~~~~~~~~
#27 408.0 In file included from /usr/include/eigen3/Eigen/Core:363,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/Transform.h:35,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/../include/rtabmap/core/OdometryInfo.h:32,
#27 408.0                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:28:
#27 408.0 /usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
#27 408.0   162 | EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
#27 408.0       |                                     ^~~~~~~~~~
#27 408.1 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp: In member function ‘void ORB_SLAM2::Tracker::Track()’:
#27 408.1 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:365:10: error: ‘mlRelativeFramePoses’ was not declared in this scope
#27 408.1   365 |          mlRelativeFramePoses.push_back(Tcr);
#27 408.1       |          ^~~~~~~~~~~~~~~~~~~~
#27 408.1 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:366:10: error: ‘mlpReferences’ was not declared in this scope; did you mean ‘mpReferenceKF’?
#27 408.1   366 |          mlpReferences.push_back(mpReferenceKF);
#27 408.1       |          ^~~~~~~~~~~~~
#27 408.1       |          mpReferenceKF
#27 408.1 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:367:10: error: ‘mlFrameTimes’ was not declared in this scope
#27 408.1   367 |          mlFrameTimes.push_back(mCurrentFrame.mTimeStamp);
#27 408.1       |          ^~~~~~~~~~~~
#27 408.1 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:368:10: error: ‘mlbLost’ was not declared in this scope; did you mean ‘boost’?
#27 408.1   368 |          mlbLost.push_back(mState==LOST);
#27 408.1       |          ^~~~~~~
#27 408.1       |          boost
#27 408.2 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:373:10: error: ‘mlRelativeFramePoses’ was not declared in this scope
#27 408.2   373 |          mlRelativeFramePoses.push_back(mlRelativeFramePoses.back());
#27 408.2       |          ^~~~~~~~~~~~~~~~~~~~
#27 408.2 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:374:10: error: ‘mlpReferences’ was not declared in this scope; did you mean ‘mpReferenceKF’?
#27 408.2   374 |          mlpReferences.push_back(mlpReferences.back());
#27 408.2       |          ^~~~~~~~~~~~~
#27 408.2       |          mpReferenceKF
#27 408.2 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:375:10: error: ‘mlFrameTimes’ was not declared in this scope
#27 408.2   375 |          mlFrameTimes.push_back(mlFrameTimes.back());
#27 408.2       |          ^~~~~~~~~~~~
#27 408.2 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:376:10: error: ‘mlbLost’ was not declared in this scope; did you mean ‘boost’?
#27 408.2   376 |          mlbLost.push_back(mState==LOST);
#27 408.2       |          ^~~~~~~
#27 408.2       |          boost
#27 408.2 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp: In member function ‘bool ORBSLAMSystem::init(const rtabmap::CameraModel&, bool, double, const rtabmap::Transform&)’:
#27 408.2 /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:818:24: error: no matching function for call to ‘ORB_SLAM2::Tracker::Reset(bool)’
#27 408.2   818 |   mpTracker->Reset(true);
#27 408.2       |                        ^
#27 408.2 In file included from /ORB_SLAM2/include/System.h:29,
#27 408.2                  from /2020-1137-MARLOC-CONV-ICON/rtabmap/corelib/src/odometry/OdometryORBSLAM.cpp:40:
#27 408.2 /ORB_SLAM2/include/Tracking.h:121:10: note: candidate: ‘void ORB_SLAM2::Tracking::Reset()’
#27 408.2   121 |     void Reset();
#27 408.2       |          ^~~~~
#27 408.2 /ORB_SLAM2/include/Tracking.h:121:10: note:   candidate expects 0 arguments, 1 provided
#27 412.7 make[2]: *** [corelib/src/CMakeFiles/rtabmap_core.dir/build.make:1054: corelib/src/CMakeFiles/rtabmap_core.dir/odometry/OdometryORBSLAM.cpp.o] Error 1
#27 412.7 make[1]: *** [CMakeFiles/Makefile2:936: corelib/src/CMakeFiles/rtabmap_core.dir/all] Error 2
#27 412.7 make: *** [Makefile:152: all] Error 2


Reply | Threaded
Open this post in threaded view
|

Re: Orbslam2 with rtabmap in ubuntu 20 and ros noetic

matlabbe
Administrator
Hi,

Why not ORB_SLAM3? At least version v0.4 is working with ubuntu 20.04 (v1 requires opencv 4.4).
git clone -b v0.4-beta https://github.com/UZ-SLAMLab/ORB_SLAM3.git
cd ORB_SLAM3
wget https://gist.githubusercontent.com/matlabbe/f5cb281304a1305b2824a6ce19792e13/raw/f8bbc796edc29b9f815cbf3c99a0c3e13e23663d/orbslam3_v4_rtabmap_fix.patch
git apply orbslam3_v4_rtabmap_fix.patch
./build.sh

For ORB_SLAM2, I fixed an error in this commit. However, I tried this more recent pull request for opencv4:
git clone https://github.com/raulmur/ORB_SLAM2.git
cd ORB_SLAM2
git fetch origin pull/970/head:noetic-devel
git checkout noetic-devel
wget https://gist.githubusercontent.com/matlabbe/c10403c5d44af85cc3585c0e1c601a60/raw/48adf04098960d86ddf225f1a8c68af87bfcf56e/orbslam2_f2e6f51_marchnative_disabled.patch
git apply orbslam2_f2e6f51_marchnative_disabled.patch
./build.sh

Note that if you switch between ORB_SLAM2 and ORB_SLAM3, remove CMakeCache.txt of rtabma/build dir or edit it to replace the old paths from ORB_SLAM2 to ORB_SLAM3 or vice-versa.

I just tested both with a Kinect Azure. Note however that with ORB_SLAM3, the VIO is not implemented on rtabmap side, only VO like ORB_SLAM2.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Orbslam2 with rtabmap in ubuntu 20 and ros noetic

ferrangg
Hi,

I tried your ORB_SLAM fix and recent pull request and now it is working fine, thank you. I have not tried ORB_SLAM3, but I might do it in the future, so thanks for the hints.

Best,

Ferran