Repository navigation
Feature/gui nicegui upgrade map view - #699
Merged
Merged
Conversation
NiceGUI 1.4.8 is replaced by NiceGUI 3.19.x on Python 3.10 (Ubuntu 22.04, ROS 2 Humble) and NiceGUI 4.x on Python >= 3.11 (Ubuntu 24.04 Jazzy and newer). Both share one API, so no compatibility shims are needed. On Python < 3.10 (ROS 2 Foxy) the GUI dependencies are skipped and the launch files start ATOS without the GUI. - Port to the NiceGUI 3/4 API: ui.navigate.to, Quasar classes instead of .tailwind, no auto-index client, AG Grid object rowSelection and get_selected_rows(), sanitize=False for trusted ui.html markup. - anyio >= 4.14.2 in the shared venv on Python >= 3.10 (required by NiceGUI). - Serve atos_gui/static in normal mode as well as fleet mode. Map view on /control: - Esri World Imagery (no API key), OpenStreetMap or a custom tile URL. Resizable, and fits never zoom past the deepest available imagery. - Scenario trajectories (/atos/object_<id>/path) loaded after Init, and connected objects (/atos/object_monitor) drawn as heading-rotated markers that turn grey when monitor data stops. - Exact local frame -> WGS84 conversion with the same PROJ tmerc definition as EsminiAdapter. Headings are converted to true bearings, including meridian convergence. - User settings for trajectory width/style/opacity, marker size/style, labels and per-object colours, persisted on the ATOS host. Tests: 23 pytest tests for the geodesy and the ROS data source. They run under colcon test (pyproj from rosdep, pytest declared as a test extra). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The GUI needs Python >= 3.10, so Ubuntu 20.04 / ROS 2 Foxy installs ATOS without it. Say so in the README, the installation docs and setup_atos.sh --help. setup_atos.sh now prints a highlighted notice at the start and end of the installation, so it isn't lost in the install output. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
When the map sits at a fractional page offset, Chrome snapped each tile to device pixels on its own, leaving a light line between tile rows at 2x scaling. Compositing the map element as one layer removes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Merge the license header and module description into one docstring, so imports are at the top of the module (E402). - configpanel: type(x) is not T instead of != (E721), same semantics. - controlpanel: import GetObjectControlState instead of * (F403/F405). - map_data: drop unused rclpy import (F401); ruff import order and format. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
anyio 4 (required by NiceGUI) registers a pytest plugin that imports _pytest.scope, added in pytest 7.0. The venv uses --system-site-packages, and Ubuntu 22.04's system pytest 6.2.5 satisfied the old pin, so the integration test (python3 -m pytest in the venv) failed at start-up with "No module named '_pytest.scope'". Require pytest >= 7.0 (still < 7.5) on Python >= 3.10 so pip installs 7.4.4 into the venv. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The settings pane is toggled from a "Map settings" button in the map header and only takes space while open; closed, the map uses the full width. - Only a drag of the resize handle is remembered, and the width is stored as a percentage of the available width. Window resizes no longer get persisted as a fixed pixel width that kept the map small after the window grew again, also across reloads. The storage key changes so the old pixel sizes are ignored. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- New "Show origin and x/y axes" map setting, off by default and saved on the ATOS host like the other settings. It draws a crosshair at the test origin with the local frame's x (east) and y (north) axes; hovering it shows the origin's latitude and longitude. The marker follows origin changes after a new Init and is cleared on reset. - Docs: describe the new setting, the Map settings pane and the map following the window width. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
samuelthoren
marked this pull request as ready for review
November 23, 2026 13:05
samuelthoren
approved these changes
Nov 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
GUI: NiceGUI upgrade and satellite map view in the control panel
Reason for PR
ATOS docs have been suggesting using Foxglove for graphical inspection of running scenario. Since Foxglove has moved away from open source development and now requires users to sign-up for accounts, this makes the setup process to use ATOS cumbersome for new users. A simple graphical interface that shows objects and trajectories on a satellite map would fulfill 99% of what foxglove provided for us historically. This PR adds a map box in the ControlPanel view which is fully self-contained.
It does not remove existing foxglove plugins sp it can still be used.
Summary
/control: a resizable satellite map showing the loaded scenario's trajectories, plus a heading-rotated marker for each connected test object.Screenshots
These were taken with the real map view code fed by simulated data. Car's path is the surveyed rural-road lane centre line at AstaZero (
conf/conf/rural_road_centerline_ccw.geojson), placed with the GaragePlan origin. Truck's oncoming lane is the same line shifted 3.5 m sideways, and Target crosses the road.Control panel with the map, fitted to the scenario

Close-up: markers rotated by heading, on their trajectories

Map settings panel

Marker styles

Trajectory line styles

Labels off: hover shows speed and heading; a grey marker means no recent monitor data

NiceGUI upgrade
atos_gui/requirements.txt: the NiceGUI version is chosen by Python version (3.19 on 3.10, 4.x on ≥3.11). Thefastapi==0.108.0pin is gone, andpyprojis added for the map.scripts/installation/requirements.txt:anyio>=4.14.2on Python ≥3.10, because NiceGUI needs it and shares the venv. The oldanyio<4.0pin stays for Python <3.10.install_deps.shskips the GUI dependencies.launch_base.pylogs a warning and launches ATOS without the GUI when NiceGUI isn't installed.ui.navigate.toreplacesui.open..tailwind.rowSelectionandget_selected_rows().ui.html(..., sanitize=False)for the trusted fleet map markup.atos_gui/staticis now served in normal mode too, not only in fleet mode.Map view
/atos/object_<id>/path. They load once ObjectControl reaches INITIALIZED and reload on every new Init./atos/object_monitor, filtered by/atos/connected_object_ids.gnss_path/gnss_fixuse a flat-earth approximation that is off by roughly 2–3 m per km.get_test_originis only called once ATOS is INITIALIZED, with a timeout. The service waits indefinitely when no origin is set.<geoReference>shows a message instead of guessing a position.app.storage.general. The map size is remembered per browser.docs/Usage/GUI/controlpanel.mdgains Requirements and Map view sections.Tests
atos_gui/test/.MapDataSourceagainst a fake node: load order, origin timeout and retry, path received before the origin, connected and stale filtering, re-init, and a missing geo-reference.colcon test:python3-pyprojis a rosdep dependency, becausecolcon testruns outside the venv.setup.py; without it, colcon ran 0 tests.Testing done
colcon test --packages-select atos_guiinros:humble(Python 3.10, apt pyproj 3.3.0, pytest 6.2.5)ros:jazzy-ros-base-noble(Python 3.12, pyproj 3.6.1)ros:lyrical-ros-base-resolute(Python 3.14, pyproj 3.7.2, numpy 2.3)Manual tests performed:
A full ATOS run was tested with the GaragePlan scenario and a virtual test object.
Notes for reviewers
anyio<4.0came in with 47ff9fc, which gives no reason. anyio 4.16 with the pinned pytest 7.4 works, andlaunch_pytestuses asyncio directly. Please let the docker-compose integration test confirm it.app.storage.generalto.nicegui/in the GUI process's working directory, which is now in.gitignore. Makes user changes persistent.🤖 Mostly Generated with Claude Code