#include <chrono>
#include <cv_bridge/cv_bridge.h>
#include <grid_map_core/grid_map_core.hpp>
#include <grid_map_core/gtest_eigen.hpp>
#include <gtest/gtest.h>
#include "grid_map_cv/grid_map_cv.hpp"
Go to the source code of this file.
Functions | |
TEST (GridMapCvProcessing, changeResolution) | |
TEST (GridMapCvProcessing, changeResolutionForMovedMap) | |
TEST (GridMap, TransformRotate90) | |
TEST (GridMap, TransformRotate180) | |
TEST (GridMap, TransformRotate270) | |
TEST (GridMap, TransformRotate360) | |
TEST (GridMap, TransformRotate45) | |
TEST (GridMap, TransformTranslationXZY) | |
TEST (GridMap, TransformUnaligned) | |
TEST (GridMap, TransformComputationTime) | |
TEST | ( | GridMapCvProcessing | , |
changeResolution | |||
) |
Definition at line 19 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMapCvProcessing | , |
changeResolutionForMovedMap | |||
) |
Definition at line 40 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformRotate90 | |||
) |
We check that the marker we set in the top left corner is rotated accordingly.
Rotate by 90° counter-clockwise. +------+ |1 | | | +------------+ | | | | | | +---> |1 | | | +------------+ | | +------+
Definition at line 76 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformRotate180 | |||
) |
We check that the marker we set in the top left corner is rotated accordingly.
Rotate by 180° counter-clockwise. +------+ +------+ |1 | | | | | | | | | | | | | +---> | | | | | | | | | 1| +------+ +------+
Definition at line 120 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformRotate270 | |||
) |
We check that the marker we set in the top left corner is rotated accordingly.
Rotate by 270° counter-clockwise / 90° clockwise. +------+ |1 | | | +------------+ | | | 1| | | +---> | | | | +------------+ | | +------+
Definition at line 165 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformRotate360 | |||
) |
We check that the marker we set in the top left corner is rotated accordingly.
Rotate by 36° counter-clockwise. +------+ +------+ |1 | |1 | | | | | | | | | | | +---> | | | | | | | | | | +------+ +------+
Definition at line 211 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformRotate45 | |||
) |
map rotate by 45° transformedMap +---------------------+ +--------+ | XXX | |XXXXXXXX| | XXXXXXX | |XXXXXXXX| | XXXXXXXXXXXX | |XXXXXXXX| | XXXXXXXXXXXXXXX | |XXXXXXXX| |XXXXXXXXXXXXXXXXX |
2m |XXXXXXXX| +--—> | XXXXXXXXXXXXXXXXXX | sin(45°) * 1m + cos(45°) * 2m |XXXXXXXX| | XXXXXXXXXXXXXXXXXX| |XXXXXXXX| | XXXXXXXXXXXXXXX| = 2.121m |XXXXXXXX| | XXXXXXXXXXXXX| |XXXXXXXX| | XXXXXXXX | +-----—+ | XXX | 1m +------------------—+ 2.121m
Definition at line 265 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformTranslationXZY | |||
) |
Definition at line 291 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformUnaligned | |||
) |
Definition at line 323 of file GridMapCvProcessingTest.cpp.
TEST | ( | GridMap | , |
TransformComputationTime | |||
) |
Make sure to run this flag with optimization flags enabled. This test always succeeds.
Transforming a 2 x 2 m GridMap with a resolution of 2 cm by 45° took: avg: 1.03322ms, min: 0.946455ms, max 1.51534ms
Definition at line 348 of file GridMapCvProcessingTest.cpp.