Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when exporting mesh with textures #1167

Closed
omgitsraven opened this issue Nov 25, 2023 · 14 comments
Closed

Crash when exporting mesh with textures #1167

omgitsraven opened this issue Nov 25, 2023 · 14 comments

Comments

@omgitsraven
Copy link

I'm having essentially the same issue as #136 , but the issue was old enough that it seemed better to create a new issue...

My steps are:

  1. Start capturing (from an Azure Kinect)
  2. Stop capturing
  3. File > Export 3D Clouds
  4. Check "Meshing"
  5. Check "Texture Mapping"
  6. Set "Texture Format" to ".png"
  7. Click "save"
  8. The progress bar runs for a while
  9. It asks me to save a file, I do
  10. It creates a .PNG file containing many images in a grid. This file looks normal.
  11. It creates an .OBJ file
  12. Several seconds pass, with the progress window still open
  13. RTAB's window (and the progress window) suddenly disappears
  14. Trying to open the .OBJ file in blender shows a cloud of vertices, with no faces
@matlabbe
Copy link
Member

Which rtabmap version are you using? Latest release on Windows? Could it be possible to share the database?

@omgitsraven
Copy link
Author

Sorry, yes; 0.21.0 on Windows 10. Here's a tiny example database just to show that it even happens in such a simple case:

crashdemo.zip

@matlabbe
Copy link
Member

I could not reproduce the issue with this version following your instructions. Here is a comparison of the exported OBJ in CloudCompare on left, from the point cloud in rtabmap on right:
image

You may try to download the ZIP archive, and start RTABMap.exe from that folder directly, maybe in your current installation, RTABMap.exe is loading a wrong dll on start. You may also enable file logging in Preferences:
image
After rtabmap is closed, a file LogRtabmap.txt is created in your ~/Documents/RTAB-Map.

Note that the black borders in the texture are coming from the RGB image. To crop them we should set "Export 3D clouds dialog" / "Regenerate clouds"->"ROI ratios" to 0.05 0.05 0.05 0.05:
image

@omgitsraven
Copy link
Author

Downloading a fresh .zip and running it inside there produced the same result.

Here's my log file following the crash:
LogRtabmap.txt

For that matter, here's the .obj and .png that wind up on the disk after the crash:
crashdemo_export.zip

@matlabbe
Copy link
Member

matlabbe commented Nov 27, 2023

It looks like it crashed while writing the OBJ (disk space issue?), and I think we are missing some logs that were in the buffer and not yet written to the file. I'll try on another computer tonight if I can reproduce. If you have access to another windows computer, you may try it too to compare. I saw in this post it is possible to get the logs doing RTABMap.exe > logs.txt from a terminal, but it didn't work for me yesterday. I may have to create a new version to get all logs correctly.

@matlabbe
Copy link
Member

Good news! I could reproduce the issue on my other computer, which means that there is maybe a missing DLL in the package (the first computer I tried on is the build machine, which all contains developments libraries). I'll try to walk down the dependencies to see which one is different.

@matlabbe
Copy link
Member

matlabbe commented Nov 28, 2023

Looks like I was testing a version on my build machine using older dependencies. I uploaded here to unblock you while I continue investigating what happens with the official release. I feels it may be related to PCL version...
Capture d’écran 2023-11-28 022857

@omgitsraven
Copy link
Author

Confirming that your unblocker version successfully works for me too, I've exported a mesh with no crashing now! Thank you! (I'll leave the ticket open until it makes it into an official release, I guess?)

@matlabbe
Copy link
Member

Keep it open, I am currently checking again with latest dependencies on windows to see if the issue would be fixed implicitly by a new release.

@matlabbe
Copy link
Member

Confirming with latest dependencies, the next release should not have this issue. Tested with:

Capture d’écran 2023-11-29 045112

@sjmielke
Copy link

sjmielke commented Feb 5, 2024

I seem to have the same issue, but I'm on an Apple Silicon Mac. Are there nightly or beta binaries or are .2 or .3 being released soon?

Alternatively, I would optimize, mesh, and export in iOS but even just the scanning can only take small areas before the app crashes, I guess running out of memory. There's no flag or setting to prevent that running out at the expense of processing speed, is there? Thanks!!

@matlabbe
Copy link
Member

I recently added a homebrew formula (Homebrew/homebrew-core#162576) so that it would be easier in the future to build the latest version on mac with:

brew install rtabmap --head

Nevertheless, I'll try to release new official binaries soon.

@sjmielke
Copy link

sjmielke commented Feb 18, 2024 via email

@matlabbe
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants