SteveMacenski / slam_toolbox

Slam Toolbox for lifelong mapping and localization in potentially massive maps with ROS
GNU Lesser General Public License v2.1
1.67k stars 525 forks source link

Unable to Load Posegraph from ROS1 into ROS2 #700

Closed LihanChen2004 closed 6 months ago

LihanChen2004 commented 6 months ago

Required Info:

I successfully converted .pgm to .posegraph format by building the ROS1 image of MigVega/Ogm2Pgbm in Docker. I have converted RMUC.pgm to RMUC.posegraph, but when I tried to load the map in ROS2 Humble on the host machine, I encountered an error:

[localization_slam_toolbox_node-12] [ERROR] [1715064875.276643345] [slam_toolbox]: serialization::Read: Failed to read file: Exception: unregistered class
[localization_slam_toolbox_node-12] [ERROR] [1715064875.276682895] [slam_toolbox]: DeserializePoseGraph: Failed to read file: /home/lihanchen/NAVIGATION_WS/RM2024_SMBU_auto_sentry_ws/install/rm_bringup/share/rm_bringup/map/RMUC.

Could the inability to utilize the posegraph map generated in ROS1 within ROS2 be the version cause? Are there any viable solutions available? Thank you for your assistance.

LihanChen2004 commented 6 months ago

I have solved it another way by recording the bag in ROS1 and then creating the map in ROS2.

https://github.com/MigVega/Ogm2Pgbm/issues/8#issue-2303890105