introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
957 stars 556 forks source link

rtabmap_ros faild to mappin with d435i #610

Open matlabmann opened 3 years ago

matlabmann commented 3 years ago

hi ,i m a beginner in ros , so , i have installed ros kinetic on ubuntu 16.04 with rtabmap_ros (latest version) and realsens-ros-2.3.0 .and the camera is realsense D435i. after that when i launch my launch file (roslaunch realsense2_camera opensource_tracking.launch) i have no map in rviz and rtabmapviz, and when i change the global frame in rviz from map to camera_link or anythink ,i can get a point claud but not a map. so this is all my parametre attached here, the launch file: opensource_tracking.txt the rtabmap.launch: rtabmap.txt the ros graph: rosgraph5 the frame graph: frames.pdf

matlabbe commented 3 years ago

rgbd_odometry node is no connected to camera topics. Do you have warnings in terminal telling that input topics are not synchronized? Is the rtabmap.launch file modified from the default one (here kinetic version)?

matlabmann commented 3 years ago

Hi @matlabbe you are right, the rgbd_odometry node is not connected,and it is died directly when i launch the file. this is the output of the terminal,to see the warning msg, thank your for replay,

roslaunch realsense2_camera opensource_tracking.launch ... logging to /home/hassen/.ros/log/a3dbab92-f087-11eb-b62b-20689d328d50/roslaunch-thewalf-19584.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://thewalf:39665/

SUMMARY

CLEAR PARAMETERS

PARAMETERS

NODES /camera/ realsense2_camera (nodelet/nodelet) realsense2_camera_manager (nodelet/nodelet) /rtabmap/ rgbd_odometry (rtabmap_ros/rgbd_odometry) rtabmap (rtabmap_ros/rtabmap) / ImuFilter (imu_filter_madgwick/imu_filter_node) points_xyzrgb (nodelet/nodelet) rviz (rviz/rviz) ukf_se (robot_localization/ukf_localization_node)

auto-starting new master process[master]: started with pid [19595] ROS_MASTER_URI=http://localhost:11311

setting /run_id to a3dbab92-f087-11eb-b62b-20689d328d50 process[rosout-1]: started with pid [19608] started core service [/rosout] process[camera/realsense2_camera_manager-2]: started with pid [19626] process[camera/realsense2_camera-3]: started with pid [19627] process[ImuFilter-4]: started with pid [19628] [ INFO] [1627575093.564769106]: Initializing nodelet with 4 worker threads. process[rtabmap/rgbd_odometry-5]: started with pid [19645] process[rtabmap/rtabmap-6]: started with pid [19705] process[rviz-7]: started with pid [19713] process[points_xyzrgb-8]: started with pid [19714] process[ukf_se-9]: started with pid [19715] type is rtabmap_ros/point_cloud_xyzrgb [ INFO] [1627575093.814501999]: Starting node... [ INFO] [1627575093.904644351]: Initializing nodelet with 4 worker threads. [ INFO] [1627575093.905446427]: Initializing nodelet with 4 worker threads. [ INFO] [1627575093.989928591]: RealSense ROS v2.3.0 [ INFO] [1627575093.989983818]: Built with LibRealSense v2.45.0 [ INFO] [1627575093.990014431]: Running with LibRealSense v2.45.0 [ INFO] [1627575094.080379942]:
[ INFO] [1627575094.126694934]: Device with serial number 047422070913 was found.

[ INFO] [1627575094.127188411]: Device with physical ID /sys/devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/video4linux/video0 was found. [ INFO] [1627575094.127445968]: Device with name Intel RealSense D435I was found. [ INFO] [1627575094.128680180]: Device with port number 4-2 was found. [ INFO] [1627575094.129793157]: Device USB type: 3.2

