39 double resolution_XYZ = 0.10,
82 std::vector<mrpt::math::CVectorDouble>& outSamples)
const override;
~CPose3DPDFGrid() override=default
Destructor.
void copyFrom(const CPose3DPDF &o) override
Copy operator, translating if necesary (for example, between particles and gaussian representations) ...
void drawManySamples(size_t N, std::vector< mrpt::math::CVectorDouble > &outSamples) const override
Draws a number of samples from the distribution, and saves as a list of 1x6 vectors, where each row contains a (x,y,z,yaw,pitch,roll) datum.
void drawSingleSample(CPose3D &outPart) const override
Draws a single sample from the distribution.
void changeCoordinatesReference(const CPose3D &newReferenceBase) override
This is a template class for storing a 6-dimensional grid, with components corresponding to Euler ang...
constexpr double DEG2RAD(const double x)
Degrees to radians.
void inverse(CPose3DPDF &o) const override
Returns a new PDF such as: NEW_PDF = (0,0,0) - THIS_PDF.
Classes for 2D/3D geometry representation, both of single values and probability density distribution...
std::tuple< cov_mat_t, type_value > getCovarianceAndMean() const override
Returns an estimate of the pose covariance matrix (STATE_LENxSTATE_LEN cov matrix) and the mean...
void uniformDistribution()
Assigns the same value to all the cells in the grid, so the sum 1.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
void getMean(CPose3D &mean_pose) const override
bool saveToTextFile(const std::string &dataFile) const override
Save the contents of the 3D grid in one file, as a concatenation of (X,Y) slices. ...
Lightweight 3D pose (three spatial coordinates, plus three angular coordinates).
Declares a class that represents a Probability Distribution function (PDF) of a SE(3) pose (x...
#define DEFINE_SERIALIZABLE(class_name, NS)
This declaration must be inserted in all CSerializable classes definition, within the class declarati...
Declares a class that represents a Probability Density Function (PDF) of a 3D pose (6D actually)...
void normalize()
Normalizes the PDF, such as all voxels sum the unity.
void bayesianFusion(const CPose3DPDF &p1, const CPose3DPDF &p2) override
Bayesian fusion of two pose distributions, then save the result in this object (WARNING: Currently on...
CPose3DPDFGrid(const mrpt::math::TPose3D &bb_min=mrpt::math::TPose3D(-1., -1., -1., -M_PI, -.5 *M_PI, -.5 *M_PI), const mrpt::math::TPose3D &bb_max=mrpt::math::TPose3D(1., 1., 1., M_PI,.5 *M_PI,.5 *M_PI), double resolution_XYZ=0.10, double resolution_YPR=mrpt::DEG2RAD(10.0))
Constructor: Initializes a, uniform distribution over the whole given range, given by a "rectangular"...