-
Notifications
You must be signed in to change notification settings - Fork 15
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
Wait until action #39
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
…supported Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
…in pickup/dropoff, and move action-related code into its own package Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
pickup pos is not found Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
…ting MiR coords Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
…alize missions Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[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.
With a note that I didn't run this since it requires hardware and I only did the test of running it in my brain, I just have a few small comments here and there and a more meaty point where I'd be happy to hear your input. Generally speaking the quality of the coding and the API looks quite solid to me
fleet_adapter_mir_actions/fleet_adapter_mir_actions/rmf_wait_until.py
Outdated
Show resolved
Hide resolved
fleet_adapter_mir_actions/fleet_adapter_mir_actions/rmf_move_off.py
Outdated
Show resolved
Hide resolved
fleet_adapter_mir_tasks/fleet_adapter_mir_tasks/dispatch_multistop.py
Outdated
Show resolved
Hide resolved
fleet_adapter_mir_tasks/fleet_adapter_mir_tasks/dispatch_multistop.py
Outdated
Show resolved
Hide resolved
configs/mir_config.yaml
Outdated
mission: | ||
mission_name: "some_mission_name" # If this mission is found on the robot, it will be queued when the action starts, and the robot will move off when the mission is completed. | ||
retry_count: 10 # Optional field for signal type "mission". The fleet adapter will re-attempt queueing the mission for this number of tries. | ||
resubmit_on_abort: False # Optional field for signal type "mission". Set to True to resubmit mission if the mission gets aborted by the robot. Default to False. | ||
plc: | ||
register: 20 # Fill in with PLC register number. Robot moves off when this PLC register returns True | ||
custom: | ||
module: "fleet_adapter_mir_actions.rmf_move_off_on_alert" # Fill in with path to custom module written. Robot moves off when module provides the user-defined move off signal. | ||
default: "custom" # Specifies a default signal type out of those listed above. If the task description does not provide any signal config, the fleet adapter will use this default signal type. |
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.
This is more something for discussion rather than a request for change. Thinking again about the limitation that the adapter will only support one mission
, one plc
and one custom
, which is especially important for custom
since the module
is not exposed to the user API, what do you think about a config file like the following:
signals:
sample_mission: # Only a unique name
signal_type: mission # Specifies the actual type
mission_name: "some_mission_name"
[,,,]
sample_mission_2:
signal_type: mission # Specifies the actual type
mission_name: "some_other_mission_name"
[,,,]
custom_1:
signal_type: custom
module: "fleet_adapter_mir_actions.rmf_move_off_on_alert"
custom_2:
signal_type: custom
module: "fleet_adapter_mir_actions.rmf_move_off_on_something_else"
default_signal: "custom_1"
In theory this should allow multiple entries which can be addressed by name (since the list is a map), but to be honest I don't know how common the use case of having such level of configurability is and if it justifies the added complexity, what do you think?
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.
This is a really interesting suggestion and can be incorporated very easily. I can see the main pro being having everything configured at launch, such that users who would like 10 different missions to be triggered for various tasks won't have to constantly overwrite default values with their task descriptions. In fact, this helps to reduce the complexity of task descriptions - instead of allowing users to pick and choose the values they want to overwrite, I'd limit their options to either A) pick an existing configured signal type, B) provide a mission name/PLC register (no more submitting "PLC" task without specifying the register value), or C) pick the default signal like before.
From experience I feel like high level of configurability never hurts (as long as they are clear), and more often than not it is requested when we least expect it 🤣 I'll work on adding this.
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.
Signed-off-by: Xiyu Oh <[email protected]>
9bd95df
to
9d49b7e
Compare
Signed-off-by: Xiyu Oh <[email protected]>
9d49b7e
to
6284a28
Compare
Signed-off-by: Xiyu Oh <[email protected]>
This PR provides a
wait_until
PerformAction plugin for the MiR fleet adapter. It depends on and follows #36.This performable action enables robots to travel to a waypoint and wait there until a timeout or a move off signal is received. The expected task behavior would be:
During the waiting process, the robot may only move off if the default timeout has been reached, or if it receives a move off signal. This move off signal can be configured by the user depending on the user case. The plugin provides 2 out-of-the-box move off signals as well as the option for users to customize their own.
mission
: The waiting action would be mission-based, i.e. the fleet adapter would trigger a MiR mission specified in the config when the robot starts waiting, and end the waiting action when the mission is completed.plc
: The waiting action would begin and the fleet adapter monitors the state of the specified PLC register. Once it turns to a positive integer orTrue
, the waiting action ends.custom
: Users can define their own move off signal by writing their ownMoveOff
module and provide it to the fleet config. A abstract classBaseMoveOff
and example of an implementation are provided inrmf_move_off.py
andrmf_move_off_on_alert.py
respectively.For cases where users might want the move off signal to vary from task to task within the same fleet, they may provide the move off behavior in their task description instead of the fleet config. Any move off signal config provided in a task description will override the plugin config. If neither the task description or the plugin config provided sufficient information, no move off signals will be configured and the robot will simply wait for the full duration of the timeout.
The README contains greater detail of how customization for this action should work.
TODO: