Skip to content

Commit

Permalink
Add rather ugly view of multi tag solution
Browse files Browse the repository at this point in the history
  • Loading branch information
mcm001 committed Oct 1, 2023
1 parent fdcad62 commit 34479ce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
7 changes: 4 additions & 3 deletions photon-client/src/components/dashboard/tabs/TargetsTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { useStateStore } from "@/stores/StateStore";
<template #default>
<thead style="font-size: 1.25rem">
<tr>
<th class="text-center">Target Count</th>
<th
v-if="
useCameraSettingsStore().currentPipelineType === PipelineType.AprilTag ||
Expand Down Expand Up @@ -45,7 +44,6 @@ import { useStateStore } from "@/stores/StateStore";
</thead>
<tbody>
<tr v-for="(target, index) in useStateStore().currentPipelineResults?.targets" :key="index">
<td>{{ index }}</td>
<td
v-if="
useCameraSettingsStore().currentPipelineType === PipelineType.AprilTag ||
Expand All @@ -63,7 +61,7 @@ import { useStateStore } from "@/stores/StateStore";
<template v-else-if="useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled">
<td>{{ target.pose?.x.toFixed(2) }}&nbsp;m</td>
<td>{{ target.pose?.y.toFixed(2) }}&nbsp;m</td>
<td>{{ ((target.pose?.angle_z * 180.0) / Math.PI).toFixed(2) }}&deg;</td>
<td>{{ (((target.pose?.angle_z || 0) * 180.0) / Math.PI).toFixed(2) }}&deg;</td>
</template>
<template
v-if="
Expand All @@ -78,6 +76,9 @@ import { useStateStore } from "@/stores/StateStore";
</template>
</v-simple-table>
</v-row>
<p class="white--text">
Estimated multi-tag pose: {{ useStateStore().currentPipelineResults?.multitagResult }}
</p>
</div>
</template>
Expand Down
14 changes: 8 additions & 6 deletions photon-client/src/types/PhotonTrackingTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ export interface Transform3d {
angle_z: number;
}

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

export interface AprilTagFieldLayout {
field: {
length: number;
Expand All @@ -23,12 +30,7 @@ export interface AprilTagFieldLayout {
z: number;
};
rotation: {
quaternion: {
X: number;
Y: number;
Z: number;
W: number;
};
quaternion: Quaternion;
};
};
}[];
Expand Down
2 changes: 2 additions & 0 deletions photon-client/src/views/GeneralSettingsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import DeviceControlCard from "@/components/settings/DeviceControlCard.vue";
import NetworkingCard from "@/components/settings/NetworkingCard.vue";
import LightingControlCard from "@/components/settings/LEDControlCard.vue";
import { useSettingsStore } from "@/stores/settings/GeneralSettingsStore";
import ApriltagControlCard from "@/components/settings/ApriltagControlCard.vue";
</script>

<template>
Expand All @@ -12,5 +13,6 @@ import { useSettingsStore } from "@/stores/settings/GeneralSettingsStore";
<DeviceControlCard />
<NetworkingCard />
<LightingControlCard v-if="useSettingsStore().lighting.supported" />
<ApriltagControlCard />
</div>
</template>

0 comments on commit 34479ce

Please sign in to comment.