addArrow problem

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

addArrow problem

anagno
This post was updated on .
Hi all,

I am not able to visualize the addArrow (http://docs.pointclouds.org/trunk/classpcl_1_1visualization_1_1_p_c_l_visualizer.html#a90e704438b073458d7b1d6ebe54a9c2d)

Is it a bug or am doing something wrong??

I am using the trunk version

Thanks in advance




test.cpp
CMakeLists.txt
Reply | Threaded
Open this post in threaded view
|

Re: addArrow problem

Sergey
Administrator
This post was updated on .
Hi anagno,

It's not that the arrow is not displayed, you just don't see it because it is painted black! The function expects RGB components as doubles in [0..1] range. So change 255 into 1.0 and you will see the arrow.

BTW, have no idea why the line is actually displayed in red. addLine also expects doubles.

Regards,
Sergey
Reply | Threaded
Open this post in threaded view
|

Re: addArrow problem

anagno
Thanks for the responce !!! It works now.

So the "bug" might be in the addline ??? The same happens also in addCube (http://docs.pointclouds.org/trunk/classpcl_1_1visualization_1_1_p_c_l_visualizer.html#aa55f97ba784826552c9584d407014c78)
Reply | Threaded
Open this post in threaded view
|

Re: addArrow problem

Sergey
Administrator
anagno,

Anyway, this is not a "bug" on the PCL side, because it actually outsources visualization tasks to VTK. If you look inside the source code (http://docs.pointclouds.org/trunk/pcl__visualizer_8hpp_source.html#l00416), you will notice that in the addLine function vtkLODActor object is used, whereas in the addArrow functions vtkLeaderActor2D object is used. Perhaps these two guys are inconsistent in terms of how they treat out-of-range data.

Cheers,
Sergey