MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / TEST

Function TEST

grid_map_sdf/test/SignedDistanceFieldTest.cpp:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16using namespace grid_map;
17
18TEST(SignedDistanceField, EmptyMap)
19{
20 GridMap map({"layer"});
21 map.setGeometry(Length(1.0, 2.0), 0.1, Position(0.0, 0.0));
22
23 SignedDistanceField sdf;
24 sdf.calculateSignedDistanceField(map, "layer", 1.0);
25 Position3 position(0.0, 0.0, 0.0);
26
27 EXPECT_NO_THROW(sdf.getDistanceAt(position));
28 EXPECT_NO_THROW(sdf.getInterpolatedDistanceAt(position));
29 EXPECT_NO_THROW(sdf.getDistanceGradientAt(position));
30}
31
32TEST(SignedDistanceField, GetDistanceFlat)
33{

Callers

nothing calls this directly

Calls 8

Vector3Class · 0.85
setGeometryMethod · 0.80
getDistanceAtMethod · 0.80
getDistanceGradientAtMethod · 0.80
atMethod · 0.80
getPositionMethod · 0.80

Tested by

no test coverage detected