Posted by @Magiccofee:
Hi,
I was looking into the fleet adapter template and saw the option to leave the waypoint field blank in the config.yaml. From seeing the fleet_adapter, this seems to use
adapter.plan.compute_plan_starts
During testing, I notice that the waypoint is often not the closest and sometimes is even the furthest waypoint from the robots position.
I have tried tweaking both the max_merge_waypoint distance and max_merge_lane_distance and didnt see any imporvement.
Anybody knows how best to get reliable starting waypoints?
Thank you.
Chosen answer
Answer chosen by @Magiccofee at 2023-02-28T01:53:55Z.
Answered by @aaronchongth:
Hello @Magiccofee!
this seems to use adapter.plan.compute_plan_starts
Thanks for bringing this up, that is indeed the behavior we expect of the fleet adapter. A lower max_merge_waypoint_distance
and max_merge_lane_distance
should narrow down further which waypoint is usable as a start. I have a few suspicions, but it would be great if you could share with us your .building.yaml
file to look into recreating the issue, or if possible a minimal recreation of the scenario would be ideal too.
As a sanity check,
- are the closer waypoints (that got ignored), on the same navigation graph as the one the fleet adapter is using?
- are the lanes leading to closer waypoints (that got ignored) single directional? Which causes the planner to choose further waypoints as those are the only valid starting points for the navigation plan
- if the
max_merge_waypoint_distance
and max_merge_lane_distance
is tweaked to be less than the distance to the chosen far waypoint, does it still choose that far off waypoint instead of closer ones?
Posted by @aaronchongth:
Hello @Magiccofee!
this seems to use adapter.plan.compute_plan_starts
Thanks for bringing this up, that is indeed the behavior we expect of the fleet adapter. A lower max_merge_waypoint_distance
and max_merge_lane_distance
should narrow down further which waypoint is usable as a start. I have a few suspicions, but it would be great if you could share with us your .building.yaml
file to look into recreating the issue, or if possible a minimal recreation of the scenario would be ideal too.
As a sanity check,
- are the closer waypoints (that got ignored), on the same navigation graph as the one the fleet adapter is using?
- are the lanes leading to closer waypoints (that got ignored) single directional? Which causes the planner to choose further waypoints as those are the only valid starting points for the navigation plan
- if the
max_merge_waypoint_distance
and max_merge_lane_distance
is tweaked to be less than the distance to the chosen far waypoint, does it still choose that far off waypoint instead of closer ones?
This is the chosen answer.
Posted by @Magiccofee:
Hi @aaronchongth,
Thanks for the reply and the suggested checks. After some troubleshooting, I found that when i first initialized my robot I passed the robot local coordinates instead of rmf coordinate frame. This was causing the issue for me where no matter what value i set, it seemed to choose the same waypoint. That problem is now solved and robot can start at a nearby waypoint.
If possible, could I get some clarification about the max_merge_lane_distance
. Is this the distance from robot to the lane? I saw that the sensorbot fleet adapter in awesome adapter was using max_merge_waypoint_distance=0.5
and max_merge_lane_distance=15
. Is there a recommended way to set these values?
Thank you for the help.