dissimilarity_getter.h
Go to the documentation of this file.
00001 /*
00002  * Provides a polygon dissimilarity capability thanks to the Canonical Scan
00003  * Matcher library (http://censi.mit.edu/software/csm/).
00004  *
00005  * provides dissimilarity: TRUE
00006  * provides pose: TRUE
00007  * scale invariance: FALSE
00008  * translation invariance: TRUE
00009  * rotation invariance: TRUE
00010  */
00011 
00012 #pragma once
00013 #ifndef PLACE_MATCHER_CSM_DISSIMILARITY_GETTER_H
00014 #define PLACE_MATCHER_CSM_DISSIMILARITY_GETTER_H
00015 
00016 #include <cmath> // for std::cos, sin.
00017 #include <limits>
00018 
00019 #include <ros/ros.h>
00020 #include <tf/tf.h>
00021 #include <geometry_msgs/Polygon.h>
00022 
00023 #include <place_matcher_msgs/PolygonDissimilarity.h>
00024 extern "C"
00025 {
00026 #include <csm/csm_all.h>
00027 #include <csm/icp/icp.h>
00028 #include <egsl/egsl_macros.h>
00029 // csm creates max macro that causes issues with std::numeric_limits<>::max.
00030 #undef min
00031 #undef max
00032 // csm/sm/lib/json-c/json_object.h defines FALSE and TRUE.
00033 #undef FALSE
00034 #undef TRUE
00035 }
00036 
00037 namespace place_matcher_csm
00038 {
00039 
00040 class DissimilarityGetter
00041 {
00042   public :
00043 
00044     DissimilarityGetter(ros::NodeHandle& nh_private);
00045 
00046     bool getDissimilarity(place_matcher_msgs::PolygonDissimilarityRequest& req, place_matcher_msgs::PolygonDissimilarityResponse& res);
00047 
00048   private :
00049 
00050     // ROS parameters (on top of those for the csm algorithm).
00051     int optimization_count_; 
00052 
00053 
00054 
00055 
00056     // Internals.
00057     void initParams();
00058 
00059     ros::NodeHandle nh_private_;
00060     sm_params csm_input_;
00061 };
00062 
00063 } /* mamespace place_matcher_csm */
00064 
00065 #endif /* PLACE_MATCHER_CSM_DISSIMILARITY_GETTER_H */
00066 


place_matcher_csm
Author(s): Gaƫl Ecorchard
autogenerated on Sat Jun 8 2019 19:52:59