From 4366d227d662a571da3522d8958ed2e7724f5927 Mon Sep 17 00:00:00 2001 From: Sindre Hansen Date: Mon, 2 Sep 2024 11:37:25 +0200 Subject: [PATCH] Update Foxglove docs --- docs/foxglove-bridge.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/foxglove-bridge.md b/docs/foxglove-bridge.md index 2605eb72..e8ef9703 100644 --- a/docs/foxglove-bridge.md +++ b/docs/foxglove-bridge.md @@ -3,11 +3,13 @@ With some simple steps you can visualize live sensor data from the drone in Foxg 1. Download foxglove [here](https://foxglove.dev/download) and create an account. 2. Power on the drone and connect your computer to the Blueye wifi. -3. Run `pip install foxglove_websocket` in your pyenv. -4. In the examples folder you simply run the foxglove_bridge_ws.py. +3. Run `pip install "blueye.sdk[examples]"` to get the necessary dependencies, if you have not done so already. +4. Clone the [blueye.sdk repository](https://github.com/BluEye-Robotics/blueye.sdk) to get the examples, or copy the script below into a file. In the examples folder you simply run `python foxglove_bridge_ws.py` to start the bridge. 5. Open foxglove and open a new `Foxglove WebSocket` connection and leave it on default (`ws://localhost:8765`). 6. Add panel, Raw message, or Plot and select the topic you want to display. -How it works. The `foxglove_bridge_ws.py` script is using the Blueye SDK to subscribe to the drone telemetry messages with `ZeroMQ`. Then the foxglove websocket server is forwarding the protobuf messages so they can be subscribed to in the `Foxglove GUI`. +### How it works + The script below uses the Blueye SDK to subscribe to the drone telemetry messages with `ZeroMQ`. Then the foxglove websocket server is forwarding the protobuf messages so they can be subscribed to in the `Foxglove GUI`. -View the script here: [foxglove_bridge_ws.py](../examples/foxglove_bridge_ws.py) +### Example of a websocket bridge +{{code_from_file("../examples/foxglove_bridge_ws.py", "python")}}