-
Notifications
You must be signed in to change notification settings - Fork 111
frontend: detect and list other vehicles on blueos #3517
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
Draft
Williangalvani
wants to merge
1
commit into
bluerobotics:master
Choose a base branch
from
Williangalvani:vehicle-picker
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Reviewer's GuideThis PR adds mDNS-based vehicle discovery to the backend beacon service, exposes a new REST endpoint for discovered services, and updates the Vue frontend to display and navigate between detected vehicles via a new picker component. Sequence diagram for frontend vehicle discovery and navigationsequenceDiagram
actor User
participant VehiclePicker (Vue)
participant Backend (REST API)
participant OtherVehicle
User->>VehiclePicker (Vue): Clicks vehicle picker button
VehiclePicker->>Backend (REST API): GET /beacon/v1.0/discovered_services
Backend-->>VehiclePicker: Returns discovered vehicles (IP + names)
loop For each discovered vehicle
VehiclePicker->>OtherVehicle: GET /beacon/v1.0/hostname
OtherVehicle-->>VehiclePicker: Returns hostname
VehiclePicker->>OtherVehicle: GET /bag/v1.0/get/vehicle.image_path
OtherVehicle-->>VehiclePicker: Returns image path
end
User->>VehiclePicker: Clicks on vehicle IP
VehiclePicker->>User: Opens vehicle UI in new tab
Entity relationship diagram for discovered services API responseerDiagram
VEHICLE {
string hostname
string imagePath
string[] ips
}
DISCOVERED_SERVICES {
string ip
string[] service_names
}
DISCOVERED_SERVICES ||--o| VEHICLE : contains
Class diagram for BeaconServiceListener and Beacon changesclassDiagram
class BeaconServiceListener {
+Dict discovered_services
+update_service(zc, type_, name)
+remove_service(zc, type_, name)
+add_service(zc, type_, name)
+_process_service(zc, type_, name)
+get_discovered_services()
}
class Beacon {
+Dict runners
+Optional zeroconf
+Optional service_listener
+Optional service_browser
+start_zeroconf_listener()
+stop_zeroconf_listener()
+get_discovered_services()
+run()
+stop()
}
Beacon o-- BeaconServiceListener : uses
Class diagram for VehiclePicker Vue componentclassDiagram
class VehiclePicker {
+expanded: boolean
+loading: boolean
+error: string|null
+availableVehicles: Vehicle[]
+toggleDropdown()
+fetchDiscoveredServices()
+refreshServices()
+navigateToVehicle(ip)
+allMyIps: string[] (computed)
}
class Vehicle {
+ips: string[]
+hostname: string
+imagePath: string
}
VehiclePicker o-- Vehicle : manages
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Helps manage multiple vehicles on the same network. requires that the vehicles are able to see each other
Screen.Recording.2025-08-30.at.18.28.53.mov
Summary by Sourcery
Enable automatic discovery of other vehicles on the local network via mDNS in the backend and add a front-end widget for listing and navigating to those vehicles
New Features:
Enhancements: