Hi Mathieu,
I recently came across some issues with editing the 2d gridmap in the database viewer. I noticed that there is a functionality for us to edit our 2d gridmap after mapping the environment using a 2d lidar, using the 'edit optimized graph' button in the toolbar. I made used of the GUI to add / remove unknown, free and occupied cell, and after I clicked 'save', the changes to the gridmap did not persist. As a result, I was unable to export the new map or use it for localization. Are there any workarounds for this? I am currently on the latest version of RTABmap, built from source, on my Ubuntu 18.04. Thanks, Derek |
Administrator
|
Hi Derek,
When fixing a bug by this commit, it also wrongly re-forced to re-optimize the graph when the optimized graph was smaller than nodes in Working Memory. The problem should be fixed by this commit. EDIT: For reference, when this message is shown, the map is re-assembled (the new commit above fix this one): [ WARN] (2021-02-12 18:06:46.811) Memory.cpp:2087::loadOptimizedPoses() Optimized poses (190) and working memory size (191) don't match. Returning empty optimized poses to force re-update. If you want to use the saved optimized poses, set Mem/InitWMWithAllNodes to true Thx for reporting! Mathieu |
This post was updated on .
Hi Mathieu,
Thanks for the reply. It is strange but I am still getting the same problem, even though I have pulled and recompiled the latest version from the git repository. My approach was following your recommendations in this post. This was after my attempt to clean up the map ('edit optimized graph'): However, after clicking on 'save', and 'regenerate optimized graph', and saving the changes to the database. I ran the rtabmap localization while opening up this edited database. I still get a 2d map that is the unedited version: I am really unsure why this is the case. Any insights? Thanks, Derek |
EDIT: It turns out that the issue lies with using an old database recorded a few months ago and using it with the most recent RTABMap package. The issue is fixed when I performed a remap of the environment. From my observation, older database recorded can no longer be used with the newest changes introduced to the RTABMap package.
Regards, Derek |
Administrator
|
Hi,
Old maps would still be working, but I added new checks to re-optimize the map if the nodes in the map and nodes in Working Memory (WM) differ (to avoid some others issues). When creating the map from DatabaseViewer, it would use all nodes in the graph. If memory management is enabled, on runtime the map may not match the WM, so the map has to be regenerated. If you built the map with memory management, then created the map in DatabaseViewer, you should disable memory management parameters (Rtabmap/TimeThr=0, Rtabmap/MemoryThr = 0) and set Mem/InitWMWithAllNodes to make sure all nodes in the optimized map are in WM on localization mode. Another tip: instead of remapping the area again to upgrade to latest rtabmap version, we can upgrade an old database to a new version with: rtabmap-reprocess --Db/TargetVersion "" --Rtabmap/MemoryThr 0 --Rtabmap/TimeThr 0 old_map.db new_map.db cheers, Mathieu Small test with this demo (I've written TURTLEBOT3 with DbViewer map editor, then reloaded in localization mode): |
Hi Mathieu,
I will try this out. Thanks for replying! Much Thanks, Derek |
In reply to this post by matlabbe
Hi
I am facing similar issue with the latest RTABMAP on ROS2 Humble. Below are the database files and corresponding screen shots. - When mapped https://drive.google.com/file/d/1EunzWWneflGMYX5TK6O0w41LdpUZXoB_/view?usp=sharing - When Edited https://drive.google.com/file/d/1T4YJH5CloISOKemO6zf41jgYZnnsUXhT/view?usp=sharing - When Ran with localization https://drive.google.com/file/d/1BiL7HWuvU8B3YAe-1FBvmX5b1dc8LqHS/view?usp=sharing launch paramters: 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' |
Free forum by Nabble | Edit this page |