ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rtabmap_ros kitti2rosbag using orb_slam2 as Odometry

asked 2019-07-30 21:46:00 -0600

lixz123007 gravatar image

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-07-31 11:18:24 -0600

matlabbe gravatar image

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.

edit flag offensive delete link more

Comments

Thank you for saving me again! I ran it successfully!

lixz123007 gravatar image lixz123007  ( 2019-07-31 22:03:43 -0600 )edit

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!

lixz123007 gravatar image lixz123007  ( 2019-08-08 05:16:47 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2019-07-30 21:46:00 -0600

Seen: 720 times

Last updated: Jul 31 '19