40 #include <gtest/gtest.h> 74 TEST(costmap, testRaytracing){
91 ASSERT_EQ(lethal_count, 21);
97 TEST(costmap, testRaytracing2){
114 ASSERT_EQ(obs_before, 20);
129 ASSERT_EQ(obs_after, obs_before + 1);
145 ASSERT_EQ(with_static, obs_after);
153 TEST(costmap, testWaveInterference){
204 TEST(costmap, testDynamicObstacles){
230 TEST(costmap, testMultipleAdditions){
248 int main(
int argc,
char** argv){
250 testing::InitGoogleTest(&argc, argv);
251 return RUN_ALL_TESTS();
void setCost(unsigned int mx, unsigned int my, unsigned char cost)
Set the cost of a cell in the costmap.
unsigned int countValues(costmap_2d::Costmap2D &costmap, unsigned char value, bool equal=true)
void resizeMap(unsigned int size_x, unsigned int size_y, double resolution, double origin_x, double origin_y, bool size_locked=false)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
costmap_2d::ObstacleLayer * addObstacleLayer(costmap_2d::LayeredCostmap &layers, tf::TransformListener &tf)
void addStaticLayer(costmap_2d::LayeredCostmap &layers, tf::TransformListener &tf)
static const unsigned char FREE_SPACE
TEST(costmap, testRaytracing)
unsigned int getSizeInCellsY() const
Accessor for the y size of the costmap in cells.
static const unsigned char LETHAL_OBSTACLE
static const unsigned char NO_INFORMATION
void addObservation(costmap_2d::ObstacleLayer *olayer, double x, double y, double z=0.0, double ox=0.0, double oy=0.0, double oz=MAX_Z)
A 2D costmap provides a mapping between points in the world and their associated "costs".
Instantiates different layer plugins and aggregates them into one score.
void updateMap(double robot_x, double robot_y, double robot_yaw)
Update the underlying costmap with new data. If you want to update the map outside of the update loop...
int main(int argc, char **argv)