introlab / rtabmap

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

Can't launch rtabmap in jetson xavier nx #583

Closed EndlessLoops closed 4 years ago

EndlessLoops commented 4 years ago

Hardware: jetson xavier nx and d435i OS: Ubuntu 18.04 / ROS Melodic and Jetpack4.4 rtabmap version:0.20.3

I installed the rtabmap with source code and I tested it with d435i base on the Tutorials.I got some error and the window can’t get the image.

ubuntu@AIROS-NX:~$ roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start --Optimizer/GravitySigma 0.3" depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw   camera_info_topic:=/camera/color/camera_info approx_sync:=false wait_imu_to_init:=true imu_topic:=/rtabmap/imu
... logging to /home/ubuntu/.ros/log/e50efb0c-dddf-11ea-bb14-70665563e003/roslaunch-AIROS-NX-23924.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://AIROS-NX:44613/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.6
 * /rtabmap/rgbd_odometry/approx_sync: False
 * /rtabmap/rgbd_odometry/config_path: 
 * /rtabmap/rgbd_odometry/expected_update_rate: 0.0
 * /rtabmap/rgbd_odometry/frame_id: camera_link
 * /rtabmap/rgbd_odometry/ground_truth_base_frame_id: 
 * /rtabmap/rgbd_odometry/ground_truth_frame_id: 
 * /rtabmap/rgbd_odometry/guess_frame_id: 
 * /rtabmap/rgbd_odometry/guess_min_rotation: 0.0
 * /rtabmap/rgbd_odometry/guess_min_translation: 0.0
 * /rtabmap/rgbd_odometry/max_update_rate: 0.0
 * /rtabmap/rgbd_odometry/odom_frame_id: odom
 * /rtabmap/rgbd_odometry/publish_tf: True
 * /rtabmap/rgbd_odometry/queue_size: 10
 * /rtabmap/rgbd_odometry/subscribe_rgbd: False
 * /rtabmap/rgbd_odometry/wait_for_transform_duration: 0.2
 * /rtabmap/rgbd_odometry/wait_imu_to_init: True
 * /rtabmap/rtabmap/Mem/IncrementalMemory: true
 * /rtabmap/rtabmap/Mem/InitWMWithAllNodes: false
 * /rtabmap/rtabmap/approx_sync: False
 * /rtabmap/rtabmap/config_path: 
 * /rtabmap/rtabmap/database_path: ~/.ros/rtabmap.db
 * /rtabmap/rtabmap/frame_id: camera_link
 * /rtabmap/rtabmap/ground_truth_base_frame_id: 
 * /rtabmap/rtabmap/ground_truth_frame_id: 
 * /rtabmap/rtabmap/landmark_angular_variance: 9999.0
 * /rtabmap/rtabmap/landmark_linear_variance: 0.0001
 * /rtabmap/rtabmap/map_frame_id: map
 * /rtabmap/rtabmap/odom_frame_id: 
 * /rtabmap/rtabmap/odom_sensor_sync: False
 * /rtabmap/rtabmap/odom_tf_angular_variance: 1.0
 * /rtabmap/rtabmap/odom_tf_linear_variance: 1.0
 * /rtabmap/rtabmap/publish_tf: True
 * /rtabmap/rtabmap/queue_size: 10
 * /rtabmap/rtabmap/scan_cloud_max_points: 0
 * /rtabmap/rtabmap/subscribe_depth: True
 * /rtabmap/rtabmap/subscribe_odom_info: True
 * /rtabmap/rtabmap/subscribe_rgb: True
 * /rtabmap/rtabmap/subscribe_rgbd: False
 * /rtabmap/rtabmap/subscribe_scan: False
 * /rtabmap/rtabmap/subscribe_scan_cloud: False
 * /rtabmap/rtabmap/subscribe_scan_descriptor: False
 * /rtabmap/rtabmap/subscribe_stereo: False
 * /rtabmap/rtabmap/subscribe_user_data: False
 * /rtabmap/rtabmap/wait_for_transform_duration: 0.2
 * /rtabmap/rtabmapviz/approx_sync: False
 * /rtabmap/rtabmapviz/frame_id: camera_link
 * /rtabmap/rtabmapviz/odom_frame_id: 
 * /rtabmap/rtabmapviz/queue_size: 10
 * /rtabmap/rtabmapviz/subscribe_depth: True
 * /rtabmap/rtabmapviz/subscribe_odom_info: True
 * /rtabmap/rtabmapviz/subscribe_rgbd: False
 * /rtabmap/rtabmapviz/subscribe_scan: False
 * /rtabmap/rtabmapviz/subscribe_scan_cloud: False
 * /rtabmap/rtabmapviz/subscribe_scan_descriptor: False
 * /rtabmap/rtabmapviz/subscribe_stereo: False
 * /rtabmap/rtabmapviz/wait_for_transform_duration: 0.2

