12 #include <gtest/gtest.h> 16 const double map2_x_off,
17 const double map2_tim_off,
18 const size_t expected_m1_count,
19 const size_t expected_m2_count
22 const double pts1[8][3] = {
39 for (
size_t i = 0; i<
sizeof(pts1) /
sizeof(pts1[0]); i++) map1.
insertPoint(pts1[i][0], pts1[i][1], pts1[i][2]);
40 for (
size_t i = 0; i <
sizeof(pts1) /
sizeof(pts1[0]); i++)
52 std::vector<bool> deletion_mask;
55 pc_filter.
filter(&map1, pts1_tim, pts1_pose, &extra_params);
56 EXPECT_EQ(map1.
size(), expected_m1_count);
58 pc_filter.
filter(&map2, pts2_tim, pts2_pose, &extra_params);
59 EXPECT_EQ(map2.
size(), expected_m2_count);
62 TEST(CPointCloudFilterByDistance, noOutliers)
66 TEST(CPointCloudFilterByDistance, withOutliers)
70 TEST(CPointCloudFilterByDistance, tooOldMap)
uint64_t TTimeStamp
A system independent time type, it holds the the number of 100-nanosecond intervals since January 1...
mrpt::system::TTimeStamp now()
A shortcut for system::getCurrentTime.
A cloud of points in 2D or 3D, which can be built from a sequence of laser scans. ...
void insertPoint(float x, float y, float z=0)
Provides a way to insert (append) individual points into the map: the missing fields of child classes...
void run_pc_filter_test(const double map2_x_off, const double map2_tim_off, const size_t expected_m1_count, const size_t expected_m2_count)
TEST(CPointCloudFilterByDistance, noOutliers)
void inverseComposePoint(const double gx, const double gy, const double gz, double &lx, double &ly, double &lz, mrpt::math::CMatrixFixedNumeric< double, 3, 3 > *out_jacobian_df_dpoint=NULL, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dpose=NULL, mrpt::math::CMatrixFixedNumeric< double, 3, 6 > *out_jacobian_df_dse3=NULL) const
Computes the 3D point L such as .
void filter(mrpt::maps::CPointsMap *inout_pointcloud, const mrpt::system::TTimeStamp pc_timestamp, const mrpt::poses::CPose3D &pc_reference_pose, TExtraFilterParams *params=nullptr) MRPT_OVERRIDE
Apply the filtering algorithm to the pointcloud.
A class used to store a 3D pose (a 3D translation + a rotation in 3D).
Implementation of pointcloud filtering based on requisities for minimum neigbouring points in both...
mrpt::system::TTimeStamp BASE_IMPEXP timestampAdd(const mrpt::system::TTimeStamp tim, const double num_seconds)
Shifts a timestamp the given amount of seconds (>0: forwards in time, <0: backwards) ...
size_t size() const
Returns the number of stored points in the map.