You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Proper full workflow example for complex field geometries #208
The advanced route planners (Boustrophedon, snake, spiral) and path planner only deal in single cell swaths (not SwathsByCell) generated by the above example, whereas the base route planner will use the entire field geometry. Therefore, it seems impossible to use the advanced sorting features on fields with complex geometries (holes).
Am I missing part of the workflow, or is this a missing feature?
Hi @yuri-rage, welcome to the project. Thank you for pointing this out, because it's true that it's not in the documentation and should be fixed.
First, Boustrophedon, snake, spiral are not advanced route planners. They are patterns and they only work in convex cells. That's why we can only use them on F2CSwaths and not F2CSwathsByCell. To use an advanced route planner, we need a metaheuristic. Something like:
Thank you for the quick feedback. You've done a good job differentiating the planning stages with use of specific terminology, which I admit I confused slightly. Just to confirm:
There is no existing workflow that would allow for the use of pattern sorting (Boustrophedon/snake/spiral) on geometries containing more than one cell (specifically, a cell with "holes" created by fully contained inner geometries).
Let me explain the problem. Imagine that we have a square field with a square inner obstacle in the middle. We decide to split the field into 4 cells: left, top, bottom, and right. We want to do boustrophedon, and we start at the first swath of the field, in the left side, covering to the right. The problem is that once we found the obstacle, we have to decide to cover the top or the bottom cell. Imagine that we go for the top cell, and then we follow the right direction to the right cell... The bottom cell is uncovered, and we have to go back breaking the pattern. With the snake pattern is even more difficult.
Just to chip in, you need to plan the path to move between cells by yourself. In my project, I get the ordered swaths from F2C without using the path planner. And use Nav2 separately to connect them.
F2C's path planner assume there exists simple paths that connect swaths and they all naturally lie in the headland so there is no collision. This assumption breaks if you have cell with holes
In my project, I get the ordered swaths from F2C without using the path planner. And use Nav2 separately to connect them.
Hi @lyfkyle, would be awesome to have something similar directly on Fields2Cover. Do you think it could be implemented without Nav2?
F2C's path planner assume there exists simple paths that connect swaths and they all naturally lie in the headland so there is no collision. This assumption breaks if you have cell with holes.
Not really. The route planner is able to create a route that do not cross through the field borders or the holes. The problem is a simplification step in the path planner, to smooth the path. That's why you may see some crossing.
Hi @lyfkyle, would be awesome to have something similar directly on Fields2Cover. Do you think it could be implemented without Nav2?
For sure, A simple A* should suffice. But sadly I do not have bandwidth to contribute in the short term.
Not really. The route planner is able to create a route that do not cross through the field borders or the holes. The problem is a simplification step in the path planner, to smooth the path. That's why you may see some crossing.
Oh, that's interesting. I am not aware of the path simplification step. In my previous test the path passes through the center cell (which is an obstacle in my case) that's why I switch to use Nav2.
For my case, I think I will plan separate field objects whose sides intersect the obstacle cells. This results in a very clean path generated by F2C, whether sorting is employed or the route planner is used. So I can still avoid obstacles, I just have multiple plans, and as @lyfkyle says, manually plan the transition between. I can live with this as a near-term (and possibly permanent) solution, but it would be nice to have a more robust workflow overall.
I also encountered the problem of routes crossing the map. It should be caused by the direct connection between two points between different partitions, but it is obviously unreasonable. How can we not realize the navigation connection between partitions based on Costmap?
Hi @Gonzalo-Mier, forgive me if this is not the right place to write it, but I think I may have a related issue:
what you are seeing here above are routes and swaths only. As you can see, there is a diagonal route that is crossing through 2 obstacles, that's my problem.
I am using SG_BruteForce for swaths generation, RP_Boustrophedon to sort the swaths, and RP_RoutePlannerBase to plan the route
Following the full area which shows swaths and path. As you can see, again, multiple glue routes are crossing the obstacles. Same setup, with PP_ReedsSheppCurvesHC for path generation
Anyway, the problem it's at the route level. Any suggestion ?
Hi @ironoa, sorry for the delay. The route planner cannot find a proper solution in your cases. There is a bug here and we have to fix it. Thank you for reporting
I proceed to close this issue due to the original question is answered already. If it is not, feel free to open it again. The new bug about the route planner is moved to a new issue.
Activity
Gonzalo-Mier commentedon Jun 12, 2025
Hi @yuri-rage, welcome to the project. Thank you for pointing this out, because it's true that it's not in the documentation and should be fixed.
First, Boustrophedon, snake, spiral are not advanced route planners. They are patterns and they only work in convex cells. That's why we can only use them on
F2CSwathsand notF2CSwathsByCell. To use an advanced route planner, we need a metaheuristic. Something like:Note that we have a
F2CRouteat the end. On it, we saved the swaths (information fromF2CSwathsByCell) and their connections.Once we have the
F2CRoute, we plan the path as we would do it with theF2CSwaths:And that's all. If you have any more doubts, please ask 😄
yuri-rage commentedon Jun 13, 2025
Thank you for the quick feedback. You've done a good job differentiating the planning stages with use of specific terminology, which I admit I confused slightly. Just to confirm:
There is no existing workflow that would allow for the use of pattern sorting (Boustrophedon/snake/spiral) on geometries containing more than one cell (specifically, a cell with "holes" created by fully contained inner geometries).
Do I have that correct?
Gonzalo-Mier commentedon Jun 13, 2025
That's correct.
Let me explain the problem. Imagine that we have a square field with a square inner obstacle in the middle. We decide to split the field into 4 cells: left, top, bottom, and right. We want to do boustrophedon, and we start at the first swath of the field, in the left side, covering to the right. The problem is that once we found the obstacle, we have to decide to cover the top or the bottom cell. Imagine that we go for the top cell, and then we follow the right direction to the right cell... The bottom cell is uncovered, and we have to go back breaking the pattern. With the snake pattern is even more difficult.
lyfkyle commentedon Jun 13, 2025
Just to chip in, you need to plan the path to move between cells by yourself. In my project, I get the ordered swaths from F2C without using the path planner. And use Nav2 separately to connect them.
F2C's path planner assume there exists simple paths that connect swaths and they all naturally lie in the headland so there is no collision. This assumption breaks if you have cell with holes
Gonzalo-Mier commentedon Jun 13, 2025
Hi @lyfkyle, would be awesome to have something similar directly on Fields2Cover. Do you think it could be implemented without Nav2?
Not really. The route planner is able to create a route that do not cross through the field borders or the holes. The problem is a simplification step in the path planner, to smooth the path. That's why you may see some crossing.
lyfkyle commentedon Jun 13, 2025
For sure, A simple A* should suffice. But sadly I do not have bandwidth to contribute in the short term.
Oh, that's interesting. I am not aware of the path simplification step. In my previous test the path passes through the center cell (which is an obstacle in my case) that's why I switch to use Nav2.
Gonzalo-Mier commentedon Jun 13, 2025
Do you have any way to check that the curvature and the steering rate are not too high?
yuri-rage commentedon Jun 13, 2025
For my case, I think I will plan separate field objects whose sides intersect the obstacle cells. This results in a very clean path generated by F2C, whether sorting is employed or the route planner is used. So I can still avoid obstacles, I just have multiple plans, and as @lyfkyle says, manually plan the transition between. I can live with this as a near-term (and possibly permanent) solution, but it would be nice to have a more robust workflow overall.
For example, sectioning a field like this:

