rapid
A ROS robotics library.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
icp_fitness_functions.h
Go to the documentation of this file.
1 #ifndef _RAPID_PERCEPTION_ICP_FITNESS_FUNCTIONS_H_
2 #define _RAPID_PERCEPTION_ICP_FITNESS_FUNCTIONS_H_
3 
4 #include "pcl/point_cloud.h"
5 #include "pcl/point_types.h"
6 #include "ros/ros.h"
7 
8 #include "rapid_msgs/Roi3D.h"
9 
10 namespace rapid {
11 namespace perception {
12 // Computes an alternative ICP fitness score between the scene and an object
13 // with a bounding box around it. This metric measures the distance between
14 // the
15 // scene points inside the bounding box and the nearest point on the object.
16 // This allows us to assert that there should be free space in the given
17 // bounding box.
18 //
19 // We assume that the scene, object, and ROI are all given in the same
20 // reference
21 // frame.
22 //
23 // We do not take into account the difference between free space that is
24 // visibly
25 // free or free space with unknown occupancy (in practice it may not make a
26 // difference?).
27 //
28 // Args:
29 // scene: The scene the object is in.
30 // object: The object to compute the score of.
31 // roi: The region of interest to get scene points from.
32 double ComputeIcpFitness(pcl::PointCloud<pcl::PointXYZRGB>::Ptr& scene,
33  pcl::PointCloud<pcl::PointXYZRGB>::Ptr& object,
34  const rapid_msgs::Roi3D& roi);
35 } // namespace perception
36 } // namespace rapid
37 
38 #endif // _RAPID_PERCEPTION_ICP_FITNESS_FUNCTIONS_H_
double ComputeIcpFitness(pcl::PointCloud< pcl::PointXYZRGB >::Ptr &scene, pcl::PointCloud< pcl::PointXYZRGB >::Ptr &object, const rapid_msgs::Roi3D &roi)