Open axisofentropy opened 6 years ago
@kiselev-dv is working on this here https://github.com/EndPointCorp/lg_ros_nodes/tree/sv_persist_browsers
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
.
I think this ticket can be closed.
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 maintainMap()
instances for as long as feasible. We can modifylg_sv
to send Street View browser windows to the background instead of destroying them.Requirements:
Map()
instantiationslg_sv
ROS node to "hide" Chrome browser windows instead of destroying them when closing Street View. And reveal them when Street View opens.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 stateHIDDEN
. Example: https://github.com/EndPointCorp/lg_ros_nodes/blob/master/lg_sv/scripts/server.py#L106Every time we set a state other than
VISIBLE
, that's the time to suspend SpaceNav input to thePanoViewerServer
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.