Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CX: integrate basic storage station usage #409

Open
wants to merge 41 commits into
base: master
Choose a base branch
from

Conversation

TarikViehmann
Copy link
Contributor

This PR updates the agent to the latest changes of the refbox regarding the storage station introduced by robocup-logistics/rcll-refbox#91.

The MachineInfo message processing is updated to deal with the status_ss field, which provides the storage status of every single storage station slot.

New Predicates

This leads to the introduction of three new sensed predicates, namely ss-stored-wp, ss-shelf-slot-free and ss-new-wp-at that are updated according to the content of status_ss. The first two are simply reflecting whether a workpiece can be found on a slot. ss-new-wp-at contains information on workpieces that are unknown to the agent and stored in the SS by decoding the additional information field that is sent. This allows to receive info on pre-stored workpieces. The paradigm here is that the agent fully trusts the workpiece descriptions sent by the refbox. Hence this info is updated to reflect the agents knowledge to a format of <wp-id> <wp-base-color> <wp-ring1-color> <wp-ring2-color> <wp-ring3-color> <wp-cap-color>, always containing exactly 6 words.

New Actions

To interact with the SS the agent can use the refbox actions prepare-ss-to-store, prepare-ss-to-retrieve and prepare-ss-to-assign-wp, the former two are accompanied by the followup actions store-wp and retrieve-wp. prepare-ss-to-assign-wp is special as it triggers an instantaneous change in the refbox without direct feedback in form of a mps state change. Rather, the success can be determined through sensing the updated workpiece descriptions in the MachineInfo messages. Hence, the feedback about the success of sending the prepare message and the updated worldmodel changes occur simultaneously and no split between prepare message and worldmodel update action is made.
Lastly a new action modeling the assignment of a workpiece to an order is introduced with assign-wp-to-order. This gives us a clean way to bind workpieces to orders when it becomes necessary outside of the regular dispense-for-order action.

New Goals

SS-SPAWN-C0 that spawned a C0 at the SS output for the 2019 rule set is replaced by SS-ASSIGN-WP that can assign a pre-stored product to the C0 order where quantity-requested > 1.
STORE-WP stores a finished product if delivery-begin > 180s away. If the begin is closer than that, then our existing behavior is applied (pick up the product if it blocks another product from being finished, deliver once the delivery begin approaches).
GET-STORED-WPretrieves a product from the storage station once its delivery begin approaches, which makes sense if we only use the storage station for finished products as assumed for now.

@TarikViehmann TarikViehmann added enhancement New feature or request agent A bug or feature in the agent labels Mar 11, 2021
@morxa
Copy link
Member

morxa commented May 3, 2021

Have you had a look at the build failures?

@TarikViehmann TarikViehmann force-pushed the tviehmann/storage-station-full branch from 9587a0d to a526a27 Compare May 10, 2021 14:49
@morxa morxa removed their request for review November 3, 2021 10:21
For now assume that all slots are usable and empty in the beginning.
This is probably due to changes once the storage station rules are
discussed.
A first rudimentary use-case for the storage station is to store
finished products if they cannot be delivered yet.

This is probably a desired behavior unless it costs points to store
workpieces.
It might still be needed if the rules allow for pre-stored products,
for now disable it
Whenever we get info about a new product at the storage station, bind a
workpiece to it so it can be properly used.
This prepare action only changes the workpiece description associated to
the storage slot, hence there is no feedback in form of a mps state
change. Instead the update is sensed through the periodic storage
update.
According to the rules pre-stored workpieces may only be used for the C0
order(s) with quantity requested > 1.
Hence we can combine the binding of the pre-stored product with updating
the process information and leave the other pre-stored products as is.
domain objects are not synced, domain-objects-by-type might arrive late
All exog actions reacting on mps-states have either processing or their
respective final state as precondition and do not mention the mps-state
as affect.
Actions that trigger the update of workpiece descriptions at the SS do
not need to be split up into a prepare followed by an exog action: there
are no processing steps involved, instead all effects are passively
sensed.
This is also the case for all other machine related actions.
@TarikViehmann TarikViehmann force-pushed the tviehmann/storage-station-full branch from ad0db73 to d00d687 Compare May 25, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent A bug or feature in the agent enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants