From a73483efa9126286aa8ffb4d898547700b0429cc Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Wed, 19 Feb 2025 15:01:04 -0300 Subject: [PATCH 01/56] vehicle-setup: disable calibrate button if vehicle has no position available The reasoning here is that without a position, the WMM cannot be used, resulting in a worse calibration. This does NOT require a gps or dvl, there's a UI for setting a rough position estimate we can rely on. --- .../configuration/compass/FullCompassCalibrator.vue | 2 +- .../configuration/compass/LargeVehicleCompassCalibrator.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue index a5a947d6d1..60058909cf 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/FullCompassCalibrator.vue @@ -81,7 +81,7 @@ Calibrate diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue index 9d63f24f92..1bfb62084d 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/LargeVehicleCompassCalibrator.vue @@ -33,7 +33,7 @@ - + Calibrate From 9de77088a17a2e5d8ddb0185e5702dd70b45635f Mon Sep 17 00:00:00 2001 From: ES-Alexander Date: Tue, 15 Apr 2025 03:46:11 +1000 Subject: [PATCH 02/56] core: frontend: vehicle-setup: GenericViewer.vue: fix typo --- .../src/components/vehiclesetup/viewers/GenericViewer.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue b/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue index 7b26aeaf5b..b49c1b0e89 100755 --- a/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue +++ b/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue @@ -272,7 +272,7 @@ export default Vue.extend({ async model_path() { this.reloadAnnotations() this.model_override_path = await this.checkModelOverrides() - this.override_annotations = await this.loadAnottationsOverride() + this.override_annotations = await this.loadAnnotationsOverride() this.forceRefreshAnnotations() }, frame_type() { @@ -309,7 +309,7 @@ export default Vue.extend({ this.hideIrrelevantParts() }) this.model_override_path = await this.checkModelOverrides() - this.override_annotations = await this.loadAnottationsOverride() + this.override_annotations = await this.loadAnnotationsOverride() this.reloadAnnotations() }, methods: { @@ -380,7 +380,7 @@ export default Vue.extend({ } return undefined }, - async loadAnottationsOverride(): Promise> { + async loadAnnotationsOverride(): Promise> { if (!this.model_override_path) { return {} } From 2ae6e2580cd71d74b7e816fcb761d07c2957cb2a Mon Sep 17 00:00:00 2001 From: ES-Alexander Date: Tue, 15 Apr 2025 03:51:41 +1000 Subject: [PATCH 03/56] core: frontend: vehicle-setup: camera: improve descriptions --- .../vehiclesetup/configuration/camera.vue | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/core/frontend/src/components/vehiclesetup/configuration/camera.vue b/core/frontend/src/components/vehiclesetup/configuration/camera.vue index 4dfacd66db..cb88592c7e 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/camera.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/camera.vue @@ -8,8 +8,8 @@

- Camera mount setup is not supported on this Firmware (MNT1_TYPE param not found). - please update to a newer version. + Camera mount setup is not supported on this firmware (MNT1_TYPE param not found). + Please update to a newer autopilot firmware version.

- Mount is disabled. Enable it by setting the 'Gimbal Type' to 'Servo' + Mount is disabled. Enable it by setting the 'Gimbal Type' to 'Servo'.

@@ -52,7 +52,7 @@

- To find the physical limites of the servo, move the camera to the minimum and maximum positions, + To find the physical limits of the servo, move the camera to the minimum and maximum positions, then adjust the minimum/maximum PWMs values until it reaches the furthest it can move without hitting other components.

@@ -91,8 +91,9 @@

- Measure the found limits and input them below. - This will allow Ardupilot to know how to convert PWM to angle. + Measure the rotation limit angles and input them below. + This will allow Ardupilot to accurately report the camera rotation angle + from its commanded servo PWM value.

Calculated PWM/degree: {{ pwm_per_deg.toFixed(2) }}

- This represents how much the PWM value changes per degree. use this to + This represents how much the PWM value changes per degree. Use this to verify against your servo specs. One that reaches +-45º with 1100-1900 PWM (all current BlueRobotics servos), - has a ratio of 8.88us per degree. + has a ratio of 8.88µs per degree. This can help you make sure you measured the angles correctly.

