#include <costmap_2d/costmap_2d.h>#include <costmap_2d/observation_buffer.h>#include <set>#include <gtest/gtest.h>#include <tf/transform_listener.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, testResetForStaticMap) | |
| TEST (costmap, testCostFunctionCorrectness) | |
| TEST (costmap, testWaveInterference) | |
| TEST (costmap, testWindowCopy) | |
| TEST (costmap, testFullyContainedStaticMapUpdate) | |
| TEST (costmap, testOverlapStaticMapUpdate) | |
| TEST (costmap, testRaytracing) | |
| TEST (costmap, testAdjacentToObstacleCanStillMove) | |
| TEST (costmap, testInflationShouldNotCreateUnknowns) | |
| TEST (costmap, testStaticMap) | |
| TEST (costmap, testDynamicObstacles) | |
| TEST (costmap, testMultipleAdditions) | |
| TEST (costmap, testZThreshold) | |
| TEST (costmap, testInflation) | |
| TEST (costmap, testInflation2) | |
| TEST (costmap, testInflation3) | |
| TEST (costmap, testRaytracing2) | |
| TEST (costmap, testTrickyPropagation) | |
| 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 79 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 532 of file module_tests.cpp.
| int main | ( | int | argc, |
| char ** | argv | ||
| ) |
Definition at line 1162 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 253 of file module_tests.cpp.
| const double RAYTRACE_RANGE | ( | 20. | 0 | ) |
| const double RESOLUTION | ( | 1 | ) |
| const double ROBOT_RADIUS | ( | 1. | 0 | ) |
| TEST | ( | costmap | , |
| testResetForStaticMap | |||
| ) |
Tests the reset method
Definition at line 91 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testCostFunctionCorrectness | |||
| ) |
Test for the cost function correctness with a larger range and different values
Definition at line 187 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testWaveInterference | |||
| ) |
Test for wave interference
Definition at line 268 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testWindowCopy | |||
| ) |
Test for copying a window of a costmap
Definition at line 315 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testFullyContainedStaticMapUpdate | |||
| ) |
Definition at line 358 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testOverlapStaticMapUpdate | |||
| ) |
Definition at line 374 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testRaytracing | |||
| ) |
Test for ray tracing free space
Definition at line 430 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testAdjacentToObstacleCanStillMove | |||
| ) |
Definition at line 466 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testInflationShouldNotCreateUnknowns | |||
| ) |
Definition at line 494 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testStaticMap | |||
| ) |
Definition at line 538 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testDynamicObstacles | |||
| ) |
Verify that dynamic obstacles are added
Definition at line 609 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 655 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testZThreshold | |||
| ) |
Make sure we ignore points outside of our z threshold
Definition at line 692 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testInflation | |||
| ) |
Test inflation for both static and dynamic obstacles
Definition at line 734 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 876 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testInflation3 | |||
| ) |
Test inflation behavior, starting with an empty map
Definition at line 911 of file module_tests.cpp.
| TEST | ( | costmap | , |
| testRaytracing2 | |||
| ) |
Test for ray tracing free space
Definition at line 993 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 1055 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 526 of file module_tests.cpp.
| std::vector<unsigned char> EMPTY_100_BY_100 |
Definition at line 67 of file module_tests.cpp.
| std::vector<unsigned char> EMPTY_10_BY_10 |
Definition at line 66 of file module_tests.cpp.
| std::vector<unsigned char> MAP_10_BY_10 |
Definition at line 65 of file module_tests.cpp.
| const unsigned char MAP_10_BY_10_CHAR[] |
Definition at line 43 of file module_tests.cpp.
| std::vector<unsigned char> MAP_5_BY_5 |
Definition at line 64 of file module_tests.cpp.
| const unsigned char MAP_5_BY_5_CHAR[] |
Definition at line 56 of file module_tests.cpp.