introlab / rtabmap_ros

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

2d Map Editor in database viewer save issue #1173

Closed robotx10 closed 2 weeks ago

robotx10 commented 3 weeks ago

I am facing issue with the latest RTABMAP on ROS2 Humble, the issue is 2d Map Editor in database viewer is having save issue. After saving and running localization with 'Mem/IncrementalMemory':'False', 'Mem/InitWMWithAllNodes':'True' is vanishing drawn occupancy grids cells on graph

Below are the database files and corresponding screen shots.

mapping

DB file: https://drive.google.com/file/d/1EunzWWneflGMYX5TK6O0w41LdpUZXoB_/view?usp=sharing

editing

DB file: https://drive.google.com/file/d/1T4YJH5CloISOKemO6zf41jgYZnnsUXhT/view?usp=sharing

after_localization

https://drive.google.com/file/d/1BiL7HWuvU8B3YAe-1FBvmX5b1dc8LqHS/view?usp=sharing

launch parameters:

parameters={
      'frame_id':'base_footprint',
      'subscribe_stereo':True,
      'subscribe_odom_info':True,
      'wait_imu_to_init':True,
      'qos_image':qos,
      'qos_imu':qos,
      'Reg/Force3DoF':'true',
      'Grid/RayTracing':'true',
      }

    Node(
        package='rtabmap_odom', executable='stereo_odometry', output='screen',
        parameters=[parameters],
        remappings=remappings),

    # SLAM mode:
    Node(
        condition=UnlessCondition(localization),
        package='rtabmap_slam', executable='rtabmap', output='screen',
        parameters=[parameters],
        remappings=remappings,
        arguments=['-d']), # This will delete the previous database (~/.ros/rtabmap.db)

    # Localization mode:
    Node(
        condition=IfCondition(localization),
        package='rtabmap_slam', executable='rtabmap', output='screen',
        parameters=[parameters,
          {'Mem/IncrementalMemory':'False',
           'Mem/InitWMWithAllNodes':'True'}],
        remappings=remappings),

I uploaded db files for all the cases. It used to work good with previous versions. But now suddenly it stopped working. 'Mem/IncrementalMemory':'False', 'Mem/InitWMWithAllNodes':'True'

matlabbe commented 2 weeks ago

Thx for reporting, there was indeed a bug. This issue was introduced in that PR: https://github.com/introlab/rtabmap/pull/1180

I fixed it in this commit. You should update/rebuild rtabmap library.

Here the result in rviz: image