Skip to content

Commit

Permalink
typing nit
Browse files Browse the repository at this point in the history
  • Loading branch information
srimanachanta committed Dec 30, 2023
1 parent db73bbb commit e27f776
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
1 change: 0 additions & 1 deletion photon-client/src/stores/settings/CameraSettingsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import type {
CalibrationBoardTypes,
CameraSettings,
ConfigurableCameraSettings,
Resolution,
RobotOffsetType,
VideoFormat
} from "@/types/SettingTypes";
Expand Down
41 changes: 24 additions & 17 deletions photon-client/src/types/PhotonTrackingTypes.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -11,30 +34,14 @@ export interface Transform3d {
angle_z: number;
}

export interface Quaternion {
X: number;
Y: number;
Z: number;
W: number;
}

export interface AprilTagFieldLayout {
field: {
length: number;
width: number;
};
tags: {
ID: number;
pose: {
translation: {
x: number;
y: number;
z: number;
};
rotation: {
quaternion: Quaternion;
};
};
pose: Pose3d;
}[];
}

Expand Down
6 changes: 1 addition & 5 deletions photon-client/src/types/SettingTypes.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { type ActivePipelineSettings, DefaultAprilTagPipelineSettings } from "@/types/PipelineTypes";
import type { Pose3d } from "@/types/PhotonTrackingTypes";

export interface GeneralSettings {
version?: string;
Expand Down Expand Up @@ -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[];
Expand Down

0 comments on commit e27f776

Please sign in to comment.