robocup-logistics / gazebo-rcll

Gazebo Models, Plugins, and World Files for the RoboCup Logistics League
GNU General Public License v2.0
17 stars 12 forks source link

update delivery_station mps plugin #22

Closed pkohout closed 4 years ago

pkohout commented 4 years ago

Hi,

we started fixing the problems in our simulation, and we noticed that the delivery station plugin is still using the gate parameter of the PrepareInstructionDS (see below). We have now a workaround to assign a random gate, but I would like to create a pull request with a proper fix. How is the connection of order_id - gaze implemented in the real world? Should the MPS handle that (listening to the orders), or is there a new message that the refbox sends to the MPS (which contains the correct order)? IMHO the MPS should not be aware of "Orders" since a order is an object that exits layers above the MPS.

Thanks a lot, Peter

message PrepareInstructionDS {
  reserved "gate";
  reserved 1;
  required uint32 order_id = 2;
}
morxa commented 4 years ago

The communication between refbox and MPS does not change, the refbox instructs the MPS as before.

pkohout commented 4 years ago

I don't know how the current state of how the Refbox is instructing the real MPS, that is what my question is about. I just see that the PrepareInstructionDS changed, so the communication in the Plugin has changed.

Here how it is defined in the refbox (tag 2019-beta1, which works with the simulation)

message PrepareInstructionDS {
  reserved "gate";
  reserved 1;
  required uint32 order_id = 2;
}

Here how it is defined in the gazebo-rcll(master)

message PrepareInstructionDS {
  required uint32 gate = 1;
}

How does the real MPS get the correct value for gate, since it can't be send by the PrepareInstrctionDS. As it is not present there. Is the MPS aware of Orders (hence getting the correct gate from there). Or what, I hope, that the Refbox sends a different message to the real MPS which has the gate as parameter (so the MPS is not aware of Orders). If you don't know how this is done, please let me know. I do not know who is writing the code for the real MPS, but I think the guys from team solidus are doing it (please correct me if I am wrong)

hope the question clear, thanks a lot, Peter

morxa commented 4 years ago

PrepareInstructionDS is a message sent from a robot/team to the refbox. It's not used for the communication between refbox and MPS. For that, we use OPC-UA, but the instruction has not changed, the refbox still instructs the MPS to use a certain gate:

https://github.com/robocup-logistics/rcll-refbox/blob/cdd5a2faad09f6d16cb159f95c38e37d2bf266d6/src/games/rcll/production.clp#L472-L481

Note that even if a team does not send the gate to use for a delivery, the refbox obviously still knows where the product should be delivered, so it can still instruct the MPS with the right gate.

The current master does not work with Gazebo, as the Gazebo plugins need to be updated to use OPC-UA.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.