NODES
  /rtabmap/
    rgbd_odometry (rtabmap_ros/rgbd_odometry)
    rtabmap (rtabmap_ros/rtabmap)
    rtabmapviz (rtabmap_ros/rtabmapviz)

ROS_MASTER_URI=http://localhost:11311

process[rtabmap/rgbd_odometry-1]: started with pid [23972]
process[rtabmap/rtabmap-2]: started with pid [23973]
process[rtabmap/rtabmapviz-3]: started with pid [23974]
[ INFO] [1597377034.914622895]: Starting node...
[ INFO] [1597377034.952343956]: Initializing nodelet with 6 worker threads.
[ INFO] [1597377035.044237611]: Initializing nodelet with 6 worker threads.
[ INFO] [1597377035.310564151]: Odometry: frame_id               = camera_link
[ INFO] [1597377035.310695097]: Odometry: odom_frame_id          = odom
[ INFO] [1597377035.310778139]: Odometry: publish_tf             = true
[ INFO] [1597377035.310927933]: Odometry: wait_for_transform     = true
[ INFO] [1597377035.311063647]: Odometry: wait_for_transform_duration  = 0.200000
[ INFO] [1597377035.311236994]: Odometry: initial_pose           = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[ INFO] [1597377035.311318371]: Odometry: ground_truth_frame_id  = 
[ INFO] [1597377035.311406181]: Odometry: ground_truth_base_frame_id = 
[ INFO] [1597377035.311480358]: Odometry: config_path            = 
[ INFO] [1597377035.311592456]: Odometry: publish_null_when_lost = true
[ INFO] [1597377035.311708970]: Odometry: guess_frame_id         = 
[ INFO] [1597377035.311814347]: Odometry: guess_min_translation  = 0.000000
[ INFO] [1597377035.311882893]: Odometry: guess_min_rotation     = 0.000000
[ INFO] [1597377035.311949070]: Odometry: guess_min_time         = 0.000000
[ INFO] [1597377035.312035919]: Odometry: expected_update_rate   = 0.000000 Hz
[ INFO] [1597377035.312104080]: Odometry: max_update_rate        = 0.000000 Hz
[ INFO] [1597377035.312167985]: Odometry: wait_imu_to_init       = true
[ INFO] [1597377035.312284531]: Odometry: stereoParams_=0 visParams_=1 icpParams_=0
[ INFO] [1597377035.337870963]: Starting node...
[ INFO] [1597377035.746781870]: /rtabmap/rtabmap(maps): map_filter_radius          = 0.000000
[ INFO] [1597377035.747003090]: /rtabmap/rtabmap(maps): map_filter_angle           = 30.000000
[ INFO] [1597377035.747173621]: /rtabmap/rtabmap(maps): map_cleanup                = true
[ INFO] [1597377035.747698173]: /rtabmap/rtabmap(maps): map_always_update          = false
[ INFO] [1597377035.748068899]: /rtabmap/rtabmap(maps): map_empty_ray_tracing      = true
[ INFO] [1597377035.748451433]: /rtabmap/rtabmap(maps): cloud_output_voxelized     = true
[ INFO] [1597377035.748872656]: /rtabmap/rtabmap(maps): cloud_subtract_filtering   = false
[ INFO] [1597377035.749270551]: /rtabmap/rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2
[ INFO] [1597377035.752193190]: /rtabmap/rtabmap(maps): octomap_tree_depth         = 16
[ INFO] [1597377035.902784472]: rtabmap: frame_id      = camera_link
[ INFO] [1597377035.902930266]: rtabmap: map_frame_id  = map
[ INFO] [1597377035.903015323]: rtabmap: use_action_for_goal  = false
[ INFO] [1597377035.903151390]: rtabmap: tf_delay      = 0.050000
[ INFO] [1597377035.903230271]: rtabmap: tf_tolerance  = 0.100000
[ INFO] [1597377035.903312064]: rtabmap: odom_sensor_sync   = false
[ INFO] [1597377036.025573413]: rtabmapviz: Using configuration from "/home/ubuntu/.ros/rtabmap_gui.ini"
[ INFO] [1597377036.570311165]: Update odometry parameter "Optimizer/GravitySigma"="0.3" from arguments
[ INFO] [1597377036.879905351]: odometry: Subscribing to IMU topic /rtabmap/imu
[ INFO] [1597377036.898578294]: RGBDOdometry: approx_sync    = false
[ INFO] [1597377036.900240337]: RGBDOdometry: queue_size     = 10
[ INFO] [1597377036.900663032]: RGBDOdometry: subscribe_rgbd = false
[ INFO] [1597377036.900860924]: RGBDOdometry: rgbd_cameras   = 1
[ INFO] [1597377036.907492231]: Setting RTAB-Map parameter "Mem/IncrementalMemory"="true"
[ INFO] [1597377036.911246788]: Setting RTAB-Map parameter "Mem/InitWMWithAllNodes"="false"
[ INFO] [1597377036.999831333]: 
/rtabmap/rgbd_odometry subscribed to (exact sync):
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info
[ WARN] (2020-08-14 11:50:37.175) OdometryF2M.cpp:218::computeTransform() Updated initial pose from xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000 to xyz=0.000000,0.000000,0.000000 rpy=-0.022978,-0.107959,-0.199720 with IMU orientation
QXcbConnection: XCB error: 148 (Unknown), sequence: 173, resource id: 0, major code: 140 (Unknown), minor code: 20
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
libpng warning: iCCP: known incorrect sRGB profile
[ INFO] [1597377037.808682558]: Update RTAB-Map parameter "Optimizer/GravitySigma"="0.3" from arguments
[rtabmap/rgbd_odometry-1] process has died [pid 23972, exit code -11, cmd /home/ubuntu/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry --delete_db_on_start --Optimizer/GravitySigma 0.3 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:=/rtabmap/imu __name:=rgbd_odometry __log:=/home/ubuntu/.ros/log/e50efb0c-dddf-11ea-bb14-70665563e003/rtabmap-rgbd_odometry-1.log].
log file: /home/ubuntu/.ros/log/e50efb0c-dddf-11ea-bb14-70665563e003/rtabmap-rgbd_odometry-1*.log
[ INFO] [1597377038.505219027]: RTAB-Map detection rate = 1.000000 Hz
[ INFO] [1597377038.506474695]: rtabmap: Deleted database "/home/ubuntu/.ros/rtabmap.db" (--delete_db_on_start or -d are set).
[ INFO] [1597377038.506695403]: rtabmap: Using database from "/home/ubuntu/.ros/rtabmap.db" (0 MB).
[ INFO] [1597377038.586347257]: Reading parameters from the ROS server...
[ INFO] [1597377038.869127115]: Parameters read = 0
[ INFO] [1597377038.901468536]: rtabmap: Database version = "0.20.3".
[ INFO] [1597377039.037996194]: /rtabmap/rtabmap: subscribe_depth = true
[ INFO] [1597377039.038239974]: /rtabmap/rtabmap: subscribe_rgb = true
[ INFO] [1597377039.038436649]: /rtabmap/rtabmap: subscribe_stereo = false
[ INFO] [1597377039.038545067]: /rtabmap/rtabmap: subscribe_rgbd = false (rgbd_cameras=1)
[ INFO] [1597377039.039230198]: /rtabmap/rtabmap: subscribe_odom_info = true
[ INFO] [1597377039.039614268]: /rtabmap/rtabmap: subscribe_user_data = false
[ INFO] [1597377039.039788991]: /rtabmap/rtabmap: subscribe_scan = false
[ INFO] [1597377039.039970978]: /rtabmap/rtabmap: subscribe_scan_cloud = false
[ INFO] [1597377039.040051716]: /rtabmap/rtabmap: subscribe_scan_descriptor = false
[ INFO] [1597377039.040174982]: /rtabmap/rtabmap: queue_size    = 10
[ INFO] [1597377039.040308936]: /rtabmap/rtabmap: approx_sync   = false
[ INFO] [1597377039.040504555]: Setup depth callback
[ INFO] [1597377039.135668116]: 
/rtabmap/rtabmap subscribed to (exact sync):
   /rtabmap/odom \
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info \
   /rtabmap/odom_info
