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

Map view auto-pan/zoom mode #7884

Open
abey79 opened this issue Oct 24, 2024 · 0 comments
Open

Map view auto-pan/zoom mode #7884

abey79 opened this issue Oct 24, 2024 · 0 comments
Labels
feat-map-view Everything related to the map view ui concerns graphical user interface

Comments

@abey79
Copy link
Member

abey79 commented Oct 24, 2024

Providing one or more auto-pan and/or zoom for the map view is a key usability element. Because of its nature and its use cases, it cannot 1:1 mirror the way we handle that in the 2D view. This issue is a first attempt to scope this feature.

Motivating use-cases

Single entity

Think: displaying the car location on a map in the nuscenes example.

In this case, the view should track the point of interest as it moves. There is no constraint on the zoom level, so up for the users to change. A "city-block-scale default zoom level feels like a good default: perfect for an automotive; might need a little zooming in or out for smaller scale robot, resp. drone applications.

This use case highlights a fundamental difference between the 2D and Map views. The former offers no absolute positioning context at all by itself due to the uniform background. Panning to track a single entity's translation has zero visual (and thus informational) value, so our default handling of the visual bounds should aim stability. The opposite is true for the map view: in this case, it can be desirable to have an entity that is stationary in screen space (aka stuck in the middle of the view) and have the "visual bounds" constantly change.

Swarm of entities

Think: the air traffic data (#5449) example; or a recording of Intel drone light shows.

In this case, both the position and the zoom level of the view should adjust such that everything fits on screen. To minimise distraction,, the view should pan only for large changes of the swarm's bounds/centroid (think a flock of bird going somewhere), but not due to changes of the internal swarm distribution (think the drone show where the swarm remains at the same general location).

This use case seems to be a better fit to a 2D-view-like, bounding-box-based behaviour.

Technical considerations

The view state is maintained by the walkers crate. In particular, it already supports a "track my position" vs. "user defined" mode, and automatically switches to the latter upon user interaction. Our auto-pan strategies would piggy-back on this be activating the "track my position" mode and setting "my position" as required.

MVP

For the scope of the initial map view PR (#6561), I propose to use the following approach:

  • track the centroid of the logged points
    • basically what we need for the single entity use case
    • not great for the swarm with potentially distracting small spurious panning / work-around: manual pan a little bit to disengage auto-pan
  • if unset, initialise the zoom level based on the current spread of logged points (then, no further auto-zoom)

Future work

This is mostly TBD.

Explicit modes in the UI:

  • "Track entity"
    • this requires specifying which entity (and which instance!) to consider if more than one are included in the view
  • "Track swarm"
  • "Manual"
@abey79 abey79 added ui concerns graphical user interface feat-map-view Everything related to the map view labels Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat-map-view Everything related to the map view ui concerns graphical user interface
Projects
None yet
Development

No branches or pull requests

1 participant