![]() |
CloudTwin
ROS2 Humble
Digital twin for path and trajectory optimisation
|
This page explains who connects to what, on which IP and port, across the whole DRYVbot system. It exists because the project has two independent machines (or roles) that are easy to confuse:
A third, optional interface — Foxglove : is a technical IHM with its own purpose (live 3D visualisation and topic inspection). It talks to ROS directly and is independent from the web app.
For the underlying digital-twin concept and feedback loop, see architecture.md. For the navigation logic nodes behind the WebSocket commands, see navigation_logic.md. For the delivery optimizer that decides the order of commands, see delivery_optimization.md.
If everything runs on a single machine, every <..._IP> below is simply localhost / 127.0.0.1. On a real multi-machine LAN, replace each placeholder with the LAN IP of the machine that opens that port.
These servers are started by the ROS launch files. Everything that is not on the ROS machine connects to these.
| Service | Port | Protocol | Opened by | Who connects | Purpose |
|---|---|---|---|---|---|
| WebSocket command bridge | 9090 | ws:// | ws_command_bridge node (in logic.launch.py) | Laravel web app, standalone Python client | Sendroom_command / list_rooms / get_status; receive ack / status / feedback. This is the bridge that lets a non-ROS computer drive and observe the robot. |
| Foxglove bridge | 8765 | ws:// | foxglove_bridge (in hospital.launch.py / simulation.launch.py) | Foxglove Studio (app.foxglove.dev or desktop) | Stream all ROS 2 topics for live 3D visualisation and the Room Command panel. |
| Prediction microservice | 8001 | http:// | LightGBM service (separate Python process, can live on its own host) | Laravel web app | POST /predict → returns predicted_duration_s for the delivery optimizer. |
Notes:
9090 is configurable with the ws_port launch argument, and the bridge can be disabled entirely:ws://<ROS_MACHINE_IP>:9090 without ROS installed. On connect, the server immediately pushes the current navigation state. See the WebSocket message contract in the README ("Websocket for communication…").http://172.30.0.20:8001 (env PREDICTION_SERVICE_URL). It may run on the digital twin computer, the web app computer, or a dedicated host.Started together by composer run dev (which start.sh launches in the background).
| Service | Port | Protocol | Process | Who connects | Purpose |
|---|---|---|---|---|---|
| Laravel HTTP | 8000 | http:// | php artisan serve | Manager & pharmacy browsers | The dashboard UI — openhttp://<WEBAPP_IP>:8000 to log in and create / supervise deliveries. |
| Laravel Reverb | 8080 | ws:// | php artisan reverb:start | The same browser (vialaravel-echo + pusher-js) | Pushes real-time UI updates (order status, optimised sequence) to the open page. |
| Vite dev server | 5173 | http:// | npm run dev | The browser (dev builds only) | Hot-module reload for the React front end during development. |
Notes:
REVERB_PORT (.env, default 8080); the browser client uses VITE_REVERB_HOST / VITE_REVERB_PORT. On a multi-machine setup these must point at the web app computer's LAN IP, not 127.0.0.1, or the browser cannot reach Reverb.8000 and 8080 are the Laravel side. Don't confuse Reverb's 8080 with the ROS bridge's 9090 — they are different WebSocket servers for different jobs (UI fan-out vs. robot commands).The Laravel app is a client of the ROS machine. Two outbound connections, both configured in the web app's .env:
| From | To | Setting | Default | Purpose |
|---|---|---|---|---|
| Laravel app | ws://<ROS_IP>:9090 | DT_SOCKET_ADDRESS | ws://127.0.0.1:9090 | Send orderedroom_commands to the robot and observe status events for re-planning. |
| Laravel app | http://<PRED_IP>:8001 | PREDICTION_SERVICE_URL | http://172.30.0.20:8001 | Ask the LightGBM model for predicted travel time between two rooms. |
The ROS machine's address is also editable from the dashboard under Settings → Connection. If ROS runs on another computer, set DT_SOCKET_ADDRESS=ws://<that computer's LAN IP>:9090.
Foxglove is not the manager/pharmacy interface. It is a separate technical tool for inspecting the running ROS system (3D scene, costmaps, topics) and for the custom Room Command panel.
| Step | Connection |
|---|---|
| Open the client | https://app.foxglove.dev (browser) or the desktop app |
| Connect to the robot | ws://<ROS_IP>:8765 (localhost if on the same machine) |
Foxglove talks only to the ROS machine (port 8765). It does not go through Laravel, Reverb, or the prediction service. See foxglove.md for the panel layout and topic visualisation.
| Actor | Opens (in a browser / client) | Reaches | On |
|---|---|---|---|
| Manager / Pharmacy | http://<WEBAPP_IP>:8000 | Laravel dashboard | Web app computer |
| Manager / Pharmacy (automatic) | ws://<WEBAPP_IP>:8080 | Reverb live updates | Web app computer |
| Web app (server-side) | ws://<ROS_IP>:9090 | ROS command bridge | Digital twin computer |
| Web app (server-side) | http://<PRED_IP>:8001 | LightGBM prediction | Prediction host |
| Technical user (Foxglove) | ws://<ROS_IP>:8765 | ROS Foxglove bridge | Digital twin computer |
| Developer / script | ws://<ROS_IP>:9090 | ROS command bridge | Digital twin computer |
Rule of thumb:
8000 (dashboard) and 8080 (live updates).9090 (commands, for non-ROS clients) and 8765 (Foxglove visualisation).8001** prediction service is an internal HTTP dependency of the web app only — no human opens it directly.| Placeholder | Single machine | Multi-machine |
|---|---|---|
<ROS_IP> | localhost | LAN IP of the digital twin computer |
<WEBAPP_IP> | localhost | LAN IP of the web app computer |
<PRED_IP> | localhost | LAN IP of the prediction host (often172.30.0.20) |
On a single demo machine you can leave all the defaults (localhost / 127.0.0.1) and nothing needs changing. On a LAN, edit the web app's .env (DT_SOCKET_ADDRESS, PREDICTION_SERVICE_URL, REVERB_HOST / VITE_REVERB_HOST) so each placeholder resolves to the correct machine.