strands-project / aaf_deployment

All components for the STRANDS AAF deployment
MIT License
1 stars 11 forks source link

Error msg after stuck in WG #391

Open capamat-aaf opened 7 years ago

capamat-aaf commented 7 years ago

After being stuck & helping during WG: Error message remains until there is a change that necessitates a different screen.

marc-hanheide commented 7 years ago

@bfalacerda how does it work: When monitored_nav displays something on the web server, how does it revert to showing the previous screen again? Something seems not to be working there. But I don't quite understand how it is supposed to work...

cdondrup commented 7 years ago

This never worked because AFAIK it changes the http_root and therefore the page cannot be found. But not sure, just know it never worked.

marc-hanheide commented 7 years ago

that's 💩

bfalacerda commented 7 years ago

monitored nav loads the root page when help is provided, or when it times-out, so the help screen should always disappear..

it shouldn't be changing the http_root, here is the call i do:

https://github.com/strands-project/strands_recovery_behaviours/blob/hydro-devel/strands_human_help/src/strands_human_help/help_screen.py#L86

bfalacerda commented 7 years ago

is the main page for aaf not index.html?

cdondrup commented 7 years ago

Yes, I found that as well, it assumes that the page it should show is always called index.html which doesn't work because the walking group has a lot of different pages it shows using show_relative_page. Neither of them is called index.html ;)

It has to somehow know what relative page it displayed before the help was required and go back to that.

marc-hanheide commented 7 years ago

right... the index.html assumption is most likely very wrong... A better way for monitored nav would probably be using a modal dialog. There is some support for that already in there using the /strands_webserver/modal_dialog topic (type strands_webserver/ModalDlg), but that just displays and doesn't allow for feedback...

bfalacerda commented 7 years ago

sorry for the ignorance, but I don't know what a modal dialog is... If the webserver publishes the name of the last relative page displayed, or has a service that provides that info, I could update the call to take that into account

cdondrup commented 7 years ago

It might not be a relative page that is currently displayed. Adding a service to the webserver that gets the current pages as an html string which could then be displayed again might work.

But I agree that the dialogue might be the best choice given that adding buttons would be possible.

marc-hanheide commented 7 years ago

@bfalacerda a modal dialogue is just a dialogue that sits above everything all. I implemented something like this before for the webserver to display a maintenance message. We could change it to offer ROS service that displays the dialogue, and returns the button pressed, e.g. the srv could be:

string title
string description
string[] button
---
string button_text
uint32 button_id

with all strings supporting full HTML formatting. Returned would be the button_id and the string button_text What do you think @bfalacerda ? Would you be interested in changing the monitored_nav side, you'd call a new service instead the display_page stuff.

bfalacerda commented 7 years ago

yep, I can do that after the hoidays

marc-hanheide commented 7 years ago

The required functionality is implemented in strands_webserver in https://github.com/strands-project/strands_ui/pull/106