-
Notifications
You must be signed in to change notification settings - Fork 60
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
Adds a simple parking spot management system. #325
Conversation
I got it to segfault in a fairly reproducible way, I did the following on office world:
This is the log
I wonder if the "try to reserve a resource that is already reserved" is a corner case that causes this instability? |
Fixed in 18d2f3e. It was an error in the cancellation behaviour. |
* Update CHANGELOGS Signed-off-by: Yadunund <[email protected]> * 2.3.2 Signed-off-by: Yadunund <[email protected]> --------- Signed-off-by: Yadunund <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
#301) * Cancel automatic pending tasks that are removed during new assignments Signed-off-by: Aaron Chong <[email protected]> * Lint Signed-off-by: Aaron Chong <[email protected]> * Use unordered_set Signed-off-by: Aaron Chong <[email protected]> --------- Signed-off-by: Aaron Chong <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
This commit adds support for selecting the nearest spot on the same floor. This behaviour is convenient when looking at things from a cancellation perspective. This commit depends on open-rmf/rmf_task#101 Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
I have not implemented flexible constraints here. If we really need it can do it in a follow up pr. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Xiyu Oh <[email protected]> Co-authored-by: Xiyu Oh <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
This commit adds the rust reservation system node. It will require the ros2_rust system to be set up. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Going to drop Rust dependency. Currently working mutex into GoToPlace. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Removed all the rust code. This is a stop-gap measure for legacy RMF and should prevent erroneous occupation of parking spots. Signed-off-by: Arjo Chakravarty <[email protected]>
This commit adds a stupidly simple parking spot system. It ensures the next location a robot goes to is not occupied. It also publishes currently free parking spots. When combined with #308 it allows a robot to move to the nearest free spot instead of the nearest spot only. note: This PR still needs more testing Depends on: - open-rmf/rmf_internal_msgs#63 Known issues: - When the robots start in simulation not all robots seem to be running the idle task, hence some robot dont end up claiming parking spots. Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Yadunund <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
…ime stamp logic (#319) Signed-off-by: Aaron Chong <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
* check if task request has fleet_name and reject if it does not match fleet adapter's name. Signed-off-by: Charly Wu <[email protected]> * update logging. Signed-off-by: Charly Wu <[email protected]> * added DCO commit Signed-off-by: Charly Wu <[email protected]> * delete unnecessary new lines. Signed-off-by: Charly Wu <[email protected]> * remove extra space. Signed-off-by: Charly Wu <[email protected]> * uncrustified. Signed-off-by: Charly Wu <[email protected]> --------- Signed-off-by: Charly Wu <[email protected]> Co-authored-by: Yadu <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Teo Koon Peng <[email protected]> Signed-off-by: Arjo Chakravarty <[email protected]>
rmf_fleet_adapter/src/rmf_fleet_adapter/events/internal_ReservationNodeNegotiator.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
Signed-off-by: Arjo Chakravarty <[email protected]>
…_ros2 into arjo/feat/integrated_ressys
Signed-off-by: Arjo Chakravarty <[email protected]>
…evented. Signed-off-by: Arjo Chakravarty <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the progress, this is looking really great!
Here are some observations from further stress testing:
1. Office world, using the office_reservation_node.launch.xml
At startup, with each robot at the respective chargers, I sent tinyRobot2
to tinyRobot1_charger
. This leads tinyRobot2
to go to tinyRobot1_charger
, even though it is already occupied. Are waypoints claimed and allocated on launch? I suspect this has something to do with the nothing
finishing request for this fleet. This only happens when the first task submitted on launch leads a robot to a waypoint currently occupied by another robot.
2. To test out the reservation node in multi-level scenarios, I tested it in Hotel world.
Tweaks to building map, fleet configs and launch file:
I added a parking spot to an existing waypoint on L3, enabled the reservation node in Hotel world's launch file, and in the fleet configs set use_reservation_node
to True
for both deliveryRobot
and tinyRobot
fleets. I also set the finishing request to nothing
for both fleets.
The reservation system works well as expected when sending robots from different fleets to the same waypoint on the same map 🎉
There is a particular multi-level scenario I was curious about. With both tinyBot_1
and deliveryBot_1
at L1 at their respective chargers, I followed these steps:
- Submit patrol task for
tinyBot_1
toL3_master_suite
. The robot begins its way up to L3. - Submit patrol task for
deliveryBot_1
toL3_master_suite
. The robot stays put atdeliverybot_charger
. - After
tinyBot_1
has reachedL3_master_suite
, submit patrol task fortinyBot_1
toL3_room1
.
Observation:tinyBot_1
moves toL3_room1
. At the same time at L1,deliveryBot_1
begins moving towards the lift to travel up to L3, then goes toL3_master_suite
.
I assume this is the intended behavior, where if the target waypoint is on another level and is occupied, the robot would go to a parking spot on its current map while waiting for the target waypoint to become vacant.
However, I was thinking it might make more sense for deliveryBot_1
to wait at a parking spot on L3 (if one exists) instead of at L1 where it originally was. That way, if L3_master_suite
becomes vacant while deliveryBot_1
is making its way up to the L3 parking spot, the robot would already be halfway to the target waypoint.
With the current behavior, the travel time for each robot to travel to a different map becomes exclusive: tinyBot_1
completes the travel from L1 to L3, waits X minutes at L3_master_suite
and leaves, then deliveryBot_1
starts travelling from L1 to L3. As opposed to having both robots start moving from L1 to L3 once they receive their tasks, and their travel times would overlap.
I can imagine a significant amount of waiting time saved if this was a larger building, and each robot was planned to occupy the target waypoint for few minutes to perform some action, while the travel time from charging spots to target waypoints could take anywhere from a quarter to half an hour.
This is more of a what-should-be-the-best-behavior consideration, feel free to share your thoughts!
Sadly, in the current architecture of RMF this is actually very hard to do. There must be some thing that asks the robot to go to a location to register it. Currently, if a robot starts on a location, unless there is a task assigned to it at start up, the robot will not issue a claim. If you notice in my example for the office world. I disable
This is tricky, as we define |
Signed-off-by: Arjo Chakravarty <[email protected]>
we go to the waiting spot nearest the destination. Signed-off-by: Arjo Chakravarty <[email protected]>
As discussed offline, I have implemented @xiyuoh's recommendation of waiting near the goal destination if we have only one goal destination. |
Signed-off-by: Arjo Chakravarty <[email protected]>
In the event that one goal is provided, we will take the elevator to said goal target. Signed-off-by: Arjo Chakravarty <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Arjo! Tested both single and multi level scenarios with a single goal waypoint, in both cases the robot waiting for the goal to be freed up was able to travel to the parking spot nearest to the goal. Other than the minor typo everything LGTM, happy to approve after that is fixed 😄
rmf_fleet_adapter/src/rmf_fleet_adapter/events/internal_ReservationNodeNegotiator.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Arjo Chakravarty <[email protected]>
Thanks for the thorough feedback. This wouldn't have been possible without it! I've fixed the typo. |
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
Signed-off-by: Michael X. Grey <[email protected]>
All feedback has been addressed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done a final pass and I'm very happy with how this feature has turned out.
@arjo129 good job cramming this very important feature into a structure that wasn't originally made for it.
@luca-della-vedova thanks for the very thorough initial review!
@xiyuoh thanks for the rigorous testing and catching so many important edge cases!
This was an excellent team effort all around. I'll merge this within the next 24 hours as long as there are no objections.
New feature implementation
Implemented feature
This commit adds a stupidly simple parking spot system. It ensures the
next location a robot goes to is not occupied. It also publishes
currently free parking spots. When combined with #308 it allows a robot
to move to the nearest free spot instead of the nearest spot only.
note: This PR still needs more testing
Depends on:
Known issues:
the idle task, hence some robot dont end up claiming parking spots.