-
Notifications
You must be signed in to change notification settings - Fork 26
Improve tasks UI #345
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
base: main
Are you sure you want to change the base?
Improve tasks UI #345
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]>
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
|
After a little bit of poking around, it turns out that the UI flicker when clicking on the Another remaining bug is the the one-frame delay when toggling the |
|
It might be good for @Nielsencu to take a look at this and think about how to align these changes with some of the things we've discussed for the debugging tool. One similarity is that tasks have been moved to a toggleable panel on the left, similar to what we've discussed for the debugging tool. |
|
While fixing merge conflicts from Pointing this out in case this PR gets closed in favor of a separate PR for the debugging tool - if that's the case I'll open a separate one for this particular fix. |
Signed-off-by: Xiyu Oh <[email protected]>
|
I was thinking if it would make sense to combine both the tasks panel and debugger panel into one? The left panel would be divided vertically into two, where the tasks section would sit above the MAPF debugger section. I am not sure there are other functionalities for tasks at the moment, as far as I know they are only used for debugging MAPF. Given my understanding is correct, I think it makes sense to put them into one panel. We can even have a checkbox that toggles on and off the MAPF debugger section, if users only want to add tasks but do not want the debugger functionality (though I currently do not see the use case of only adding tasks without debugger). |
|
@Nielsencu Shifting both tasks and debugger into the left panel sounds good to me! Tasks serve to represent and store different types of activities a robot is capable of carrying out, and we'll likely plan for more types of tasks beyond GoToPlace (which is what you're using for the mapf debugger). Being able to toggle the debugger section on/off is a great idea. |
luca-della-vedova
left a comment
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 gave this a spin and found a few issues:
Location for GoToPlace and Duration for WaitFor tasks are in the wrong UI block when doing inplace edits, specifically they don't seem to be contained in the task itself but in the root left side panel
and
It seems that changing a task type can reorder it in the list of tasks, for example starting from the state above, if I change Task 1081 from WaitFor to GoToPlace it gets automatically moved to the top of the list. For this I would suggest having a static sorting strategy, perhaps in alphabetical order of the task name?
I also noticed that GoToPlace tasks without a set location can still be added (both before and after this PR), is this intentional? Since a GoToPlace without a destination is invalid I feel the Add task button should be greyed out if it's not set.
| }, | ||
| "robots": { | ||
| "52": { | ||
| "fleet": "HospitalRobot", |
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.
Should we add tasks to this file so we make it part of our CI pipeline? It can be done in a followup if you prefer
| Color32::default() | ||
| }; | ||
| let mut edit = false; | ||
| let in_edit_mode = edit_task.0.is_some_and(|e| e == task_entity); |
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.
It's not exactly here (a few lines below) but I'm a bit conflicted on using the task's Entity value for its display name, has there been a thought on having a NameInSite component for tasks? We could auto-generate it with a random ID the way we do in the RMF stack. Or if we want to go for IDs maybe just the SiteID? Entity values can be pretty random, I noticed that creating a new task in my test (screenshots in main review comment) created Task 1078, and creating a new one immediately after resulted in Task 1081, I would argue the very high + not even contiguous number is not too informative.
|
Just a few suggestions that I thought can be made as I was working with tasks
Reasons for 1 and 2 is for easy-lookup. Currently, I have to iterate through all possible locations, match the string, and get the relevant location entity to find the anchor transform. |
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]>
|
@luca-della-vedova @Nielsencu Thanks both for the detailed review and suggestions! I believe I managed to address all of them:
Other add-ons:
|
Signed-off-by: Xiyu Oh <[email protected]>
|
CI failing, should be fixed by #385. Opened as a separate PR since it is not related to tasks specifically. |
| ui.label("Fleet:").on_hover_text( | ||
| "(Optional) The name of the fleet for this robot. \ | ||
| If specified, other fleets will not bid for this task.", | ||
| ); | ||
| if !in_edit_mode { | ||
| ui.label(task_request.fleet_name().unwrap_or("None".to_string())); | ||
| } else { | ||
| edit_fleet_widget(ui, &mut new_task); | ||
| } |
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 noticed that on my machine "some" tooltips don't work, specifically Fleet doesn't but Requester does, can you reproduce?
I also wonder since we are pre-populating the fleet, do we actually want the fleet parameter to be editable or should it just be fixed?
Making it editable creates a risk of disconnect, for example TinyRobot1 is spawned in the world as part of Fleet1, users decide to assign a direct task to it and choose it from the dropdown, the fleet is automatically initialized to Fleet1, which is great.
However, the field is editable so users can change the fleet name to Fleet2 and still create a valid task but it seems to me that is an invalid task that should not be allowed.
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.
Yeah I think you're right, it was quite an inconsistent design. I'll make this non-editable.
7de9d83
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 noticed that on my machine "some" tooltips don't work, specifically Fleet doesn't but Requester does, can you reproduce?
That's weird, on my end I'm able to see all the tooltips
Signed-off-by: Xiyu Oh <[email protected]>
Signed-off-by: Xiyu Oh <[email protected]>
This PR targets #312 to bring in the following improvements to the task UI:
fleetparam toRobotFleetfield intoMorefor dispatch tasks, and remove redundantFleet namefor all task requestsworldMore detailsbutton flicker