From cd11a16e15f0e31b61e3985e5c805bfbdfc096eb Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Thu, 23 Nov 2023 16:33:35 -0300 Subject: [PATCH 1/3] Add suggestion in the README to install `bun` following their docs --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9a602d13f..1f6450cf3 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,11 @@ An intuitive and customizable cross-platform ground control station for remote v # Development -Cockpit is typically installed as an Electron application or BlueOS Extension, but for development purposes it is valuable to run it locally. To do so, you can install the dependencies with: +Cockpit is typically installed as an Electron application or BlueOS Extension, but for development purposes it is valuable to run it locally. + +To do so, you should first [install bun](https://bun.sh/docs/installation). We really recomend following their documented instructions, as it was already reported by some that installing `bun` from alternatives like Snap has not worked properly. + +With `bun` installed, you can enter the repository folder and follow the steps below: ``` bun install From 88e8e9d7691aeb957577f0d546a4d2ecf28f79d2 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Thu, 23 Nov 2023 17:16:26 -0300 Subject: [PATCH 2/3] Add details in the README on how to install and connect to backend providers --- README.md | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f6450cf3..75f76241d 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ An intuitive and customizable cross-platform ground control station for remote v # Development +## Installing Cockpit Cockpit is typically installed as an Electron application or BlueOS Extension, but for development purposes it is valuable to run it locally. To do so, you should first [install bun](https://bun.sh/docs/installation). We really recomend following their documented instructions, as it was already reported by some that installing `bun` from alternatives like Snap has not worked properly. @@ -24,4 +25,26 @@ and then run the server locally with: bun run dev --host ``` -Then you should see a prompt with the local IP and port that can be accessed through a browser, such as `localhost:5173`. \ No newline at end of file +Then you should see a prompt with the local IP and port that can be accessed through a browser, such as `localhost:5173`. + +## Installing backend providers + +Cockpit is currently a frontend-only application. That means it relies on data offered by other backend solutions, which are not built-in. + +If you have a [BlueOS](https://github.com/bluerobotics/BlueOS) instance running, there's no need to install any backend, as BlueOS already provides everything. + +If that's not your case and you want to install the necessary backends, follow the instructions below: + +1. Install a MAVLink router. We recommend [mavp2p](https://github.com/bluenviron/mavp2p) or [MAVLink Router](https://github.com/mavlink-router/mavlink-router). +2. Run the MAVLink router, connecting it to your vehicle or [SITL instance](https://ardupilot.org/dev/docs/sitl-simulator-software-in-the-loop.html). +3. Install [mavlink2rest](https://github.com/mavlink/mavlink2rest). +4. Run `mavlink2rest`, pointing it to the endpoint provided by the MAVLink router. Remember to serve the API over the 6040 port by running it with `--server 0.0.0.0:6040`. +5. [Optional] If you want to work with video streaming, install [Mavlink Camera Manager](https://github.com/mavlink/mavlink-camera-manager). + +## Connecting to your vehicle + +Follow the instructions provided [here](https://docs.bluerobotics.com/ardusub-zola/software/control-station/Cockpit-0.0/advanced-usage/#general) to connect Cockpit to your vehicle. + +If you're serving `mavlink2rest` and `mavlink-camera-manager` in the same machine as Cockpit, you can just use `127.0.0.1` as your "Global vehicle address" and everything should work. + + From 828f21182e4854371a2e8600d4afdd391c52bc52 Mon Sep 17 00:00:00 2001 From: Rafael Araujo Lehmkuhl Date: Thu, 23 Nov 2023 18:35:11 -0300 Subject: [PATCH 3/3] Add specific instructions on `mavlink2rest` and `mavlink-camera-manager` connection to README. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 75f76241d..5c4211165 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,8 @@ If that's not your case and you want to install the necessary backends, follow t Follow the instructions provided [here](https://docs.bluerobotics.com/ardusub-zola/software/control-station/Cockpit-0.0/advanced-usage/#general) to connect Cockpit to your vehicle. -If you're serving `mavlink2rest` and `mavlink-camera-manager` in the same machine as Cockpit, you can just use `127.0.0.1` as your "Global vehicle address" and everything should work. +If you're running a BlueOS instance, just put the IP address of it in "Global vehicle address" and click the "apply" button. +If you're serving `mavlink2rest` in the same machine as Cockpit, activate the checkmark for "Mavlink2Rest connection" and use `ws://127.0.0.1:6040/v1/ws/mavlink` there (if you're running a mavlink2rest version before 0.11.15, omit the `/v1` in the URL). +If you're serving `mavlink-camera-manager` in the same machine as Cockpit, activate the checkmark for "WebRTC connection" and use `ws://127.0.0.1:6020` there.