problems running RtabMap with ORB_SLAM

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

problems running RtabMap with ORB_SLAM

nate_z
Hello,

i am trying to run rtabmap with ORB_SLAM2: i have managed to do a successful build. and odom strategy is set to 5 as directed. then i ran:
./rtabmap-rgbd_dataset --OdomORBSLAM2/VocPath "/home/natnael/ORB_SLAM2/Vocabulary/ORBvoc.txt" /home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk

and recieved:
Paths:
   Dataset name:    rgbd_dataset_freiburg1_desk
   Dataset path:    /home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk
   RGB path:        /home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk/rgb_sync
   Depth path:      /home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk/depth_sync
   Output:          /home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk
   Output name:     rtabmap
   groundtruth.txt: /home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk/groundtruth.txt
Parameters:
   OdomORBSLAM2/VocPath=/home/natnael/ORB_SLAM2/Vocabulary/ORBvoc.txt
   Rtabmap/PublishRAMUsage=true
   Rtabmap/WorkingDirectory=/home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk
RTAB-Map version: 0.18.0
[ WARN] (2018-11-10 23:58:54.597) CameraModel.cpp:286::load() Missing "distorsion_coefficients" field in "/home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk/rtabmap_calib.yaml"
[ WARN] (2018-11-10 23:58:54.597) CameraModel.cpp:307::load() Missing "distortion_model" field in "/home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk/rtabmap_calib.yaml"
[ WARN] (2018-11-10 23:58:54.597) CameraModel.cpp:323::load() Missing "rectification_matrix" field in "/home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk/rtabmap_calib.yaml"
[ WARN] (2018-11-10 23:58:54.597) CameraModel.cpp:339::load() Missing "projection_matrix" field in "/home/natnael/rtabmap/bin/data/rgbd_dataset_freiburg1_desk/rtabmap_calib.yaml"
[ WARN] (2018-11-10 23:58:54.748) CameraImages.cpp:402::readPoses() Cannot interpolate pose for stamp 1305031467.459692 between 1305031467.459200 and 1305031467.509200 (> maximum time diff of 0.020000 sec)
[ WARN] (2018-11-10 23:58:54.748) CameraImages.cpp:402::readPoses() Cannot interpolate pose for stamp 1305031467.496058 between 1305031467.459200 and 1305031467.509200 (> maximum time diff of 0.020000 sec)
[ WARN] (2018-11-10 23:58:54.752) CameraImages.cpp:428::readPoses() 571 valid poses of 573 stamps
Processing 573 images...
[ WARN] (2018-11-10 23:58:54.766) OdometryORBSLAM2.cpp:557::ORBSLAM2System() Loading ORB Vocabulary: "/home/natnael/ORB_SLAM2/Vocabulary/ORBvoc.txt". This could take a while...
[ WARN] (2018-11-10 23:59:01.365) OdometryORBSLAM2.cpp:568::ORBSLAM2System() Vocabulary loaded!

Camera Parameters:
- fx: 517.3
- fy: 516.5
- cx: 318.6
- cy: 255.3
- k1: 0
- k2: 0
- p1: 0
- p2: 0
- fps: 30
- color order: RGB (ignored if grayscale)

ORB Extractor Parameters:
- Number of Features: 1000
- Scale Levels: 8
- Scale Factor: 1.2
- Initial Fast Threshold: 20
- Minimum Fast Threshold: 7

Depth Threshold (Close/Far Points): 3.04
New map created with 946 points
Iteration 1/573: camera=34ms, odom(quality=946/0, kfs=0)=42ms, slam=32ms
Segmentation fault (core dumped)

bt gives:

(gdb) bt
#0  0x00007ffff42baaa7 in g2o::BaseVertex<6, g2o::SE3Quat>::pop() () from /home/natnael/ORB_SLAM2/Thirdparty/g2o/lib/libg2o.so
#1  0x00007ffff42f8e68 in g2o::SparseOptimizer::pop(std::vector<g2o::OptimizableGraph::Vertex*, std::allocator<g2o::OptimizableGraph::Vertex*> >&) ()
   from /home/natnael/ORB_SLAM2/Thirdparty/g2o/lib/libg2o.so
