10 #include <CTraitsTest.h> 11 #include <gtest/gtest.h> 14 template class mrpt::CTraitsTest<mrpt::poses::CPosePDFGrid>;
16 TEST(CPosePDFGrid, defaultCtor)
27 pg.
setSize(0, 10.0, 0.0, 20.0, 1.0 , 0.1 );
30 TEST(CPosePDFGrid, basicOps)
33 pg.
setSize(0, 10.0, 0.0, 20.0, 1.0 , 0.02 );
36 double* ptr_val = pg.
getByPos(1.0, 2.0, 0.7);
40 double* ptr_val2 = pg.
getByPos(4.0, 7.0, -0.7);
double getXMin() const
Get info about the grid:
EXPECT_TRUE(mrpt::system::fileExists(ini_fil))
void setSize(double xMin, double xMax, double yMin, double yMax, double resolutionXY, double resolutionPhi, double phiMin=-M_PI, double phiMax=M_PI)
Changes the limits and size of the grid, erasing previous contents:
const T * getByPos(double x, double y, double phi) const
Reads the contents of a cell.
TEST(CPosePDFGrid, defaultCtor)
type_value getMeanVal() const
Returns the mean, or mathematical expectation of the probability density distribution (PDF)...
EXPECT_NEAR(out.cam_params.rightCameraPose.x, 0.1194, 0.005)
Declares a class that represents a Probability Distribution function (PDF) of a 2D pose (x...
void normalize()
Normalizes the PDF, such as all cells sum the unity.