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
00047 class MRPTDLLIMPEXP CSimplePointsMap : public CPointsMap
00048 {
00049
00050 DEFINE_SERIALIZABLE( CSimplePointsMap )
00051 public:
00052
00055 virtual ~CSimplePointsMap();
00056
00059 CSimplePointsMap();
00060
00063 void copyFrom(const CPointsMap &obj);
00064
00074 void loadFromRangeScan(
00075 const CObservation2DRangeScan &rangeScan,
00076 const CPose3D *robotPose = NULL );
00077
00081 bool load2D_from_text_file(std::string file);
00082
00086 bool load3D_from_text_file(std::string file);
00087
00090 void clear();
00091
00102 void fuseWith( CPointsMap *otherMap,
00103 float minDistForFuse = 0.02f,
00104 std::vector<bool> *notFusedPoints = NULL);
00105
00111 void insertAnotherMap(
00112 CPointsMap *otherMap,
00113 CPose2D otherPose);
00114
00118 void setPoint(const size_t &index,CPoint2D &p);
00119
00123 void setPoint(const size_t &index,CPoint3D &p);
00124
00128 void setPoint(const size_t &index,float x, float y);
00129
00133 void setPoint(const size_t &index,float x, float y, float z);
00134
00137 void insertPoint( float x, float y, float z = 0 );
00138
00141 void insertPoint( CPoint3D p );
00142
00147 void applyDeletionMask( std::vector<bool> &mask );
00148
00156 bool insertObservation( const CObservation *obs, const CPose3D *robotPose = NULL );
00157
00170 double computeObservationLikelihood( const CObservation *obs, const CPose3D &takenFrom );
00171
00175 void auxParticleFilterCleanUp();
00176
00181 void reserve(size_t newLength);
00182 };
00183
00184 }
00185 }
00186
00187 #endif