mapdetector.h 809 Bytes
Newer Older
wangdawei's avatar
wangdawei committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
#ifndef MAPDETECTOR_H
#define MAPDETECTOR_H

#include "localize_utils/utils.h"
#include "localize_utils/pcl_point_type.h"
#include <GeographicLib/LocalCartesian.hpp>
#include <pcl/octree/octree.h>
#include "poseguesser.h"

using namespace GeographicLib;
using namespace boost::filesystem;

namespace juefx{

class MapDetector
{
public:
    using Ptr = boost::shared_ptr<MapDetector>;
    MapDetector();

    void Reset();

    static MapDetector::Ptr Instance();

    void HandleMapFolder(const string& mapFolder);

    vector<string> GetCloseMap(const Vector3d &blh, float distance);
private:
    vector<string> GetMapDirs(const string& mapFolder);

    void ConfigMaps(const vector<string>& mapDirs);
private:
    vector<PoseGuesser::Ptr> poseGuesserVec_;
};

} // end of namespace

#endif // MAPDETECTOR_H