MCPcopy Create free account
hub / github.com/Fields2Cover/Fields2Cover / main

Function main

tutorials/quick_start.cpp:11–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9#include "fields2cover.h"
10
11int main() {
12 // Import field
13 F2CField field = f2c::Parser::importFieldGml(std::string(DATA_PATH) + "test1.xml");
14 F2CRobot robot (2.0, 6.0, 0.5, 0.2);
15
16 F2CRoute cov_route = f2c::planCovRoute(robot, field, false);
17 F2CPath cov_path = f2c::planCovPath(robot, field, false);
18
19 f2c::Visualizer::figure();
20 f2c::Visualizer::plot(field.getCellsAbsPosition());
21 f2c::Visualizer::plot(cov_route);
22 f2c::Visualizer::save("cov_route_quick_start.png");
23
24 f2c::Visualizer::figure();
25 f2c::Visualizer::plot(field.getCellsAbsPosition());
26 f2c::Visualizer::plot(cov_path);
27 f2c::Visualizer::show();
28 f2c::Visualizer::save("cov_path_quick_start.png");
29
30 return 0;
31}
32
33

Callers

nothing calls this directly

Calls 3

planCovRouteFunction · 0.85
planCovPathFunction · 0.85
getCellsAbsPositionMethod · 0.80

Tested by

no test coverage detected