Quantcast

Weird behaviour of pcl::visualizer::addsphere

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Weird behaviour of pcl::visualizer::addsphere

alanwsx


Hi,

I am trying to use addSphere function to highlight some point in my point cloud. However, I can only use the addsphere with modelcoefficents. Since I want to add color to the highlighted sphere, I tried the second and third sentence:

        viewer->addSphere(cloud->points[index_in_cloud], 2, 1.0, 1.0, 0, name, 0);
        or

        viewer->addSphere(cloud.points[index_in_cloud], 2, name, 0);


Yet it threw an exception after these sentences. I tried debugging, but I could not find where the bug goes. The exception is as follows:

Exception thrown at 0x0000000000000000 in PCLTest2.exe: 0xC0000005: Access violation executing location 0x0000000000000000.

One thing I was thinking of is, when I step into addSphere(),  in the following line

(*shape_actor_map_)[id] = actor;

the actor suddenly become NULL.

I don't know whether this is related to the exception or not.

Anyone can help? Great thanks!

Shangxuan
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Weird behaviour of pcl::visualizer::addsphere

alanwsx
Fixed by switching from OpenGL2 to OpenGL. Hope PCL fix this bug soon.
Loading...