[ INFO] [1627575094.204895809]: /rtabmap/rtabmap(maps): map_filter_radius = 0.000000 [ INFO] [1627575094.204963013]: /rtabmap/rtabmap(maps): map_filter_angle = 30.000000 [ INFO] [1627575094.204995389]: /rtabmap/rtabmap(maps): map_cleanup = true [ INFO] [1627575094.205028476]: /rtabmap/rtabmap(maps): map_always_update = false [ INFO] [1627575094.205059152]: /rtabmap/rtabmap(maps): map_empty_ray_tracing = true [ INFO] [1627575094.205089400]: /rtabmap/rtabmap(maps): cloud_output_voxelized = true [ INFO] [1627575094.205119548]: /rtabmap/rtabmap(maps): cloud_subtract_filtering = false [ INFO] [1627575094.205149770]: /rtabmap/rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2 [ INFO] [1627575094.207369995]: /rtabmap/rtabmap(maps): octomap_tree_depth = 16 [ INFO] [1627575094.315603480]: Odometry: frame_id = camera_link [ INFO] [1627575094.315658604]: Odometry: odom_frame_id = odom [ INFO] [1627575094.315696120]: Odometry: publish_tf = true [ INFO] [1627575094.315726537]: Odometry: wait_for_transform = true [ INFO] [1627575094.315767802]: Odometry: wait_for_transform_duration = 0.200000 [ INFO] [1627575094.315845017]: Odometry: initial_pose = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000 [ INFO] [1627575094.315915358]: Odometry: ground_truth_frame_id = [ INFO] [1627575094.315973423]: Odometry: ground_truth_base_frame_id = [ INFO] [1627575094.316031095]: Odometry: config_path = [ INFO] [1627575094.316090699]: Odometry: publish_null_when_lost = true [ INFO] [1627575094.316147542]: Odometry: guess_frame_id = [ INFO] [1627575094.316209029]: Odometry: guess_min_translation = 0.000000 [ INFO] [1627575094.316330971]: Odometry: guess_min_rotation = 0.000000 [ INFO] [1627575094.316425442]: Odometry: guess_min_time = 0.000000 [ INFO] [1627575094.316561075]: Odometry: expected_update_rate = 0.000000 Hz [ INFO] [1627575094.316651222]: Odometry: max_update_rate = 0.000000 Hz [ INFO] [1627575094.316689730]: Odometry: wait_imu_toinit = false [ INFO] [1627575094.316750250]: Odometry: stereoParams=0 visParams=1 icpParams=0 [ INFO] [1627575094.358913466]: Approximate time sync = true [ INFO] [1627575094.425484742]: rtabmap: frame_id = camera_link [ INFO] [1627575094.425543977]: rtabmap: map_frame_id = map [ INFO] [1627575094.425581575]: rtabmap: use_action_for_goal = false [ INFO] [1627575094.425614063]: rtabmap: tf_delay = 0.050000 [ INFO] [1627575094.425643135]: rtabmap: tf_tolerance = 0.100000 [ INFO] [1627575094.425674958]: rtabmap: odom_sensor_sync = false [ INFO] [1627575094.430606397]: rtabmap: gen_scan = false [ INFO] [1627575094.430660792]: rtabmap: gen_depth = false

