Functions | Variables
module_tests.cpp File Reference
#include <costmap_2d/costmap_2d.h>
#include <costmap_2d/observation_buffer.h>
#include <set>
#include <gtest/gtest.h>
Include dependency graph for module_tests.cpp:

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 []
 

Function Documentation

◆ find()

bool find ( const std::vector< unsigned int > &  l,
unsigned int  n 
)

Definition at line 78 of file module_tests.cpp.

◆ GRID_HEIGHT()

const unsigned int GRID_HEIGHT ( 10  )

◆ GRID_WIDTH()

const unsigned int GRID_WIDTH ( 10  )

◆ indexToWorld()

void indexToWorld ( Costmap2D map,
unsigned int  index,
double &  wx,
double &  wy 
)

Definition at line 531 of file module_tests.cpp.

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 1161 of file module_tests.cpp.

◆ MAX_Z()

const double MAX_Z ( 1.  0)

◆ OBSTACLE_RANGE()

const double OBSTACLE_RANGE ( 20.  0)

◆ printableCost()

char printableCost ( unsigned char  cost)

Definition at line 252 of file module_tests.cpp.

◆ RAYTRACE_RANGE()

const double RAYTRACE_RANGE ( 20.  0)

◆ RESOLUTION()

const double RESOLUTION ( )

◆ ROBOT_RADIUS()

const double ROBOT_RADIUS ( 1.  0)

◆ TEST() [1/18]

TEST ( costmap  ,
testAdjacentToObstacleCanStillMove   
)

Definition at line 465 of file module_tests.cpp.

◆ TEST() [2/18]

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() [3/18]

TEST ( costmap  ,
testDynamicObstacles   
)

Verify that dynamic obstacles are added

Definition at line 608 of file module_tests.cpp.

◆ TEST() [4/18]

TEST ( costmap  ,
testFullyContainedStaticMapUpdate   
)

Definition at line 357 of file module_tests.cpp.

◆ TEST() [5/18]

TEST ( costmap  ,
testInflation   
)

Test inflation for both static and dynamic obstacles

Definition at line 733 of file module_tests.cpp.

◆ TEST() [6/18]

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() [7/18]

TEST ( costmap  ,
testInflation3   
)

Test inflation behavior, starting with an empty map

Definition at line 910 of file module_tests.cpp.

◆ TEST() [8/18]

TEST ( costmap  ,
testInflationShouldNotCreateUnknowns   
)

Definition at line 493 of file module_tests.cpp.

◆ TEST() [9/18]

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() [10/18]

TEST ( costmap  ,
testOverlapStaticMapUpdate   
)

Definition at line 373 of file module_tests.cpp.

◆ TEST() [11/18]

TEST ( costmap  ,
testRaytracing   
)

Test for ray tracing free space

Definition at line 429 of file module_tests.cpp.

◆ TEST() [12/18]

TEST ( costmap  ,
testRaytracing2   
)

Test for ray tracing free space

Definition at line 992 of file module_tests.cpp.

◆ TEST() [13/18]

TEST ( costmap  ,
testResetForStaticMap   
)

Tests the reset method

Definition at line 90 of file module_tests.cpp.

◆ TEST() [14/18]

TEST ( costmap  ,
testStaticMap   
)

Definition at line 537 of file module_tests.cpp.

◆ TEST() [15/18]

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() [16/18]

TEST ( costmap  ,
testWaveInterference   
)

Test for wave interference

Definition at line 267 of file module_tests.cpp.

◆ TEST() [17/18]

TEST ( costmap  ,
testWindowCopy   
)

Test for copying a window of a costmap

Definition at line 314 of file module_tests.cpp.

◆ TEST() [18/18]

TEST ( costmap  ,
testZThreshold   
)

Make sure we ignore points outside of our z threshold

Definition at line 691 of file module_tests.cpp.

◆ THRESHOLD()

const unsigned char THRESHOLD ( 100  )

◆ WINDOW_LENGTH()

const double WINDOW_LENGTH ( 10  )

◆ worldToIndex()

unsigned int worldToIndex ( Costmap2D map,
double  wx,
double  wy 
)

Definition at line 525 of file module_tests.cpp.

Variable Documentation

◆ EMPTY_100_BY_100

std::vector<unsigned char> EMPTY_100_BY_100

Definition at line 66 of file module_tests.cpp.

◆ EMPTY_10_BY_10

std::vector<unsigned char> EMPTY_10_BY_10

Definition at line 65 of file module_tests.cpp.

◆ MAP_10_BY_10

std::vector<unsigned char> MAP_10_BY_10

Definition at line 64 of file module_tests.cpp.

◆ MAP_10_BY_10_CHAR

const unsigned char MAP_10_BY_10_CHAR[]
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 200, 200, 200,
0, 0, 0, 0, 100, 0, 0, 200, 200, 200,
0, 0, 0, 0, 100, 0, 0, 200, 200, 200,
70, 70, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 200, 200, 200, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 255, 255, 255,
0, 0, 0, 0, 0, 0, 0, 255, 255, 255
}

Definition at line 42 of file module_tests.cpp.

◆ MAP_5_BY_5

std::vector<unsigned char> MAP_5_BY_5

Definition at line 63 of file module_tests.cpp.

◆ MAP_5_BY_5_CHAR

const unsigned char MAP_5_BY_5_CHAR[]
Initial value:
= {
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
0, 0, 0, 0, 0,
}

Definition at line 55 of file module_tests.cpp.



costmap_2d
Author(s): Eitan Marder-Eppstein, David V. Lu!!, Dave Hershberger, contradict@gmail.com
autogenerated on Mon Mar 6 2023 03:50:17