MCPcopy Create free account
hub / github.com/KumarRobotics/sloam / CylinderTest

Class CylinderTest

sloam/src/tests/cylinder_test.cpp:18–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using ::testing::UnitTest;
17
18class CylinderTest : public ::testing::Test
19{
20protected:
21 void SetUp() override
22 {
23 setupParams();
24 PointT pta, ptb, ptc, ptd;
25 pta.x = 0; pta.y = 0; pta.z = 0;
26 ptb.x = 0; ptb.y = 1; ptb.z = 0;
27 ptc.x = 1; ptc.y = 0; ptc.z = 0;
28 ptd.x = 1; ptd.y = 1; ptd.z = 0;
29 VectorType gfeatures{pta, ptb, ptc, ptd};
30 plane = boost::make_shared<Plane>(gfeatures, params);
31
32 std::ifstream ifs("/opt/sloam_ws/src/sloam/src/tests/aux/still_landmarks_t0");
33 boost::archive::text_iarchive ia(ifs);
34 // read class state from archive
35 ia >> landmarks;
36 }
37
38 void setupParams()
39 {
40
41 params.scansPerSweep = 1;
42 params.maxLidarDist = 30.0;
43 params.maxGroundLidarDist = 30.0;
44 params.minGroundLidarDist = 0.0;
45
46 params.groundRadiiBins = 1;
47 params.groundThetaBins = 1;
48 params.groundMatchThresh = 2.0;
49 params.groundRetainThresh = 0.1;
50
51 params.maxTreeRadius = 0.3;
52 params.maxAxisTheta = 10;
53 params.maxFocusOutlierDistance = 0.5;
54 params.roughTreeMatchThresh = 3.0;
55 params.treeMatchThresh = 1.0;
56
57 params.AddNewTreeThreshDist = 2.0;
58
59 params.featuresPerTree = 2;
60 params.numGroundFeatures = 3;
61 params.defaultTreeRadius = 0.1;
62 }
63
64 std::vector<std::vector<TreeVertex>> landmarks;
65 FeatureModelParams params;
66 boost::shared_ptr<Plane> plane;
67};
68
69TEST_F(CylinderTest, Initalizes)
70{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected