Posted by @VigashiniDotworld:
Hello all,
I have a scenario where A is a
starting waypoint point for a conveyorA and has some custom tasks, A1 is another waypoint end of conveyorA and B is starting point for a conveyorB i have to make the robot wait at A1 if the robot is available at B. is there any way to achieve this in rmf?
Posted by @Yadunund:
It should be possible. You can define the task as a sequence of GoToPlace
→ PerformAction
phases. Once the robot goes to waypoint A1
, it will begin executing the PerformAction
phase. Then in your fleet adapter, you should implement the ActionExecutor
such that you remain idle and only declare the action complete once you’ve checked that there are no robots at B
.
How to check if there are no robots at B
:
A couple approaches come to mind depending on whether the robot at B
will be from the same fleet or a different one.
- If same fleet, you can monitor monitor the Location index (by subscribing to
/fleet_states
topic) of all robots in the fleet and compare it the index of the waypoint B
in the same navgraph. This approach should also work if it is guaranteed that all fleets use the same navgraph, else see below.
- If different fleet, subscribe to
/fleet_states
but compute displacement between each robot’s Location coordinates and the waypoint B
’s coordinates to infer if a robot is “around” B
. This is because the navgraphs across different fleets will have varying indices of waypoints even if multiple graphs define the same waypoint.
Once we implement the Reservation system, it should be a lot more straightforward to query the system to check if a waypoint is occupied or not.
Posted by @arjo129:
I’d like to add Adds a simple parking spot management system. by arjo129 · Pull Request #325 · open-rmf/rmf_ros2 · GitHub is currently in the works for current-gen RMF. I expect this to be completed soon. This should help a bit. A full reservation system which adds support for cost based optimization and has deadlock-free guarantees is also in the works for the “next-gen” RMF.
Edited by @arjo129 at 2024-02-20T03:03:34Z
Posted by @VigashiniDotworld:
Thanks for the reply