[ INFO] [1627575094.634602054]: JSON file is not provided [ INFO] [1627575094.634718024]: ROS Node Namespace: camera [ INFO] [1627575094.634835829]: Device Name: Intel RealSense D435I [ INFO] [1627575094.634946422]: Device Serial No: 047422070913 [ INFO] [1627575094.635061322]: Device physical port: /sys/devices/pci0000:00/0000:00:14.0/usb4/4-2/4-2:1.0/video4linux/video0 [ INFO] [1627575094.635177870]: Device FW version: 05.12.14.50 [ INFO] [1627575094.635287025]: Device Product ID: 0x0B3A [ INFO] [1627575094.635333308]: Enable PointCloud: Off [ INFO] [1627575094.635366766]: Align Depth: On [ INFO] [1627575094.635395533]: Sync Mode: On [ INFO] [1627575094.635535051]: Device Sensors: [ INFO] [1627575094.665723202]: Stereo Module was found. [ INFO] [1627575094.730976373]: RGB Camera was found. [ INFO] [1627575094.733384125]: Motion Module was found. [ INFO] [1627575094.738715503]: num_filters: 1 [ INFO] [1627575094.738777523]: Setting Dynamic reconfig parameters. [ WARN] [1627575094.825087099]: Param '/camera/stereo_module/auto_exposure_limit' has value 0 that is not in range [1, 165000]. Removing this parameter from dynamic reconfigure options. [ WARN] [1627575094.827333812]: Param '/camera/stereo_module/auto_gain_limit' has value 0 that is not in range [16, 248]. Removing this parameter from dynamic reconfigure options. [ERROR] [1627575094.926284387]: PluginlibFactory: The plugin for class 'octomap_rviz_plugin/ColorOccupancyGrid' failed to load. Error: According to the loaded plugin descriptions the class octomap_rviz_plugin/ColorOccupancyGrid with base class type rviz::Display does not exist. Declared types are rtabmap_ros/Info rtabmap_ros/MapCloud rtabmap_ros/MapGraph rviz/Axes rviz/Camera rviz/DepthCloud rviz/Effort rviz/FluidPressure rviz/Grid rviz/GridCells rviz/Illuminance rviz/Image rviz/InteractiveMarkers rviz/LaserScan rviz/Map rviz/Marker rviz/MarkerArray rviz/Odometry rviz/Path rviz/PointCloud rviz/PointCloud2 rviz/PointStamped rviz/Polygon rviz/Pose rviz/PoseArray rviz/PoseWithCovariance rviz/Range rviz/RelativeHumidity rviz/RobotModel rviz/TF rviz/Temperature rviz/WrenchStamped rviz_plugin_tutorials/Imu [ INFO] [1627575094.943126017]: Done Setting Dynamic reconfig parameters. [ INFO] [1627575094.944561547]: depth stream is enabled - width: 848, height: 480, fps: 30, Format: Z16 [ INFO] [1627575094.946329727]: color stream is enabled - width: 1280, height: 720, fps: 30, Format: RGB8 [ INFO] [1627575094.948057561]: gyro stream is enabled - fps: 200 [ INFO] [1627575094.948134820]: accel stream is enabled - fps: 63

[ INFO] [1627575094.960776863]: Expected frequency for depth = 30.00000 [ INFO] [1627575095.124650367]: Expected frequency for color = 30.00000 [ INFO] [1627575095.308164822]: Expected frequency for aligned_depth_to_color = 30.00000 [ INFO] [1627575095.452908168]: Start publisher IMU

