introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.85k stars 787 forks source link

visual odometry crash and segfault #532

Open HaowenLai opened 4 years ago

HaowenLai commented 4 years ago

Hi, I think an issue concerning package version has occured. I am using Ubuntu 16.04 LTS with ROS kinectic.

Previously I compiled rtab-map standalone with octomap 1.9.3, which performed well and octomap was able to be exported. However, for rtabmap_ros, rtabmaprviz got stuck and had no response as long as I turned on 3D occupancy grid(OctoMap)(if turned off it worked well). Although rtabmaprviz got stuck, topic /rtabmap/octomap_binary and /rtabmap/octomap_full still had output messages.

I thought it was a version conflict with octomap and octomap_msgs (installed by sudo apt install ros-kinetic-octomap ros-kinetic-octomap-msgs, with versions 1.8.1 and 0.3.3 respectively). So I compiled rtab-map standalone and rtabmap_ros again with octomap 1.8.1. But this time as soon as I started mapping with rtab-map standalone, segfault occured and program crashed immediately. The same result was for the "test odometry" in the preference menu. And when I started rtabmap_ros, an error was reported as follows:

[rtabmap/rgbd_odometry-2] process has died [pid 7274, exit code -11, cmd /home/derek/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry rgb/image:=/camera/color/image_raw depth/image:=/camera/aligned_depth_to_color/image_raw rgb/camera_info:=/camera/color/camera_info rgbd_image:=rgbd_image_relay odom:=/odom imu:=/imu/data __name:=rgbd_odometry __log:=/home/derek/.ros/log/498e7006-82de-11ea-a7e4-28c2dd4e381d/rtabmap-rgbd_odometry-2.log].

I need octomap from rtabmap_ros. I would appreciate it if I could get hints for this issue. Thanks.

matlabbe commented 4 years ago

If you built octomap from source, uninstall the ros binary version.

$ sudo apt remove ros-kinetic-octomap

This may uninstall other packages depending on octomap. You will have to clone octomap_ros into your workspace to rebuild it with octomap 1.9.3.

On my computer I have octomap 1.9.0 built from source, so I rebuild also octomap_ros and octomap_rviz_plugins.

I tried vanilla rtabmap_ros with octomap binary version on kinetic, and I don't have problems with rtabmapviz.