New post for this & I'm new to osx tool sets.
Following the example here: http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer , but here is exactly what I've got to be sure: The following source: #include <pcl/visualization/cloud_viewer.h> #include <pcl/io/pcd_io.h> int main() { pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>()); pcl::io::loadPCDFile<pcl::PointXYZRGB>("/Users/nous/Documents/capture/cloud0.pcd", *cloud); pcl::visualization::CloudViewer viewer ("Simple Cloud Viewer"); viewer.showCloud (cloud); while (!viewer.wasStopped ()) {} return 0; } Here is the CMakeLists.txt: cmake_minimum_required(VERSION 2.8 FATAL_ERROR) project(cloud_viewer) find_package(PCL 1.2 REQUIRED) include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_definitions(${PCL_DEFINITIONS}) add_executable (cloud_viewer cloud_viewer.cpp) target_link_libraries (cloud_viewer ${PCL_LIBRARIES}) Then execute the following commands: cmake .. make ./cloud_viewer Results in a screen with the point cloud rendered, but destroyed shortly after with the following terminal output: nousair:build nous$ ./cloud_viewer objc[98973]: Object 0x7fbe8bc36930 of class __NSCFDictionary autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug 2011-12-21 16:44:41.144 cloud_viewer[98973:4303] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.20/Misc.subproj/NSUndoManager.m:324 2011-12-21 16:44:41.145 cloud_viewer[98973:4303] +[NSUndoManager(NSInternal) _endTopLevelGroupings] is only safe to invoke on the main thread. 2011-12-21 16:44:41.146 cloud_viewer[98973:4303] ( 0 CoreFoundation 0x00007fff96644286 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff90979d5e objc_exception_throw + 43 2 CoreFoundation 0x00007fff966440ba +[NSException raise:format:arguments:] + 106 3 Foundation 0x00007fff9583f7d3 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 169 4 Foundation 0x00007fff957aea33 +[NSUndoManager(NSPrivate) _endTopLevelGroupings] + 144 5 AppKit 0x00007fff8d7ff6ab -[NSApplication run] + 596 6 libpcl_visualization.1.3.1.dylib 0x0000000103e7dbbf _ZN3pcl13visualization13PCLVisualizer8spinOnceEib + 833 7 libpcl_visualization.1.3.1.dylib 0x0000000103e9db1e _ZN3pcl13visualization11CloudViewer16CloudViewer_implclEv + 1186 8 libboost_thread-mt.dylib 0x0000000101dd1460 thread_proxy + 160 9 libsystem_c.dylib 0x00007fff932d58bf _pthread_start + 335 10 libsystem_c.dylib 0x00007fff932d8b75 thread_start + 13 ) 2011-12-21 16:44:41.147 cloud_viewer[98973:4303] *** Assertion failure in +[NSUndoManager _endTopLevelGroupings], /SourceCache/Foundation/Foundation-833.20/Misc.subproj/NSUndoManager.m:324 terminate called without an active exceptionAbort trap: 6 How can I correct this? pcd_viewer loads and displays clouds without issue. Wrong lib/runtime? Why do I see objective-c here? Thanks - Andrew |
This post was updated on .
Updates:
1. pcd_viewer uses PCLVisualizer, not CloudViewer. The following source renders the point cloud just fine: pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZRGB>()); pcl::io::loadPCDFile<pcl::PointXYZRGB>("/Users/nous/Documents/capture/cloud0.pcd", *cloud); pcl::visualization::PCLVisualizer viz; viz.addPointCloud<pcl::PointXYZRGB> (cloud);//, NULL, NULL, cloud_name.str (), viewport); viz.spin(); 2. doing a grep for CloudViewer only shows usage in openni samples. Does this suggest a dependency? Should I install open ni? 3. The web suggests this is a bug: http://root42.blogspot.com/2010/01/not-happy-with-qt-on-os-x.html 4. Should I recompile the visualizer with carbon? or X11? More coffee. |
Administrator
|
CloudViewer does not play nicely with multi-threaded applications. We will deprecate it in future releases, as it
doesn't have a maintainer. Use PCLVisualizer instead. Cheers, Radu. -- http://pointclouds.org On 12/21/2011 05:54 PM, nous wrote: > Updates: > > 1. pcd_viewer uses PCLVisualizer, not CloudViewer. The following source > renders the point cloud just fine: > > pcl::PointCloud<pcl::PointXYZRGB>::Ptr cloud(new > pcl::PointCloud<pcl::PointXYZRGB>()); > pcl::io::loadPCDFile<pcl::PointXYZRGB>("/Users/nous/Documents/capture/cloud0.pcd", > *cloud); > pcl::visualization::PCLVisualizer viz; > viz.addPointCloud<pcl::PointXYZRGB> (cloud);//, NULL, NULL, cloud_name.str > (), viewport); > viz.spin(); > > 2. doing a grep for CloudViewer only shows usage only in openni samples. > Does this suggest a depedency? Should I install open ni? > 3. At best, the web suggests this is a bug: > http://root42.blogspot.com/2010/01/not-happy-with-qt-on-os-x.html > 4. Should I recompile the visualizer with carbon? or X11? > > More coffee. > > -- > View this message in context: http://www.pcl-users.org/Cloudviewer-1-3-1-assertion-exception-NSUndoManager-tp3605577p3605660.html > Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com. > _______________________________________________ > [hidden email] / http://pointclouds.org > http://pointclouds.org/mailman/listinfo/pcl-users [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Very pleased to know I'm not crazy. Thanks for this
Might want to mention something to this affect on this page. http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer Wouldn't happen to have documentation on PCLViewer? Also - what tools are people using to move through source on osx/linux platforms? |
Administrator
|
Good point. I added this to the tutorial. Thanks for the tip!
Cheers, Radu. -- http://pointclouds.org On 12/21/2011 06:18 PM, nous wrote: > Very pleased to know I'm not crazy. Thanks for this > > Might want to mention something to this affect on this page. > http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer > > Wouldn't happen to have documentation on PCLViewer? Also - what tools are > people using to move through source on osx/linux platforms? > > -- > View this message in context: http://www.pcl-users.org/Cloudviewer-1-3-1-assertion-exception-NSUndoManager-tp3605577p3605689.html > Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com. > _______________________________________________ > [hidden email] / http://pointclouds.org > http://pointclouds.org/mailman/listinfo/pcl-users [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Thanks, but I get exactly the same errors with this example. It is some
basic problem with my Windows 7 installation or setup. I just joined [hidden email] and posted this problem, so I will wait to see if someone knows how to fix it. -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Radu B. Rusu Sent: Monday, December 26, 2011 2:27 PM To: Point Cloud Library (PCL) users Subject: Re: [PCL-users] Cloudviewer 1.3.1 assertion exception[NSUndoManager] Good point. I added this to the tutorial. Thanks for the tip! Cheers, Radu. -- http://pointclouds.org On 12/21/2011 06:18 PM, nous wrote: > Very pleased to know I'm not crazy. Thanks for this > > Might want to mention something to this affect on this page. > http://pointclouds.org/documentation/tutorials/cloud_viewer.php#cloud-viewer > > Wouldn't happen to have documentation on PCLViewer? Also - what tools are > people using to move through source on osx/linux platforms? > > -- > View this message in context: http://www.pcl-users.org/Cloudviewer-1-3-1-assertion-exception-NSUndoManager -tp3605577p3605689.html > Sent from the Point Cloud Library (PCL) Users mailing list archive at Nabble.com. > _______________________________________________ > [hidden email] / http://pointclouds.org > http://pointclouds.org/mailman/listinfo/pcl-users _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users _______________________________________________ [hidden email] / http://pointclouds.org http://pointclouds.org/mailman/listinfo/pcl-users |
Free forum by Nabble | Edit this page |