#2  0x00007ffff4302f34 in g2o::OptimizationAlgorithmLevenberg::solve(int, bool) () from /home/natnael/ORB_SLAM2/Thirdparty/g2o/lib/libg2o.so
#3  0x00007ffff42fa487 in g2o::SparseOptimizer::optimize(int, bool) () from /home/natnael/ORB_SLAM2/Thirdparty/g2o/lib/libg2o.so
#4  0x00007ffff3ff59bf in ORB_SLAM2::Optimizer::PoseOptimization(ORB_SLAM2::Frame*) () from /home/natnael/ORB_SLAM2/lib/libORB_SLAM2.so
#5  0x00007ffff3f9144f in ORB_SLAM2::Tracking::TrackReferenceKeyFrame() () from /home/natnael/ORB_SLAM2/lib/libORB_SLAM2.so
#6  0x00007ffff76cbec7 in ORB_SLAM2::Tracker::Track (this=0xefb66d0) at /home/natnael/rtabmap/corelib/src/odometry/OdometryORBSLAM2.cpp:103
#7  0x00007ffff76ce399 in ORB_SLAM2::Tracker::GrabImageRGBD (this=0xefb66d0, imRGB=..., imD=..., timestamp=@0x7fffffff45e0: 1305031453.39169)
    at /home/natnael/rtabmap/corelib/src/odometry/OdometryORBSLAM2.cpp:494
#8  0x00007ffff76c918d in rtabmap::OdometryORBSLAM2::computeTransform (this=0x9ebfe0, data=..., guess=..., info=0x7fffffff8b50) at /home/natnael/rtabmap/corelib/src/odometry/OdometryORBSLAM2.cpp:909
#9  0x00007ffff7640f0b in rtabmap::Odometry::process (this=0x9ebfe0, data=..., guessIn=..., info=0x7fffffff8b50) at /home/natnael/rtabmap/corelib/src/Odometry.cpp:416
#10 0x00007ffff763f634 in rtabmap::Odometry::process (this=0x9ebfe0, data=..., info=0x7fffffff8b50) at /home/natnael/rtabmap/corelib/src/Odometry.cpp:237
#11 0x000000000044aa95 in main (argc=5, argv=0x7fffffffd368) at /home/natnael/rtabmap/tools/RgbdDataset/main.cpp:245

any suggestions for solutions?
thanks in advance








 
Reply | Threaded
Open this post in threaded view
|

Re: problems running RtabMap with ORB_SLAM

matlabbe
Administrator
Hi,

It is maybe that g2o built with ORB_SLAM2 contains -march=native as PCL is not built with it. For example, if when doing cmake on rtabmap build you see this:

$ cd  rtabmap/build
$ cmake ..
...
-- PCL definitions don't contain "-march=native", make sure all libraries using Eigen
are also compiled without that flag to avoid some segmentation faults (with gdb
referring to some Eigen functions).

...


Remove "-march=native" from here, here and here in ORB_SLAM2. Rebuild ORB_SLAM2.

If PCL has been already built with -march=native, you would not have to modify ORB_SLAM2 (well I didn't test it though).

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

Re: problems running RtabMap with ORB_SLAM

nate_z
Thanks Mathieu!
that did the trick
Reply | Threaded
Open this post in threaded view
|

Re: problems running RtabMap with ORB_SLAM

nate_z
Hi Mathieu, i wanted to ask a follow up question.
i am now using ORB_SLAM2 in rtabmap ros, inside rgbdslam_datasets.launch
i added :
Odom/Strategy to 5 and set OdomORBSLAM2/VocPath to the relevant directory and it works fine.
but now i wanted to run rtabmap with orb-slam2 with my own Asus rgbd camera,
what modifications do i need to make? using rtabmap.launch defaults to F2M as an odometry strategy.
can you please give me the details of how to make it use ORB_SLAM2?
Reply | Threaded
Open this post in threaded view
|

Re: problems running RtabMap with ORB_SLAM

matlabbe
Administrator
Hi,

you can try something like this:
$ roslaunch openni2_launch openni2.launch depth_registration:=true
$ roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start --Odom/Strategy 5 --OdomORBSLAM2/VocPath \"the_vocabulary_path\""
cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: problems running RtabMap with ORB_SLAM

nate_z
Works great...
You are very helpful, thanks.
Regards,
Natnael