9 #ifndef CPose3DPDFParticles_H
10 #define CPose3DPDFParticles_H
45 CPose3DPDFParticles(
size_t M = 1 );
49 inline CPose3DPDFParticles( const CPose3DPDFParticles& obj ) :
51 CParticleFilterData<CPose3D>()
58 virtual ~CPose3DPDFParticles();
63 void copyFrom(
const CPose3DPDF &o);
70 void resetDeterministic(
const CPose3D &location,
71 size_t particlesCount = 0);
76 void getMean(CPose3D &mean_pose)
const;
85 CPose3D getParticlePose(
int i)
const;
93 size_t size()
const {
return m_particles.size(); }
98 void changeCoordinatesReference(
const CPose3D &newReferenceBase );
102 void drawSingleSample( CPose3D &outPart )
const;
106 void drawManySamples(
size_t N, std::vector<mrpt::math::CVectorDouble> & outSamples )
const;
114 void append( CPose3DPDFParticles &o );
118 void inverse(CPose3DPDF &o)
const;
122 CPose3D getMostLikelyParticle()
const;
126 void bayesianFusion(
const CPose3DPDF &p1,
const CPose3DPDF &p2 );
void saveToTextFile(const std::string &file, mrpt::math::TMatrixTextFileFormat fileFormat=mrpt::math::MATRIX_FORMAT_ENG, bool appendMRPTHeader=false, const std::string &userHeader=std::string()) const
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classe...
A numeric matrix of compile-time fixed size.
Eigen::Matrix< typename MATRIX::Scalar, MATRIX::ColsAtCompileTime, MATRIX::ColsAtCompileTime > cov(const MATRIX &v)
Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample...
std::vector< T1 > & operator+=(std::vector< T1 > &a, const std::vector< T2 > &b)
a+=b (element-wise sum)
Eigen::Matrix< dataType, 4, 4 > inverse(Eigen::Matrix< dataType, 4, 4 > &pose)
#define DEFINE_SERIALIZABLE_PRE_CUSTOM_BASE(class_name, base_name)
This declaration must be inserted in all CSerializable classes definition, before the class declarati...
size_t size() const
Get the m_particles count (equivalent to "particlesCount")
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
#define DEFINE_SERIALIZABLE(class_name)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
std::deque< CParticleData > CParticleList
Use this type to refer to the list of particles m_particles.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
#define DEFINE_SERIALIZABLE_POST_CUSTOM_BASE(class_name, base_name)
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
Declares a class that represents a Probability Density function (PDF) of a 3D pose.