Replies: 1 comment
-
This is an issue. I'll answer there #131 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying your library, I found that some directions may cause the path crossing inner cells (or no go zone)
is this issue going to be solved ? or I should modify the code to adapt this problem?
you can try with the following setup
`
F2CRobot robot_c (3);
F2CCells cells_c {
F2CCell(F2CLinearRing({
F2CPoint(0,0), F2CPoint(50,0),F2CPoint(50,50),F2CPoint(0,50), F2CPoint(0,0)
}))
};
cells_c.addRing(0, F2CLinearRing({
F2CPoint(10,10), F2CPoint(10,25),F2CPoint(15,25),F2CPoint(15,10),F2CPoint(10,10)
}));
cells_c.addRing(0, F2CLinearRing({
F2CPoint(20,20), F2CPoint(20,25),F2CPoint(25,25),F2CPoint(25,20),F2CPoint(20,20)
}));
f2c::hg::ConstHL const_hl;
//F2CCells mid_hl_c = const_hl.generateHeadlands(cells_c, 1 * robot_c.getWidth());
F2CCells no_hl_c = const_hl.generateHeadlands(cells_c, 1.0 * robot_c.getWidth());
f2c::Visualizer::figure();
f2c::Visualizer::plot(cells_c);
f2c::Visualizer::plot(no_hl_c);
f2c::Visualizer::xlim(-5,65);
f2c::Visualizer::ylim(-5,65);
f2c::Visualizer::save("Tutorial_5_0_field.png");
std::cout << robot_c.getWidth() << std::endl;
std::cout << robot_c.getCovWidth() << std::endl;
f2c::sg::BruteForce bf;
F2CSwathsByCells swaths_c = bf.generateSwaths(M_PI/3.0, 1.5* robot_c.getWidth(), no_hl_c);
f2c::rp::RoutePlannerBase route_planner;
F2CRoute route = route_planner.genRoute(no_hl_c, swaths_c);
f2c::Visualizer::figure();
f2c::Visualizer::plot(cells_c);
f2c::Visualizer::plot(no_hl_c);
f2c::Visualizer::plot(route);
// f2c::Visualizer::plot(swaths_c);
f2c::Visualizer::xlim(-5,65);
f2c::Visualizer::ylim(-5,65);
f2c::Visualizer::save("Tutorial_5_0_route.png");
`
Beta Was this translation helpful? Give feedback.
All reactions