rtabmap icon indicating copy to clipboard operation
rtabmap copied to clipboard

The result of iOS write ExportedMesh is inconsistent with reality (coordinate system)

Open zhangyakai opened this issue 8 months ago • 3 comments

Image

Image

Why is the direction inconsistent when saving as an OBJ file using the write ExportedMesh Native function?

zhangyakai avatar Apr 18 '25 02:04 zhangyakai

Is the first view the OBJ shown in another 3D visualization app? I think the difference is that the rendering in the App is done in OpenGL world coordinates, while when we export, the map is converted in ROS world coordinates (or ENU world coordinates).

matlabbe avatar Apr 20 '25 00:04 matlabbe

I used the RTABMAP sample program for iOS to export an obj format model The same coordinate flipping problem occurs when using the built-in 3D viewing on Mac I did not find any code related to coordinate settings in the API How can I configure it to make the exported obj model consistent with the model rendered by OpenGL? Is it still impossible to modify in the code, and can only be modified in the model tool software? @matlabbe

zhangyakai avatar Apr 22 '25 08:04 zhangyakai

We could add an option to export in a different coordinate system (I added a feature request label about it), though it is kinda a low priority feature as you can transform it in any coordinate system with CloudCompare or MeshLab.

Looking at the code, it seems I had the same issue when exporting to Sketchfab: https://github.com/introlab/rtabmap/blob/def99328ce22dbf5b0524b734dd946d022cf7a1e/app/android/jni/RTABMapApp.cpp#L4278-L4282

I think I commented it back because there is an option in Sketchfab to rotate the model.

matlabbe avatar Apr 27 '25 20:04 matlabbe