diff --git a/photon-client/src/stores/settings/CameraSettingsStore.ts b/photon-client/src/stores/settings/CameraSettingsStore.ts index e47489f1af..968f3eea1d 100644 --- a/photon-client/src/stores/settings/CameraSettingsStore.ts +++ b/photon-client/src/stores/settings/CameraSettingsStore.ts @@ -3,7 +3,6 @@ import type { CalibrationBoardTypes, CameraSettings, ConfigurableCameraSettings, - Resolution, RobotOffsetType, VideoFormat } from "@/types/SettingTypes"; diff --git a/photon-client/src/types/PhotonTrackingTypes.ts b/photon-client/src/types/PhotonTrackingTypes.ts index c5589dc0ab..4ba79ad2d6 100644 --- a/photon-client/src/types/PhotonTrackingTypes.ts +++ b/photon-client/src/types/PhotonTrackingTypes.ts @@ -1,3 +1,26 @@ +export interface Quaternion { + X: number; + Y: number; + Z: number; + W: number; +} + +export interface Translation3d { + x: number + y: number + z: number +} + +export interface Rotation3d { + quaternion: Quaternion +} + +export interface Pose3d { + translation: Translation3d, + rotation: Rotation3d +} + +// TODO update backend to serialize this using correct layout export interface Transform3d { x: number; y: number; @@ -11,13 +34,6 @@ export interface Transform3d { angle_z: number; } -export interface Quaternion { - X: number; - Y: number; - Z: number; - W: number; -} - export interface AprilTagFieldLayout { field: { length: number; @@ -25,16 +41,7 @@ export interface AprilTagFieldLayout { }; tags: { ID: number; - pose: { - translation: { - x: number; - y: number; - z: number; - }; - rotation: { - quaternion: Quaternion; - }; - }; + pose: Pose3d; }[]; } diff --git a/photon-client/src/types/SettingTypes.ts b/photon-client/src/types/SettingTypes.ts index a8f59782f2..3db2d3f043 100644 --- a/photon-client/src/types/SettingTypes.ts +++ b/photon-client/src/types/SettingTypes.ts @@ -1,4 +1,5 @@ import { type ActivePipelineSettings, DefaultAprilTagPipelineSettings } from "@/types/PipelineTypes"; +import type { Pose3d } from "@/types/PhotonTrackingTypes"; export interface GeneralSettings { version?: string; @@ -107,11 +108,6 @@ export interface CvPoint { y: number; } -export interface Pose3d { - translation: { x: number; y: number; z: number }; - rotation: { quaternion: { W: number; X: number; Y: number; Z: number } }; -} - export interface BoardObservation { locationInObjectSpace: CvPoint3[]; locationInImageSpace: CvPoint[];