From 49059cbfc1548b465494a800af8a9518ceb79bef Mon Sep 17 00:00:00 2001 From: ES-Alexander Date: Thu, 24 Apr 2025 15:48:32 +1000 Subject: [PATCH 04/56] core: frontend: vehicle-setup: lights: improve descriptions --- .../src/components/vehiclesetup/configuration/lights.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/frontend/src/components/vehiclesetup/configuration/lights.vue b/core/frontend/src/components/vehiclesetup/configuration/lights.vue index 8fceb64f65..1397d78389 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/lights.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/lights.vue @@ -3,7 +3,7 @@ Lights 1 (RCIN9) - Here you can configure what pin outputs the signal for the first set of lights. + The output pin for the primary set of lights: Lights 2 (RCIN10) - What pin outputs the signal for the second set of lights. + The output pin for the secondary set of lights: Joystick steps - How many button presses it takes to go from 0% to 100% brightness. + Number of button presses to step from 0% to 100% brightness:
{{ light_steps?.value }} steps result in a {{ (100 / light_steps?.value).toFixed(1) }}% increase per button press. From 8a0384c8e18cde0dcc1d3ca196bf92c0e18a8a3c Mon Sep 17 00:00:00 2001 From: ES-Alexander Date: Thu, 24 Apr 2025 16:34:06 +1000 Subject: [PATCH 05/56] core: frontend: vehicle-setup: compass: improve descriptions --- .../compass/ArdupilotMavlinkCompassSetup.vue | 37 ++++++++++--------- .../configuration/compass/CompassLearn.vue | 6 +-- .../compass/FullCompassCalibrator.vue | 12 +++--- .../compass/LargeVehicleCompassCalibrator.vue | 2 +- 4 files changed, 29 insertions(+), 28 deletions(-) diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue index 7bd442b135..ea20328104 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/ArdupilotMavlinkCompassSetup.vue @@ -38,9 +38,8 @@

- This does a full calibration of the compasses. - It requires you to spin the vehicle around manually multiple times. - You need to move the vehicle around in all 3 axis. + Perform a full calibration of the selected compass(es) by manually spinning + the vehicle around multiple times, about all 3 rotation axes.

@@ -51,10 +50,9 @@

- This does a "quick" calibration of your compass. - You need to point your vehicle North,and then click the button. - This results in a much less accurate calibration, but is also much faster. - It can be a good starting point for calibration, followed by CompassLearn. + Perform a quick, low-accuracy calibration of the compass(es) by pointing + your vehicle North, then clicking the Calibrate button. + It can be a good starting point for calibration, followed by Compass Learn.

@@ -66,9 +64,9 @@

- This allows automatic "calibration" of compass offsets. You need to have a valid world position. - In order to use this option, click the following button and then drive the vehicle around until - you see the message "CompassLearn: finished" + Automatically "learn" compass calibration offsets by driving the vehicle around until + enough data has been collected, and "CompassLearn: finished" is displayed. + A valid global region estimate is required.

@@ -79,11 +77,14 @@

- This used logs from previous flights to calibrate the compasses. + Calibrate the compass(es) using a previous flight log. This usually gives the best results. - While it is not currently implemented here. It can be done either in - Ardupilot WebTools and - LogViewer. + While it is not currently implemented here, the compass offset information can be + determined in the Log Browser page. Press the green play button on a log file, + click the three vertical dots in the sidebar, open the Mag Fit Tool, + specify the general global region where the log was created, then click "Fit" + for each compass you wish to calibrate. Resulting values can be copied across to + the COMPASS_* autopilot parameters.

@@ -122,8 +123,8 @@ - To change the order of the compasses, drag them up and down in this list using the drag handler. - This Operation requires an autopilot restart. + Click-and-drag the dots to change the priority of the compass options. + Adjusted compass priorities are applied once the autopilot restarts.
- This Compass is not in use, move it higher in the list in order to be able to use it + This Compass is not in use, drag it higher (by the dots) to be able to use it.
External/Internal: @@ -371,7 +372,7 @@ export default Vue.extend({ calibration: CalibrationType.FULL_NO_WMM, color: 'var(--v-warning-darken1)', alert: 'warning', - description: 'Calibrated, but without a known (detected or specified) global position, ' + description: 'Calibrated, but without a known (detected or specified) global region, ' + 'so no corrections were applied from the internal World Magnetic Model (WMM). ' + 'Consider retrying with a valid position to improve compass performance.', calibration_short: 'Calibrated (No WMM)', diff --git a/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue b/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue index 87382c3666..e917671f33 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/compass/CompassLearn.vue @@ -22,12 +22,12 @@ Compass Calibration Learning - A valid position is required for Compass Learn to estimate the local world magnetic field. + A valid global region is required for Compass Learn to estimate the local world magnetic field. - Make sure you have a valid position, then click start and drive the vehicle around in - manual mode until you see the message "CompassLearn: finished" + Make sure you have a valid region/position specified, then click start and drive the vehicle around + in manual mode until you see the message "CompassLearn: finished".

- Onboard Compass Calibration is the regular calibration used - for Ardupilot vehicles. - It requires you to spin the vehicle aroung all axis, which allows it to calibrated the + Onboard Compass Calibration is the regular calibration used + for ArduPilot vehicles. + It requires spinning the vehicle around all axes, which allows it to calibrate the readings to the expected local magnetic field.

- A Valid position is recomended for Onboard Calibration to estimate the - local world magnetic field. + A valid global region/position is recomended for Onboard Calibration to + estimate the local world magnetic field.

- Spin your vehicle around all of its axis until the progress bar completes. + Spin your vehicle around all of its axes until the progress bar completes. - A Valid position is required for Compass Learn to estimate the local world magnetic field. + A valid global region/position is required to estimate the local world magnetic field. From 63615170762b87f359ef9c54494f01b25f7fed5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 1 May 2025 09:11:03 -0300 Subject: [PATCH 06/56] frontend: vehiclesetup: GenericViewer: Add props for camera control and orientation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .../vehiclesetup/viewers/GenericViewer.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue b/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue index b49c1b0e89..eb4be9121e 100755 --- a/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue +++ b/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue @@ -6,7 +6,8 @@ ref="modelviewer" :src="model_override_path || model_path" :auto-rotate="autorotate" - camera-controls + :camera-controls="cameracontrols" + :orientation="orientation" shadow-intensity="0.3" interaction-prompt="none" > @@ -105,6 +106,16 @@ export default Vue.extend({ name: 'GenericViewer', components: { SpinningLogo }, props: { + cameracontrols: { + type: Boolean, + required: false, + default: true, + }, + orientation: { + type: String, + required: false, + default: '0deg 0deg 0deg', + }, transparent: { type: Boolean, required: false, From 2a5cfdfc25494b6f6d0e854de75a3f8128131939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Thu, 1 May 2025 09:11:53 -0300 Subject: [PATCH 07/56] frontend: vehiclesetup: configuration: accelerometer: FullAccelerometerCalibration: Add vehicle orientation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Patrick José Pereira --- .../FullAccelerometerCalibration.vue | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue index 4e3dc38c72..cbd3295ad4 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/accelerometer/FullAccelerometerCalibration.vue @@ -33,6 +33,12 @@ > {{ current_state_text }}
+ Start Calibration @@ -50,6 +56,7 @@ + + diff --git a/core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue b/core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue new file mode 100644 index 0000000000..6e80119e4d --- /dev/null +++ b/core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue @@ -0,0 +1,95 @@ + + + diff --git a/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue b/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue index 61bc01ccec..dd576d5e54 100755 --- a/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue +++ b/core/frontend/src/components/vehiclesetup/viewers/GenericViewer.vue @@ -86,7 +86,9 @@ import { import { Dictionary, Indexed, Keyed } from '@/types/common' import { PingType } from '@/types/ping' -import { checkModelOverrides, frame_name, get_model, vehicle_folder } from './modelHelper' +import { + checkModelOverrides, frame_name, get_model, vehicle_folder, +} from './modelHelper' const models: Record = import.meta.glob('/public/assets/vehicles/models/**', { eager: true }) From 5de8f867c4c3da5d51568fd639dbd59588d62114 Mon Sep 17 00:00:00 2001 From: Willian Galvani Date: Tue, 20 May 2025 16:46:49 -0300 Subject: [PATCH 18/56] VehicleSetup: create and use FrameSelector --- .../components/vehiclesetup/SetupOverview.vue | 4 + .../ArdupilotVehicleBodySetup.vue | 29 +++- .../configuration/FrameSelector.vue | 134 ++++++++++++++++++ 3 files changed, 162 insertions(+), 5 deletions(-) create mode 100644 core/frontend/src/components/vehiclesetup/configuration/FrameSelector.vue diff --git a/core/frontend/src/components/vehiclesetup/SetupOverview.vue b/core/frontend/src/components/vehiclesetup/SetupOverview.vue index 2577e9d3c9..1055ffe7c1 100755 --- a/core/frontend/src/components/vehiclesetup/SetupOverview.vue +++ b/core/frontend/src/components/vehiclesetup/SetupOverview.vue @@ -10,6 +10,10 @@ :highlight="highlight" noannotations :autorotate="true" + :style="{ + height: '500px', + width: '100%', + }" />
diff --git a/core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue b/core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue index 6e80119e4d..931e678faa 100644 --- a/core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue +++ b/core/frontend/src/components/vehiclesetup/configuration/ArdupilotVehicleBodySetup.vue @@ -1,15 +1,14 @@