Issue Manually assembling point cloud form database

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue Manually assembling point cloud form database

mephisto

Hi all,

I'm encountering an issue while manually assembling a point cloud from a database file using RTAB-Map. As shown in the images below, after manually adding a few loop closures and running some post-processing in the database editor, the RTAB-Map GUI displays a well-aligned point cloud. Exporting the point cloud directly from the GUI also works correctly.

However, when I follow the example for assembling and exporting a point cloud from the RGBD Mapping Tutorial, the result appears warped and doesn't match what I see in the GUI.

I reviewed the code in the export binary, which suggests applying full global optimization. However, this did not resolve the issue for me either.

Does RTAB-Map perform any additional processing or alignment steps internally (beyond global optimization) when generating the point cloud in the GUI?

The reason I want to manual export the cloud is to perform semantic image segmentation on individual frames and attach additional labels to the final point cloud.

Here is a link to my code though it's still a bit messy and in progress.

View of the point cloud in the RTAB-Map GUI

View of the point cloud in the RTAB-Map GUI

Export from the RTAB-Map GUI

Export from the RTAB-Map GUI

Warped result from manual export

Warped result from manual export
Reply | Threaded
Open this post in threaded view
|

Re: Issue Manually assembling point cloud form database

mephisto
Managed to solved it, though I am still not sure what the issue was.
Pulled the latest changes and simplified the code back to using Rtabmap::getGraph

Reply | Threaded
Open this post in threaded view
|

Re: Issue Manually assembling point cloud form database

matlabbe
Administrator
Rtabmap::getGraph will get the optimized graph of the map. Maybe you were using the odometry poses instead of the optimized poses when exporting the cloud manually.

For rtabmap-export tool, by default we get all odometry poses and loop closure constraints, then run a global optimization before exporting the clouds. If the optimized graph is already saved in the database, another option ("--opt 2" for export tool) is to read the optimized poses from the database directly, to avoid re-optimizing again.