This commit is contained in:
2026-01-15 10:25:40 +07:00
parent 5be1c20c80
commit 4d76ddc0c5
47 changed files with 168 additions and 168 deletions

View File

@@ -12,7 +12,7 @@
#include <vector>
#include <random>
namespace grid_map {
namespace robot_grid_map {
class GridMap;
}
@@ -48,8 +48,8 @@ extern std::mt19937 rndGenerator;
// Maximal tolerance when comparing doubles in tests.
const double maxAbsErrorValue = 1e-3;
grid_map::GridMap createMap(const grid_map::Length &length, double resolution,
const grid_map::Position &pos);
robot_grid_map::GridMap createMap(const robot_grid_map::Length &length, double resolution,
const robot_grid_map::Position &pos);
/*
* Collections of methods that modify the grid map.
@@ -64,24 +64,24 @@ grid_map::GridMap createMap(const grid_map::Length &length, double resolution,
* function.
* Each method returns a structure containing the analytical function.
*/
AnalyticalFunctions createFlatWorld(grid_map::GridMap *map);
AnalyticalFunctions createRationalFunctionWorld(grid_map::GridMap *map);
AnalyticalFunctions createSaddleWorld(grid_map::GridMap *map);
AnalyticalFunctions createSecondOrderPolyWorld(grid_map::GridMap *map);
AnalyticalFunctions createSineWorld(grid_map::GridMap *map);
AnalyticalFunctions createTanhWorld(grid_map::GridMap *map);
AnalyticalFunctions createGaussianWorld(grid_map::GridMap *map);
AnalyticalFunctions createFlatWorld(robot_grid_map::GridMap *map);
AnalyticalFunctions createRationalFunctionWorld(robot_grid_map::GridMap *map);
AnalyticalFunctions createSaddleWorld(robot_grid_map::GridMap *map);
AnalyticalFunctions createSecondOrderPolyWorld(robot_grid_map::GridMap *map);
AnalyticalFunctions createSineWorld(robot_grid_map::GridMap *map);
AnalyticalFunctions createTanhWorld(robot_grid_map::GridMap *map);
AnalyticalFunctions createGaussianWorld(robot_grid_map::GridMap *map);
/*
* Iterates over the grid map and fill it with values.
* values are calculated by evaluating analytical function.
*/
void fillGridMap(grid_map::GridMap *map, const AnalyticalFunctions &functions);
void fillGridMap(robot_grid_map::GridMap *map, const AnalyticalFunctions &functions);
/*
* Create numPoints uniformly distributed random points that lie within the grid map.
*/
std::vector<Point2D> uniformlyDitributedPointsWithinMap(const grid_map::GridMap &map,
std::vector<Point2D> uniformlyDitributedPointsWithinMap(const robot_grid_map::GridMap &map,
unsigned int numPoints);
/*
@@ -89,8 +89,8 @@ std::vector<Point2D> uniformlyDitributedPointsWithinMap(const grid_map::GridMap
* is close to the ground truth which is contained in Analytical functions structure.
* Called inside the tests. Calls macros from gtest.
*/
void verifyValuesAtQueryPointsAreClose(const grid_map::GridMap &map, const AnalyticalFunctions &trueValues,
void verifyValuesAtQueryPointsAreClose(const robot_grid_map::GridMap &map, const AnalyticalFunctions &trueValues,
const std::vector<Point2D> &queryPoints,
grid_map::InterpolationMethods interpolationMethod);
robot_grid_map::InterpolationMethods interpolationMethod);
} // namespace grid_map_test