[ INFO] [1597377039.712869649]: rtabmap 0.20.3 started...
[ INFO] [1597377040.037473416]: /rtabmap/rtabmapviz: subscribe_depth = true
[ INFO] [1597377040.039869551]: /rtabmap/rtabmapviz: subscribe_rgb = false
[ INFO] [1597377040.040053042]: /rtabmap/rtabmapviz: subscribe_stereo = false
[ INFO] [1597377040.040172148]: /rtabmap/rtabmapviz: subscribe_rgbd = false (rgbd_cameras=1)
[ INFO] [1597377040.040248854]: /rtabmap/rtabmapviz: subscribe_odom_info = true
[ INFO] [1597377040.040399448]: /rtabmap/rtabmapviz: subscribe_user_data = false
[ INFO] [1597377040.040478873]: /rtabmap/rtabmapviz: subscribe_scan = false
[ INFO] [1597377040.040546202]: /rtabmap/rtabmapviz: subscribe_scan_cloud = false
[ INFO] [1597377040.040657884]: /rtabmap/rtabmapviz: subscribe_scan_descriptor = false
[ INFO] [1597377040.041035074]: /rtabmap/rtabmapviz: queue_size    = 10
[ INFO] [1597377040.041375848]: /rtabmap/rtabmapviz: approx_sync   = false
[ INFO] [1597377040.041680301]: Setup depth callback
[ INFO] [1597377040.249813087]: 
/rtabmap/rtabmapviz subscribed to (exact sync):
   /rtabmap/odom \
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info \
   /rtabmap/odom_info
