#include <costmap_2d/costmap_2d.h>
#include <costmap_2d/observation_buffer.h>
#include <set>
#include <gtest/gtest.h>
Go to the source code of this file.
Functions | |
bool | find (const std::vector< unsigned int > &l, unsigned int n) |
const unsigned int | GRID_HEIGHT (10) |
const unsigned int | GRID_WIDTH (10) |
void | indexToWorld (Costmap2D &map, unsigned int index, double &wx, double &wy) |
int | main (int argc, char **argv) |
const double | MAX_Z (1.0) |
const double | OBSTACLE_RANGE (20.0) |
char | printableCost (unsigned char cost) |
const double | RAYTRACE_RANGE (20.0) |
const double | RESOLUTION (1) |
const double | ROBOT_RADIUS (1.0) |
TEST (costmap, testAdjacentToObstacleCanStillMove) | |
TEST (costmap, testCostFunctionCorrectness) | |
TEST (costmap, testDynamicObstacles) | |
TEST (costmap, testFullyContainedStaticMapUpdate) | |
TEST (costmap, testInflation) | |
TEST (costmap, testInflation2) | |
TEST (costmap, testInflation3) | |
TEST (costmap, testInflationShouldNotCreateUnknowns) | |
TEST (costmap, testMultipleAdditions) | |
TEST (costmap, testOverlapStaticMapUpdate) | |
TEST (costmap, testRaytracing) | |
TEST (costmap, testRaytracing2) | |
TEST (costmap, testResetForStaticMap) | |
TEST (costmap, testStaticMap) | |
TEST (costmap, testTrickyPropagation) | |
TEST (costmap, testWaveInterference) | |
TEST (costmap, testWindowCopy) | |
TEST (costmap, testZThreshold) | |
const unsigned char | THRESHOLD (100) |
const double | WINDOW_LENGTH (10) |
unsigned int | worldToIndex (Costmap2D &map, double wx, double wy) |
Variables | |
std::vector< unsigned char > | EMPTY_100_BY_100 |
std::vector< unsigned char > | EMPTY_10_BY_10 |
std::vector< unsigned char > | MAP_10_BY_10 |
const unsigned char | MAP_10_BY_10_CHAR [] |
std::vector< unsigned char > | MAP_5_BY_5 |
const unsigned char | MAP_5_BY_5_CHAR [] |
bool find | ( | const std::vector< unsigned int > & | l, |
unsigned int | n | ||
) |
Definition at line 78 of file module_tests.cpp.
const unsigned int GRID_HEIGHT | ( | 10 | ) |
const unsigned int GRID_WIDTH | ( | 10 | ) |
void indexToWorld | ( | Costmap2D & | map, |
unsigned int | index, | ||
double & | wx, | ||
double & | wy | ||
) |
Definition at line 531 of file module_tests.cpp.
int main | ( | int | argc, |
char ** | argv | ||
) |
Definition at line 1161 of file module_tests.cpp.
const double MAX_Z | ( | 1. | 0 | ) |
const double OBSTACLE_RANGE | ( | 20. | 0 | ) |
char printableCost | ( | unsigned char | cost | ) |
Definition at line 252 of file module_tests.cpp.
const double RAYTRACE_RANGE | ( | 20. | 0 | ) |
const double RESOLUTION | ( | 1 | ) |
const double ROBOT_RADIUS | ( | 1. | 0 | ) |
TEST | ( | costmap | , |
testAdjacentToObstacleCanStillMove | |||
) |
Definition at line 465 of file module_tests.cpp.
TEST | ( | costmap | , |
testCostFunctionCorrectness | |||
) |
Test for the cost function correctness with a larger range and different values
Definition at line 186 of file module_tests.cpp.
TEST | ( | costmap | , |
testDynamicObstacles | |||
) |
Verify that dynamic obstacles are added
Definition at line 608 of file module_tests.cpp.
TEST | ( | costmap | , |
testFullyContainedStaticMapUpdate | |||
) |
Definition at line 357 of file module_tests.cpp.
TEST | ( | costmap | , |
testInflation | |||
) |
Test inflation for both static and dynamic obstacles
Definition at line 733 of file module_tests.cpp.
TEST | ( | costmap | , |
testInflation2 | |||
) |
Test specific inflation scenario to ensure we do not set inflated obstacles to be raw obstacles.
Definition at line 875 of file module_tests.cpp.
TEST | ( | costmap | , |
testInflation3 | |||
) |
Test inflation behavior, starting with an empty map
Definition at line 910 of file module_tests.cpp.
TEST | ( | costmap | , |
testInflationShouldNotCreateUnknowns | |||
) |
Definition at line 493 of file module_tests.cpp.
TEST | ( | costmap | , |
testMultipleAdditions | |||
) |
Verify that if we add a point that is already a static obstacle we do not end up with a new ostacle
Definition at line 654 of file module_tests.cpp.
TEST | ( | costmap | , |
testOverlapStaticMapUpdate | |||
) |
Definition at line 373 of file module_tests.cpp.
TEST | ( | costmap | , |
testRaytracing | |||
) |
Test for ray tracing free space
Definition at line 429 of file module_tests.cpp.
TEST | ( | costmap | , |
testRaytracing2 | |||
) |
Test for ray tracing free space
Definition at line 992 of file module_tests.cpp.
TEST | ( | costmap | , |
testResetForStaticMap | |||
) |
Tests the reset method
Definition at line 90 of file module_tests.cpp.
TEST | ( | costmap | , |
testStaticMap | |||
) |
Definition at line 537 of file module_tests.cpp.
TEST | ( | costmap | , |
testTrickyPropagation | |||
) |
Within a certian radius of the robot, the cost map most propagate obstacles. This is to avoid a case where a hit on a far obstacle clears inscribed radius around a near one.
Definition at line 1054 of file module_tests.cpp.
TEST | ( | costmap | , |
testWaveInterference | |||
) |
Test for wave interference
Definition at line 267 of file module_tests.cpp.
TEST | ( | costmap | , |
testWindowCopy | |||
) |
Test for copying a window of a costmap
Definition at line 314 of file module_tests.cpp.
TEST | ( | costmap | , |
testZThreshold | |||
) |
Make sure we ignore points outside of our z threshold
Definition at line 691 of file module_tests.cpp.
const unsigned char THRESHOLD | ( | 100 | ) |
const double WINDOW_LENGTH | ( | 10 | ) |
unsigned int worldToIndex | ( | Costmap2D & | map, |
double | wx, | ||
double | wy | ||
) |
Definition at line 525 of file module_tests.cpp.
std::vector<unsigned char> EMPTY_100_BY_100 |
Definition at line 66 of file module_tests.cpp.
std::vector<unsigned char> EMPTY_10_BY_10 |
Definition at line 65 of file module_tests.cpp.
std::vector<unsigned char> MAP_10_BY_10 |
Definition at line 64 of file module_tests.cpp.
const unsigned char MAP_10_BY_10_CHAR[] |
Definition at line 42 of file module_tests.cpp.
std::vector<unsigned char> MAP_5_BY_5 |
Definition at line 63 of file module_tests.cpp.
const unsigned char MAP_5_BY_5_CHAR[] |
Definition at line 55 of file module_tests.cpp.