Is it possible that the travel estimator is way slower than the robot and forces a replan inside RMF traffic.
If the new path is being triggered by a replan request, the standard log will indicate that a replan was requested and it will also specify the reason. If you can provide the log entries that mention the replan, then I should be able to give you an exact reason that it’s happening.
RMF always gives the exact same "green path"to Nav2. This path is a 80 meter long path with many WPs. The new “u-turn” path is always much shorter and always in the same region. Typically a few waypoints behind the robot’s current position.
I’m not totally sure if I’m following your description and the illustration correctly. Are you saying that the new “follow path request” coming from Open-RMF is the red line, outlined in a blue below, and that the newly request path starts 5 waypoints behind the robot’s actual location, like the blue arrows that I’ve drawn on top of the red path below?
If that’s what you’re observing then somewhere in the pipeline there’s a significant error with how the robot’s location is being updated.
Fleet adapter is custom
I’ll need to know more about what kind of customization you’ve done and which specific APIs you’re using. In particular are you using the RobotCommandHandle API or the EasyFullControl API? If you’re primarily using humble packages then EasyFullControl wasn’t available when those versions were released, but the current main branch of rmf_ros2 is still compatible with ROS humble, so you could still use EasyFullControl if you build the main branch from the source code.
Isnt RMF already filtering out the waypoints that have already passed when it sends a new path?
Not necessarily.
- If you use the
RobotCommandHandle API then nothing is filtered: You get the whole path computed by the planner which will start from whatever location the planner believed the robot was at when it started to compute the plan.
- If you use
EasyFullControl, then it will do some filtering to weed out parts of the path that the robot has already passed. It’s a little bit like pure pursuit, but not exactly the same. This usually helps cuts down on extraneous motions for regular AMRs, but it was not made with the constraints of a tugging robot in mind.
AFAIK, there is insufficient context to do this in the fleet adapter. Only possible location seems in the fleet_client, also to filter WPs like you suggested
Just to make sure we’re on the same page, when I talk about the “fleet adapter” I’m generally talking about the part of your system integration code that directly interacts with the rmf_fleet_adapter library. In a case like yours where it’s extremely important that the robot NEVER backtracks, I would probably put the following state machine into my fleet adapter code:
Essentially each time a new follow_new_path comes in, you should check if your robot is currently stopped. If it’s not then ignore the latest plan, ask your robot to stop, after it’s stopped update the position, and then use replan. This will ensure that the path planned for your robot is always beginning from the most accurate initial location.
To be very blunt, the current implementation of Open-RMF’s traffic planning system has never taken into consideration robots that are critically unable to turn around and go backwards. Integrating that kind of robot with Open-RMF is a bit like trying to fit a circular peg in a square hole. The traffic planner is ignorant about this constraint that you have, and there’s a significant risk that it will produce plans which are not feasible for your robot.
This risk is especially significant if you have any bi-directional lanes. If a robot’s task gets cancelled while it’s tugging a payload down a bi-directional lane, there’s a risk that Open-RMF will decide the robot needs to immediately turn around and go back in the direction that it had been coming from, e.g. to park or to charge. You’ll need to make sure that your robots can safely do a u-turn in any area where you’ve put a bi-directional lane.
With enough workarounds, the current traffic system could probably work well enough for a pilot project that involves tugging payloads, but I wouldn’t recommend putting it into a business-critical deployment without a considerable amount of testing and evaluation first. This is not use case that we’ve targeted before, so I can’t offer much assurance about how effective it will be.