-
Notifications
You must be signed in to change notification settings - Fork 55
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
Lane closure #15
Lane closure #15
Conversation
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
I've added some CLI tools for opening and closing lanes. Using open-rmf/rmf_demos#13 it's easy to test the lane closure feature with the following commands (using a separate terminal for each):
Once that is running, you can use
to close
to reopen For this demo, you can use the illustration below to pick which lanes to open and close and watch the result. Note that each "lane" is unidirectional, so closing lane 30 will block the robot from going east while closing lane 31 will block the robot from going west. If you close the lane that the robot is currently on, the fleet adapter should instruct it to return to the start of the lane and find a new path from there. |
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.
Tested and works well! I know this is expected behaviour but when a robot is moving towards a goal
and all lanes to that goal
are closed, the Planner
will fail to find a solution and full_control
will crash:
[full_control-15] [SearchForPath] CRITICAL ERROR: Impossible plan requested! Participant [tinyRobot_1] owned by [tinyRobot] Requested path (4) --> (2)
Just wondering if the fleet adapter should do some kind of check to see if the requested lane closure will lead to this type of error and hence not close the lane?
I was also planning to open a ticket in rmf_demos
to add scripts to open/close lanes but I see that they have been added here directly 👍🏼
I think the fleet adapter needs to respect lane closing commands, because it may be the case that sending the robot down a closed lane would be harmful to the robot or others. Instead we need to improve the error handling pipeline for critical task failures. I've added a ticket #16 for this. |
Agreed, that is a better approach. Also, maybe in a future PR we can have |
Yeah, I wanted to save that for later to give us time to decide for sure how we want to approach that before committing to that particular topic/message long-term. |
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
* Added recharge_soc to Constraints Signed-off-by: Yadunund <yadunund@openrobotics.org> * Updated ChargeBatter factory Signed-off-by: Yadunund <yadunund@openrobotics.org> * Constraints go into Configuration Signed-off-by: Yadunund <yadunund@openrobotics.org> * Add test for recharge_soc constraint Signed-off-by: Yadunund <yadunund@openrobotics.org> * drain_battery separated from requests. Added to Configuration Signed-off-by: Yadunund <yadunund@openrobotics.org> * Uncrustify Signed-off-by: Yadunund <yadunund@openrobotics.org> * Moved drain_battery into Constraints Signed-off-by: Yadunund <yadunund@openrobotics.org> * Added Request::Model Signed-off-by: Yadunund <yadunund@openrobotics.org> * Uncrustify Signed-off-by: Yadunund <yadunund@openrobotics.org> * Removed max_charge_soc from ChargeBattery::make() Signed-off-by: Yadunund <yadunund@openrobotics.org> * Regroup arguments in make() Signed-off-by: Yadunund <yadunund@openrobotics.org> * Add model to PendingTask Signed-off-by: Yadunund <yadunund@openrobotics.org> * Optimizations Signed-off-by: Yadunund <yadunund@openrobotics.org> * Pass mutable reference of EstimateCache into estimate_finish Signed-off-by: Yadunund <yadunund@openrobotics.org> * Disable test printout Signed-off-by: Yadunund <yadunund@openrobotics.org> * Uncrustify Signed-off-by: Yadunund <yadunund@openrobotics.org> * Removed unused num_loops and cleaning_path Signed-off-by: Yadunund <yadunund@openrobotics.org> * Removed unused variables Signed-off-by: Yadunund <yadunund@openrobotics.org> * Update ChargeBattery.cpp Signed-off-by: Yadunund <yadunund@openrobotics.org>
New feature implementation
Implemented feature
Allow fleet adapters to close navigation graph lanes.
Implementation description
The
rmf_fleet_adapter::agv::FleetUpdateHandle
API can now be told to close or open navigation graph lanes during runtime.For the legacy fleet adapter (aka the
full_control
adapter) you can send aLaneRequest
message to open or close lanes at any time. If thefull_control
adapter detects that the robot is currently on a lane that was just closed, then it will have the robot retreat back to the start of the lane and find a new plan from there. NOTE: We do not offer very strong guarantees about the effectiveness or reliability of this behavior for the legacy fleet adapter, because thermf_fleet_msgs
API does not always convey as much information as we need to make the behavior reliable.Dependencies