yerongguang commentedon Jun 18, 2025
I also encountered the problem of routes crossing the map. It should be caused by the direct connection between two points between different partitions, but it is obviously unreasonable. How can we not realize the navigation connection between partitions based on Costmap?
Gonzalo-Mier commentedon Jun 18, 2025
Hi @yerongguang, I don't understand your message well. Can you provide an example?
ironoa commentedon Jun 21, 2025
Hi @Gonzalo-Mier, forgive me if this is not the right place to write it, but I think I may have a related issue:
what you are seeing here above are
routesandswathsonly. As you can see, there is a diagonal route that is crossing through 2 obstacles, that's my problem.I am using
SG_BruteForcefor swaths generation,RP_Boustrophedonto sort the swaths, andRP_RoutePlannerBaseto plan the routeFollowing the full area which shows
swathsandpath. As you can see, again, multiple glueroutesare crossing the obstacles. Same setup, withPP_ReedsSheppCurvesHCfor path generationAnyway, the problem it's at the
routelevel. Any suggestion ?Gonzalo-Mier commentedon Aug 4, 2025
Hi @ironoa, sorry for the delay. The route planner cannot find a proper solution in your cases. There is a bug here and we have to fix it. Thank you for reporting
Gonzalo-Mier commentedon Aug 4, 2025
I proceed to close this issue due to the original question is answered already. If it is not, feel free to open it again. The new bug about the route planner is moved to a new issue.