How to visualize surface normals as Marker::Arrow for each point in rviz?
Hi,
I would like to show the surface normals of a point cloud in rviz. Below is what I was trying:
- Create a MarkerArray and corresponding publisher
- Resize the MarkerArray with the size of the point cloud to be visualized (25344 points in this case) at the very first
- Assign frame_id, ns, id, type, action, color for each marker just once
- update position of the arrows with the point cloud at each iteration
- update markers scales with the point cloud normal data at each iteration
- publish the markerarray
Whenever it publishes the markerarray, RAM blows up and swap is heavily used and PC stalls there.
What do you think I am doing very badly wrong here? Or isn't it possible to visualize that many arrows (25344 of them) in the rviz? If so, should I use other tools coming with PCL?
Thanks a lot...
-Kadir-
Hi Kadir, we did it with MarkerArray message but it also choked up rviz a bit. You can have a look at our code here: http://code.cs.tum.edu/indefero/index.php//p/mapping/source/tree/master/pcl_cloud_tools/src/pcl_normal_visualization.cpp D.
The above link doesn't work. Any chance you still have this somewhere?