[ INFO] [1627575095.459246330]: insert Depth to Stereo Module [ INFO] [1627575095.459330854]: insert Color to RGB Camera [ INFO] [1627575095.459376092]: insert Gyro to Motion Module [ INFO] [1627575095.459417399]: insert Accel to Motion Module [ INFO] [1627575095.534012404]: SELECTED BASE:Depth, 0 [ INFO] [1627575095.599220168]: RealSense Node Is Up! [ WARN] [1627575095.599831226]: [ INFO] [1627575095.874539819]: Setting RTAB-Map parameter "Mem/IncrementalMemory"="true" [ INFO] [1627575095.875941188]: Setting RTAB-Map parameter "Mem/InitWMWithAllNodes"="false" [ INFO] [1627575096.815957600]: RGBDOdometry: approx_sync = true [ INFO] [1627575096.816010009]: RGBDOdometry: queue_size = 10 [ INFO] [1627575096.816038161]: RGBDOdometry: subscribe_rgbd = false [ INFO] [1627575096.816062635]: RGBDOdometry: rgbd_cameras = 1 [ INFO] [1627575096.816089112]: RGBDOdometry: keep_color = false [ INFO] [1627575096.912997307]: /rtabmap/rgbd_odometry subscribed to (approx sync): /camera/color/image_raw \ /camera/aligned_depth_to_color/image_raw \ /camera/color/camera_info [ WARN] (2021-07-29 17:11:37.209) OdometryF2M.cpp:1300::computeTransform() 20 visual features required to initialize the odometry (only 0 extracted). [rtabmap/rgbd_odometry-5] process has died [pid 19645, exit code -11, cmd /home/hassen/catkin_ws/devel/lib/rtabmap_ros/rgbd_odometry --delete_db_on_start 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/hassen/.ros/log/a3dbab92-f087-11eb-b62b-20689d328d50/rtabmap-rgbd_odometry-5.log]. log file: /home/hassen/.ros/log/a3dbab92-f087-11eb-b62b-20689d328d50/rtabmap-rgbd_odometry-5*.log [ INFO] [1627575098.152511860]: RTAB-Map detection rate = 1.000000 Hz [ INFO] [1627575098.152860295]: rtabmap: Deleted database "/home/hassen/.ros/rtabmap.db" (--delete_db_on_start or -d are set). [ INFO] [1627575098.153092714]: rtabmap: Using database from "/home/hassen/.ros/rtabmap.db" (0 MB). [ INFO] [1627575100.575314050]: rtabmap: Database version = "0.20.7". [ INFO] [1627575100.575518083]: rtabmap: SLAM mode (Mem/IncrementalMemory=true) [ INFO] [1627575100.653127719]: /rtabmap/rtabmap: subscribe_depth = true [ INFO] [1627575100.653181536]: /rtabmap/rtabmap: subscribe_rgb = true [ INFO] [1627575100.653225790]: /rtabmap/rtabmap: subscribe_stereo = false [ INFO] [1627575100.653260184]: /rtabmap/rtabmap: subscribe_rgbd = false (rgbd_cameras=1) [ INFO] [1627575100.653291176]: /rtabmap/rtabmap: subscribe_odom_info = true [ INFO] [1627575100.653323190]: /rtabmap/rtabmap: subscribe_user_data = false [ INFO] [1627575100.653352173]: /rtabmap/rtabmap: subscribe_scan = false [ INFO] [1627575100.653381541]: /rtabmap/rtabmap: subscribe_scan_cloud = false [ INFO] [1627575100.653410343]: /rtabmap/rtabmap: subscribe_scan_descriptor = false [ INFO] [1627575100.653441196]: /rtabmap/rtabmap: queue_size = 10 [ INFO] [1627575100.653471011]: /rtabmap/rtabmap: approx_sync = true [ INFO] [1627575100.653560274]: Setup depth callback [ INFO] [1627575100.731147246]: /rtabmap/rtabmap subscribed to (approx sync): /rtabmap/odom \ /camera/color/image_raw \ /camera/aligned_depth_to_color/image_raw \ /camera/color/camera_info \ /rtabmap/odom_info [ INFO] [1627575101.287851670]: rtabmap 0.20.12 started... [ WARN] [1627575105.731486237]: /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"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10). /rtabmap/rtabmap subscribed to (approx sync): /rtabmap/odom \ /camera/color/image_raw \ /camera/aligned_depth_to_color/image_raw \ /camera/color/camera_info \ /rtabmap/odom_info [ WARN] [1627575110.731774216]: /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"). If topics are not published at the same rate, you could increase "queue_size" parameter (current=10). /rtabmap/rtabmap subscribed to (approx sync): /rtabmap/odom \ /camera/color/image_raw \ /camera/aligned_depth_to_color/image_raw \ /camera/color/camera_info \ /rtabmap/odom_info

note:i l not modify anything from the original rtabmap_ros launch file (xml) im just put sum modification in realsense launch file to adjust my camea name space or topics

matlabbe commented 3 years ago

See this issue to debug "process has died" errors: https://github.com/introlab/rtabmap_ros/issues/28

SahanGura commented 2 years ago

Just wanted to clarify another issue in this implementation.

You have not made use of the IMU data in this configuration. Because, IMU data and visual odometry are fused inside the ukf, but the output of ukf has not fed into the rtabmap node. rtabmap node should be given the filtered odometry (/odometry/filtered), not just the visual odometry (/rtabmap/odom) if you want to make use of the IMU. This is a common mistake in the community as I have identified. But, using an intermediate filter to fuse odometry is really difficult to configure. I am still trying to create an accurate map with fused odometry, than just using visual odometry. But unfortunately, rtabmap creates a distorted map with fused odometry.