Skip to content

NBV Planner node summary

Aaditya Saraiya edited this page Aug 12, 2018 · 1 revision

The Kinect fusion node just does surface measurement. The main aim of this part is to do the surface reconstruction using raycasting after collecting the octomap.

This summary provides a rough workflow of what the nbv_planner package aims to do.


  1. Create an NBV solver object

Details of the object constructor:

  • Advertise get_nbv service
  • octomap_client- Takes a GetOctomap service message from the /octomap_full topic and advertise the point cloud on a topic called my_unknown_point_cloud.

Note related to ROS:

  • The nh.advertiseService method is used to advertise a service at the given topic. Also requires the pointer to the service method and the this pointer.

  • nh.advertise- Publish messages of a particular type on one topic with the given frequency,

Note related to Kinect Fusion:

  • Normal maps are used in conjuction with lower polygon models in order to showcase details such as bumps which could have been showcased easier with higher polygon models.

all_ray_pub and hit_ray_pub are topics which give information about which rays have hit and which rays havent. The information is provided in form of visualization_msgs::Marker messages


  1. get_nbv service

+Call the getOctomap service +Extract the color octree +Create an a new octree and find a list of all the unknown leaves from this tree which corresponds to unknown voxels. +Convert these unknown points from octomaps vector 3’s to PCL points and then to ROS messages. +Publish this updated point cloud using the publisher which was created before. Use this point cloud and generate multiple new views near this volume.

a) Generation of multiple new views (Randomly distribute poses facing the volume)

  • Generate random number for X, Y and Z between a certain range termed as the minimum and the maximum bound.
  • Pose list also contains the orientations. So we find random angle, elevations and distance (offset) to find different poses.

b) Raycasting

  • Clear hit ray line and ray line
  • Evaluate the fitness of the candidate poses.
  • Number of rays sent is prediced by the ray count. More the rays sent, more the accuracy (Generate evenly distributed array of rays).
  • Count hits to unoccupied spaces which are not occluded by occupied spaces
  • It will be taken up if 1) Voxel occludes free space only 2) Voxel is nearer to the occupied space 3) Sent these as candidate poses

Extracted octomap -> Point cloud -> For this volume, find randomly distributed poses facing the volume