[ INFO] [1597377040.250299783]: rtabmapviz started.
[ WARN] [1597377044.136737356]: /rtabmap/rtabmap: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
/rtabmap/rtabmap subscribed to (exact sync):
   /rtabmap/odom \
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info \
   /rtabmap/odom_info
[ WARN] [1597377045.250285610]: /rtabmap/rtabmapviz: Did not receive data since 5 seconds! Make sure the input topics are published ("$ rostopic hz my_topic") and the timestamps in their header are set. If topics are coming from different computers, make sure the clocks of the computers are synchronized ("ntpdate"). Parameter "approx_sync" is false, which means that input topics should have all the exact timestamp for the callback to be called.
/rtabmap/rtabmapviz subscribed to (exact sync):
   /rtabmap/odom \
   /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info \
   /rtabmap/odom_info

rtabmap_error

EndlessLoops commented 4 years ago

What information do I need to provide?

-- --------------------------------------------
-- Info :
--   Version : 0.20.3
--   CMAKE_INSTALL_PREFIX = /home/ubuntu/catkin_ws/devel
--   CMAKE_BUILD_TYPE =     Release
--   CMAKE_INSTALL_LIBDIR = lib
--   BUILD_APP =            ON
--   BUILD_TOOLS =          ON
--   BUILD_EXAMPLES =       ON
--   BUILD_SHARED_LIBS =    ON
--   CMAKE_CXX_FLAGS =  -fmessage-length=0  -fopenmp -std=c++11
--   FLANN_KDTREE_MEM_OPT = OFF
--   PCL_DEFINITIONS =  ;-DDISABLE_ENSENSO;-DDISABLE_DAVIDSDK;-DDISABLE_DSSDK;-DDISABLE_PCAP;-DDISABLE_PNG;-DDISABLE_LIBUSB_1_0;-DFLANN_STATIC;-Dqh_QHpointer;-DDISABLE_RSSDK
--   PCL_VERSION = 1.8.1
-- 
-- Optional dependencies ('*' affects some default parameters) :
--  *With OpenCV 4.1.1 xfeatures2d = NO, nonfree = NO (License: BSD)
--   With Qt 5.9.5            = YES (License: Open Source or Commercial)
--   With VTK 6.3              = YES (License: BSD)
--   With external SQLite3     = YES (License: Public Domain)
--   With ORB OcTree           = YES (License: GPLv3)
--   With SupertPoint          = NO (libtorch not found)
--   With Python3              = NO (WITH_PYMATCHER=OFF)
--   With Madgwick             = YES (License: GPL)
--   With FastCV               = NO (FastCV not found)
-- 
--  Solvers:
--   With TORO                 = YES (License: Creative Commons [Attribution-NonCommercial-ShareAlike])
--  *With g2o                  = YES (License: BSD)
--  *With GTSAM                = NO (GTSAM not found)
--  *With Ceres                = YES (License: BSD)
--   With VERTIGO              = YES (License: GPLv3)
--   With cvsba                = NO (cvsba not found)
--  *With libpointmatcher      = NO (libpointmatcher not found)
-- 
--  Reconstruction Approaches:
--   With OCTOMAP              = YES (License: BSD)
--   With CPUTSDF              = NO (CPUTSDF not found)
--   With OpenChisel           = NO (open_chisel not found)
--   With AliceVision          = NO (WITH_ALICE_VISION=OFF)
-- 
--  Camera Drivers:
--   With Freenect             = YES (License: Apache v2 and/or GPLv2)
--   With OpenNI2              = YES (License: Apache v2)
--   With Freenect2            = NO (libfreenect2 not found)
--   With Kinect for Windows 2 = NO (Kinect for Windows 2 SDK not found)
--   With Kinect for Azure     = NO (Kinect for Azure SDK not found)
--   With dc1394               = NO (dc1394 not found)
--   With FlyCapture2/Triclops = NO (Point Grey SDK not found)
--   With ZED                  = NO (ZED sdk and/or cuda not found)
--   With RealSense            = NO (librealsense not found)
--   With RealSense2           = YES (License: Apache-2)
--   With MyntEyeS             = NO (mynteye s sdk not found)
-- 
--  Odometry Approaches:
--   With loam_velodyne        = NO (loam_velodyne not found)
--   With libfovis             = NO (libfovis not found)
--   With libviso2             = NO (libviso2 not found)
--   With dvo_core             = NO (dvo_core not found)
--   With okvis                = NO (okvis not found)
--   With msckf_vio            = NO (WITH_MSCKF_VIO=OFF)
--   With VINS-Fusion          = NO (VINS-Fusion not found)
--   With ORB_SLAM2            = NO (WITH_G2O should be OFF as ORB_SLAM2 uses its own g2o version)
-- Show all options with: cmake -LA | grep WITH_
-- --------------------------------------------
-- Configuring done
matlabbe commented 4 years ago

For the warnings in the console, make sure those topics are published:

rostopic hz /camera/color/image_raw \
   /camera/aligned_depth_to_color/image_raw \
   /camera/color/camera_info

For the empty 3D Map view, it is a known OpenGL rendering problem on Jetson, see this post (the best workaround is to use RVIZ instead of rtabmapviz):

If you are going to use ROS, avoid all those recompilations and use rtabmap binaries directly and just don't use rtabmapviz but RVIZ instead!

EndlessLoops commented 4 years ago

@matlabbe Thanks for your reply. I reinstall the system and rtabmap binaries . It can work in RViz though it also have OpenGL rendering problem in rtabmapviz.