introlab / rtabmap

RTAB-Map library and standalone application
https://introlab.github.io/rtabmap
Other
2.61k stars 761 forks source link

Generate obj, mtl, and texture jpg incrementally #1208

Closed 360wcui closed 5 months ago

360wcui commented 5 months ago

Hello,

Can we incrementally save the mesh model (obj, mtl, and jpg) of the 3D map instead of the point cloud from mapData or other sources? I like the way how the iPhone version renders the mesh model in real time.

Any suggestions would be greatly appreciated. Thank you.

matlabbe commented 5 months ago

With standalone or rtabmap_viz in ros, it is possible to show meshes in real-time like the iPhone app does. Open Preferences and check this box: image

This only works for RGB-D data. You may increase the decimation to avoid adding too many polygons.

In ROS, outside rtabmap_viz, there is no way I am aware to do that with data from MapData topic.

360wcui commented 5 months ago

Thank you! Are the mesh models (e.g., obj, mtl) saved anywhere for rtabmap_viz to consume or which code snippet does online meshing?

matlabbe commented 5 months ago

The meshes are kept in renderer memory. To export the mesh, you would use File->Export Clouds... and check Meshing box.

The code creating the meshes online is here: https://github.com/introlab/rtabmap/blob/c27507bc772cfda34f6624d386ab2cd62d49e90d/guilib/src/MainWindow.cpp#L3796-L3866

360wcui commented 5 months ago

Thank you!