0
$\begingroup$

Rosanswers logo

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-


Originally posted by Kadir Firat Uyanik on ROS Answers with karma: 288 on 2011-02-16

Post score: 1


Original comments

Comment by dejanpan on 2011-02-17:
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.

Comment by chinmay_sujir on 2023-01-11:
The above link doesn't work. Any chance you still have this somewhere?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

It is very likely that rviz chokes up because of the amount of markers. I think each arrow is a separate 3D object. I would recommend using the pcl visualization tool:

http://www.ros.org/wiki/pcl_visualization

You can use the existing PointNormal data type, defined here:

http://www.ros.org/doc/api/pcl/html/point__types_8h_source.html

Since you already have the algorithm to calculate the normals, all you have to do is build a pcl cloud and fill out the fields. Here's the nice part about using pcl - you can set how many normals you want to display - for example, one every 10 or 20 points. This should make it much quicker.


Originally posted by Ivan Dryanovski with karma: 4954 on 2011-02-16

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.