11 #include <gtest/gtest.h>
14 #include "../test_helpers/robot_data.hpp"
18 const clock_t begin_time = std::clock();
20 while (t < max_time_waiting) {
21 std::this_thread::sleep_for(std::chrono::milliseconds(50));
22 t = double(std::clock() - begin_time) / CLOCKS_PER_SEC;
23 if (stat(file.c_str(), &buffer) == 0) {
42 TEST(fields2cover_utils_visualizer, save_Route_and_Path) {
58 auto hl_swaths =
const_hl.generateHeadlandSwaths(
cells, 3, 3,
false);
71 for (
auto&& vs :
route.getVectorSwaths()) {
74 for (
auto&& c :
route.getConnections()) {
107 TEST(fields2cover_utils_visualizer, save_Cell) {
118 cells.addGeometry(cell1);
119 cells.addGeometry(cell2);
152 TEST(fields2cover_utils_visualizer, save_LinearRing) {
163 TEST(fields2cover_utils_visualizer, save_Point) {
171 TEST(fields2cover_utils_visualizer, save_field) {
195 TEST(fields2cover_utils_visualizer, plot_vectors) {
199 line1.addPoint( 0.0, 1.0);
200 line1.addPoint( 1.0, 1.0);
201 line1.addPoint( 1.0, 4.0);
207 lines.addGeometry(line3);
208 lines.addGeometry(line4);
224 TEST(fields2cover_utils_visualizer, save_Point_size) {