mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-29 02:21:41 +00:00
Disable 3d mode for OD (#2121)
## Description There isn't anything that 3D mode adds for OD, and the results are typically messed up. Thus, we disable 3D mode when we're using an OD pipeline. ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added
This commit is contained in:
@@ -3,6 +3,7 @@ import { computed } from "vue";
|
||||
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
|
||||
import { useStateStore } from "@/stores/StateStore";
|
||||
import { useTheme } from "vuetify";
|
||||
import { PipelineType } from "@/types/PipelineTypes";
|
||||
|
||||
const theme = useTheme();
|
||||
|
||||
@@ -43,7 +44,10 @@ const processingMode = computed<number>({
|
||||
<v-btn
|
||||
color="buttonPassive"
|
||||
:disabled="
|
||||
!useCameraSettingsStore().hasConnected || !useCameraSettingsStore().isCurrentVideoFormatCalibrated
|
||||
!useCameraSettingsStore().hasConnected ||
|
||||
!useCameraSettingsStore().isCurrentVideoFormatCalibrated ||
|
||||
useCameraSettingsStore().currentPipelineSettings.pipelineType == PipelineType.ObjectDetection ||
|
||||
useCameraSettingsStore().currentPipelineSettings.pipelineType == PipelineType.ColoredShape
|
||||
"
|
||||
:variant="theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
|
||||
class="w-50"
|
||||
|
||||
@@ -488,6 +488,16 @@ public class PipelineManager {
|
||||
// Skip fields that are annotated with SuppressSettingCopy
|
||||
continue;
|
||||
}
|
||||
|
||||
// Object detection doesn't support 3D mode, so we gotta make sure that gets
|
||||
// turned off when we switch from a pipeline that had 3D mode enabled.
|
||||
if ((newType == PipelineType.ObjectDetection.baseIndex
|
||||
|| newType == PipelineType.ColoredShape.baseIndex)
|
||||
&& field.getName().equals("solvePNPEnabled")) {
|
||||
field.set(newSettings, false);
|
||||
continue;
|
||||
}
|
||||
|
||||
Object value = field.get(oldSettings);
|
||||
logger.debug("setting " + field.getName() + " to " + value);
|
||||
field.set(newSettings, value);
|
||||
|
||||
Reference in New Issue
Block a user