00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef CSimplePointsMap_H
00029 #define CSimplePointsMap_H
00030
00031 #include <mrpt/slam/CPointsMap.h>
00032 #include <mrpt/slam/CObservation2DRangeScan.h>
00033 #include <mrpt/utils/CSerializable.h>
00034 #include <mrpt/math/CMatrix.h>
00035
00036 namespace mrpt
00037 {
00038 namespace slam
00039 {
00040
00041 DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE( CSimplePointsMap , CPointsMap )
00042
00043
00046 class MRPTDLLIMPEXP CSimplePointsMap : public CPointsMap
00047 {
00048
00049 DEFINE_SERIALIZABLE( CSimplePointsMap )
00050 public:
00051
00054 virtual ~CSimplePointsMap();
00055
00058 CSimplePointsMap();
00059
00062 void copyFrom(const CPointsMap &obj);
00063
00073 void loadFromRangeScan(
00074 const CObservation2DRangeScan &rangeScan,
00075 const CPose3D *robotPose = NULL );
00076
00080 bool load2D_from_text_file(std::string file);
00081
00085 bool load3D_from_text_file(std::string file);
00086
00089 void clear();
00090
00101 void fuseWith( CPointsMap *otherMap,
00102 float minDistForFuse = 0.02f,
00103 std::vector<bool> *notFusedPoints = NULL);
00104
00110 void insertAnotherMap(
00111 CPointsMap *otherMap,
00112 CPose2D otherPose);
00113
00117 void setPoint(const size_t &index,CPoint2D &p);
00118
00122 void setPoint(const size_t &index,CPoint3D &p);
00123
00127 void setPoint(const size_t &index,float x, float y);
00128
00132 void setPoint(const size_t &index,float x, float y, float z);
00133
00136 void insertPoint( float x, float y, float z = 0 );
00137
00140 void insertPoint( CPoint3D p );
00141
00146 void applyDeletionMask( std::vector<bool> &mask );
00147
00155 bool insertObservation( const CObservation *obs, const CPose3D *robotPose = NULL );
00156
00169 double computeObservationLikelihood( const CObservation *obs, const CPose3D &takenFrom );
00170
00174 void auxParticleFilterCleanUp();
00175
00180 void reserve(size_t newLength);
00181 };
00182
00183 }
00184 }
00185
00186 #endif