0
$\begingroup$

Rosanswers logo

I successfuly run rtabmap_ros by rosbag created from kitti2rosbag .Thanks to Mathieu ! But now , when i try to us orb_slam2 as Odometry , i got a lot problems. I also successfully compiled RTAB-Map with Orb-Slam2, so I can now choose ORB-SLAM2 as an odometry strategy in RTAB-Map standalone app. And i try rtabmap_ros and add those code in launch:

<param name="Odom/Strategy" value="5"/>
      <param name="OdomORBSLAM2/VocPath" value="/home/harold/slam/SLAM/src/ORB_SLAM2/Vocabulary/ORBvoc.txt"/>
      <param name="OdomORBSLAM2/Bf" value="386.1448"/>
      <param name="OdomORBSLAM2/Fps" value="10"/>
      <param name="OdomORBSLAM2/ThDepth" value="35"/>

in

<node if="$(arg stereo)" pkg="rtabmap_ros" type="stereo_odometry" name="stereo_odometry" output="$(arg output)" args="$(arg rtabmap_args) $(arg odom_args)" launch-prefix="$(arg launch_prefix)">

Than i run

roslaunch rtabmap_ros rtabmap.launch stereo:="true" left_image_topic:=/kitti/camera_color_left/image_raw right_image_topic:=/kitti/camera_color_right/image_raw left_camera_info_topic:=/kitti/camera_color_left/camera_info right_camera_info_topic:=/kitti/camera_color_right/camera_info rtabmap_args:="--delete_db_on_start" approx_sync:=true use_sim_time:=true frame_id:=base_link
rosbag play --clock kitti_2011_09_26_drive_0001_synced.bag

Rtabmap only run a piture ,then it stop with:

[ WARN] (2019-07-31 10:28:54.911) util3d.cpp:741::cloudFromDisparityRGB() Decimation (4) is not valid for current image size (depth=1238x374). Highest compatible decimation used=2.

[ WARN] (2019-07-31 10:28:54.975) util3d.cpp:741::cloudFromDisparityRGB() Decimation (4) is not valid for current image size (depth=1238x374). Highest compatible decimation used=2. terminate called after throwing an instance of 'std::bad_alloc' what(): std::bad_alloc [ INFO] [1564540134.997072046, 1317275700.364743025]: rtabmap (1): Rate=1.00s, Limit=0.000s, RTAB-Map=0.0958s, Maps update=0.0081s pub=0.0002s (local map=1, WM=1)

[ WARN] (2019-07-31 10:28:55.050) util3d.cpp:741::cloudFromDisparityRGB() Decimation (4) is not valid for current image size (depth=1238x374). Highest compatible decimation used=2.

[rtabmap/stereo_odometry-2] process has died [pid 28335, exit code -6, cmd /home/harold/slam/rtabmap/devel/lib/rtabmap_ros/stereo_odometry --delete_db_on_start left/image_rect:=/kitti/camera_color_left/image_raw right/image_rect:=/kitti/camera_color_right/image_raw left/camera_info:=/kitti/camera_color_left/camera_info right/camera_info:=/kitti/camera_color_right/camera_info rgbd_image:=rgbd_image_relay odom:=odom imu:=/imu/data __name:=stereo_odometry __log:=/home/harold/.ros/log/e4261a2a-b33a-11e9-a93c-086266871209/rtabmap-stereo_odometry-2.log]. log file: /home/harold/.ros/log/e4261a2a-b33a-11e9-a93c-086266871209/rtabmap-stereo_odometry-2*.log\

this is picture:


Originally posted by lixz123007 on ROS Answers with karma: 27 on 2019-07-30

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Did you build ORB_SLAM2 from original repo without any changes? If so, you may have to apply this patch to disable -march=native and rebuild ORB_SLAM2. If you installed PCL from binaries, normally rtabmap won't be built with -march=native, so when we use a dependency using it, rtabmap will crash when using Eigen functions. If the patch doesn't help, you may add --udebug to odom_args to see more logs.


Originally posted by matlabbe with karma: 6409 on 2019-07-31

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by lixz123007 on 2019-07-31:
Thank you for saving me again! I ran it successfully!

Comment by lixz123007 on 2019-08-08:
I really dont want trouble you ,but i meet a big problem again and i dont know how to solve it after check other questions.this is link!. Please have a look ,any suggestion is OK!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.