mirror of
https://github.com/introlab/rtabmap.git
synced 2026-10-05 01:27:46 +08:00
CameraRGBD: fall back to Qt viewer for -pcl on macOS
pcl::visualization::CloudViewer creates its render window on a background thread, which macOS forbids (NSWindow must be created on the main thread), aborting the process. On macOS, warn and use the default Qt viewer instead of the legacy -pcl one. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
80b537b2e4
commit
f7d855e798
@@ -372,6 +372,18 @@ int main(int argc, char * argv[])
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef __APPLE__
|
||||
if(usePCLViz)
|
||||
{
|
||||
// pcl::visualization::CloudViewer creates its render window on its own
|
||||
// background thread, but macOS only allows NSWindow creation on the main
|
||||
// thread, so it aborts. Fall back to the default (Qt) viewer.
|
||||
printf("-pcl is not supported on macOS (pcl::visualization::CloudViewer creates its "
|
||||
"window on a background thread, which macOS forbids). Using the default viewer instead.\n");
|
||||
usePCLViz = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(usePCLViz)
|
||||
{
|
||||
rtabmap::SensorData data = camera->takeData();
|
||||
|
||||
Reference in New Issue
Block a user