-
Notifications
You must be signed in to change notification settings - Fork 97
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
Use perform_action instead of dock() for cleaning tasks #162
Conversation
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Suggest to refactor as below so that you can also update the schedule itinerary of the robot while cleaning. This is a feature that is currently supported in the fleet adapters we have implemented for other cleaning robots.
This way, there is no explicit mention of |
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
Signed-off-by: Xi Yu Oh <xiyu@openrobotics.org>
@@ -37,6 +37,40 @@ rmf_fleet: | |||
delivery: False | |||
clean: True | |||
finishing_request: "park" # [park, charge, nothing] | |||
action: ["clean"] |
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.
Nit, since this is a list of actions it should probably be plural? Imho it's also a bit confusing to see the clean: True
above, is it still used / should we remove or deprecate it?
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.
|
||
self._action_thread = threading.Thread(target=_perform_action) | ||
self._action_thread.start() | ||
return |
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.
Nit return
is redundant here
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.
@@ -543,6 +608,7 @@ def update_state(self): | |||
if not self.started_action: | |||
self.started_action = True | |||
self.api.toggle_action(self.name, self.started_action) | |||
self.check_perform_action() |
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 find the name of the function a bit misleading, check_perform_action
implies that it is a function called periodically to check the status of the action, while here it is really only used once to start the action itself. By contrast in the ecobot fleet adapter the function is called periodically. I guess we can rename it to something more accurate, i.e. start_perform_action
?
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.
agreed, updated in 96fff51
I think there might be an issue with the update of the RMF schedule, i.e. below: schedule_not_updated.mp4I think it is due to the fact that the schedule submitted in every iteration is always the same (initial schedule fetched through the |
Signed-off-by: Xi Yu Oh <xiyuoh@intrinsic.ai>
Signed-off-by: Xi Yu Oh <xiyuoh@intrinsic.ai>
Signed-off-by: Michael X. Grey <grey@openrobotics.org>
The relevant parts of this PR have been merged into #188 and the cleaning activity should be working nicely when combined with open-rmf/rmf_ros2#286 I'll close this PR now since it's no longer needed. |
This PR follows the changes made for rmf-web in open-rmf/rmf-web#643. It also updates how performable actions are added to the rmf demo fleet adapter.
This PR:
check_perform_action()
to RobotCommandHandle to process performable actions such as cleaning tasksdock_name
from cleaning zones in hotel and airport building.yamlaction
field to the relevant worlds' config.yaml to specifyclean
as a performable action, and updates fleet_adapter accordingly to add them to the fleet if the field is populateddispatch_clean
to publish an ApiRequest with a compose task json