Skip to content
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

lg_sv: Preserve single Map() instance #384

Open
axisofentropy opened this issue Aug 16, 2018 · 3 comments
Open

lg_sv: Preserve single Map() instance #384

axisofentropy opened this issue Aug 16, 2018 · 3 comments
Assignees
Labels

Comments

@axisofentropy
Copy link
Contributor

Overview:
Today's lg_sv implementation creates and destroys Chrome browser windows every time Street View is opened and closed on Roscoe Liquid Galaxies. Now that Maps API usage is metered, it would be very valuable to maintain Map() instances for as long as feasible. We can modify lg_sv to send Street View browser windows to the background instead of destroying them.

Requirements:

  • Significant reduction in Google Maps API usage during common LG utilization, specifically fewer Map() instantiations
  • Change lg_sv ROS node to "hide" Chrome browser windows instead of destroying them when closing Street View. And reveal them when Street View opens.
  • When the Street View browsers are not visible, suspend SpaceNav input coming into server.py. Resume once the browsers are visible.
  • lg_sv Browser launcher nodes must begin in the "STOPPED" state so it never loads the Maps API until we open Street View for the first time (after relaunching).

Development notes
In most places where we set the state to STOPPED we should instead set to state HIDDEN. Example:
https://github.com/EndPointCorp/lg_ros_nodes/blob/master/lg_sv/scripts/server.py#L106

Every time we set a state other than VISIBLE, that's the time to suspend SpaceNav input to the PanoViewerServer class.

Contact @mvollrath for help with this codebase.

Testing scenario
On a system with heavy Street View usage, see if its Maps API key has greatly reduced utilization. We expect at most one API request per display per relaunch (plus 1-3 from the touchscreen.) There should be zero API requests generated entering and exiting Street View after the first time after a relaunch.

Watch the ROS topic /streetview/state for state changes.

@axisofentropy
Copy link
Contributor Author

@axisofentropy
Copy link
Contributor Author

This is now deployed to the client system that was using the most Maps API calls. It seems to work fine, and the number of API calls has drastically diminished.

This is included within our disk image version 2.11.0-rc9002.

@axisofentropy
Copy link
Contributor Author

I think this ticket can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants