Pickup and delivery implementation (#432)

Posted by @cwrx777:

Hi,

How can the cart pickup and dropoff as shown in the video be implemented in RMF?

In my approach, I have created waypoints as shown below:


For pickup, send a go to task the robot to the pickup waypoint (e.g. name : pickup_03 with dock_name: pickup_03). When the robot has reached the waypoint before the pickup waypoint, the fleet adapter will be issued with a dock command with a dock_name. In the MiR fleet adapter, the command that is sent to MiR is a mission that contains dock and latch action. The dock action will trigger the robot to search for the cart base profile and perform docking, and the latch action will make the robot top module latch the two metal pins to the cart base One of the parameters to the dock action, is pickup_03, which is the target shelf position to dock into. (in MiR. there needs to be a shelf position named pickup_03).

And as I went through traffic-editor documentation, I noticed there is workcell and a pickup_dispenser and delivery_ingestor, and there is a sample demo to test it.

Is using pickup_dispenser and dropoff_ingestor the right approach for my scenario and how can I use them in MiR fleet adapter?

Posted by @mxgrey:

It’s possible to implement this using pickup_dispenser and dropoff_ingestor, you just need to add a node that listens for dispenser requests to trigger latching (and publishes dispenser states to give progress updates), and also listens for ingestor requests to trigger unlatching (and publishes ingestor states to give progress updates). Doing it this way is feasible.

It’s also perfectly fine to implement this workflow using the dock action. One technique we’ve been using with dock lately is to put a json description with everything needed for the mission into the dock_name field instead of just a simple name. For example instead of a dock_name of pickup_03, you’d have a dock_name of

{"dock": "xxxxxx", "latch": "yyyyyy"}

If there’s a risk that multiple dock_name you can still use the original dock_name label to force the strings to be unique:

{"dock": "xxxxxx", "latch": "yyyyyy", "name": "pickup_03"}

I wouldn’t say that there’s one “right” way to implement it. Both docks and ingestor/dispenser can work fine; it’ll come down to personal preference.