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

Method groundBasedRoot

sloam/src/objects/cylinder.cpp:41–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39}
40
41bool Cylinder::groundBasedRoot(const Plane &gplane)
42{
43 const auto &ground = gplane.model.plane;
44 float dist = (abs(ground[0] * model.root(0) + ground[1] * model.root(1) + ground[2] * model.root(2) +
45 ground[3]) /
46 ground.segment(0, 3).norm());
47
48 if (dist < 2.0)
49 {
50 const auto normal = gplane.model.plane.segment(0,3);
51 model.root = rayPlaneIntersection(gplane.model.centroid, normal, model.root, model.ray);
52 return true;
53 }
54 return false;
55}
56
57bool Cylinder::filter(const Scalar &maxTreeRadius, const Scalar &maxAxisTheta, const Plane &gplane)
58{

Callers

nothing calls this directly

Calls 1

rayPlaneIntersectionFunction · 0.85

Tested by

no test coverage detected