00001 #ifndef SCANMATCHERPROCESSOR_H
00002 #define SCANMATCHERPROCESSOR_H
00003
00004 #include <log/sensorlog.h>
00005 #include <sensor/sensor_range/rangesensor.h>
00006 #include <sensor/sensor_range/rangereading.h>
00007
00008 #include "scanmatcher.h"
00009
00010 namespace GMapping {
00011
00012 class ScanMatcherProcessor{
00013 public:
00014 ScanMatcherProcessor(const ScanMatcherMap& m);
00015 ScanMatcherProcessor (double xmin, double ymin, double xmax, double ymax, double delta, double patchdelta);
00016 virtual ~ScanMatcherProcessor ();
00017 virtual void processScan(const RangeReading & reading);
00018 void setSensorMap(const SensorMap& smap, std::string sensorName="FLASER");
00019 void init();
00020 void setMatchingParameters
00021 (double urange, double range, double sigma, int kernsize, double lopt, double aopt, int iterations, bool computeCovariance=false);
00022 void setRegistrationParameters(double regScore, double critScore);
00023 OrientedPoint getPose() const;
00024 inline const ScanMatcherMap& getMap() const {return m_map;}
00025 inline ScanMatcher& matcher() {return m_matcher;}
00026 inline void setmaxMove(double mmove){m_maxMove=mmove;}
00027 bool useICP;
00028 protected:
00029 ScanMatcher m_matcher;
00030 bool m_computeCovariance;
00031 bool m_first;
00032 SensorMap m_sensorMap;
00033 double m_regScore, m_critScore;
00034 unsigned int m_beams;
00035 double m_maxMove;
00036
00037 ScanMatcherMap m_map;
00038 OrientedPoint m_pose;
00039 OrientedPoint m_odoPose;
00040 int m_count;
00041
00042 };
00043
00044 };
00045
00046 #endif
00047
00048