2023-08-21 01:51:35 -04:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
|
|
|
|
|
import { PipelineType } from "@/types/PipelineTypes";
|
|
|
|
|
import { useStateStore } from "@/stores/StateStore";
|
2023-10-21 11:09:55 -04:00
|
|
|
|
|
|
|
|
const currentPipelineSettings = useCameraSettingsStore().currentPipelineSettings;
|
2023-08-21 01:51:35 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
2023-08-31 16:56:58 -04:00
|
|
|
<v-row align="start" class="pb-4" style="height: 300px">
|
2023-08-21 01:51:35 -04:00
|
|
|
<!-- Simple table height must be set here and in the CSS for the fixed-header to work -->
|
2023-10-17 10:20:00 -04:00
|
|
|
<v-simple-table fixed-header dense dark>
|
2023-08-21 01:51:35 -04:00
|
|
|
<template #default>
|
2023-08-31 16:56:58 -04:00
|
|
|
<thead style="font-size: 1.25rem">
|
2023-08-21 01:51:35 -04:00
|
|
|
<tr>
|
|
|
|
|
<th
|
2023-08-31 16:56:58 -04:00
|
|
|
v-if="
|
|
|
|
|
useCameraSettingsStore().currentPipelineType === PipelineType.AprilTag ||
|
|
|
|
|
useCameraSettingsStore().currentPipelineType === PipelineType.Aruco
|
|
|
|
|
"
|
2023-08-21 01:51:35 -04:00
|
|
|
class="text-center"
|
|
|
|
|
>
|
|
|
|
|
Fiducial ID
|
|
|
|
|
</th>
|
|
|
|
|
<template v-if="!useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled">
|
2023-08-31 16:56:58 -04:00
|
|
|
<th class="text-center">Pitch θ°</th>
|
|
|
|
|
<th class="text-center">Yaw θ°</th>
|
|
|
|
|
<th class="text-center">Skew θ°</th>
|
|
|
|
|
<th class="text-center">Area %</th>
|
2023-08-21 01:51:35 -04:00
|
|
|
</template>
|
|
|
|
|
<template v-else>
|
2023-08-31 16:56:58 -04:00
|
|
|
<th class="text-center">X meters</th>
|
|
|
|
|
<th class="text-center">Y meters</th>
|
|
|
|
|
<th class="text-center">Z Angle θ°</th>
|
2023-08-21 01:51:35 -04:00
|
|
|
</template>
|
2023-08-31 16:56:58 -04:00
|
|
|
<template
|
|
|
|
|
v-if="
|
2023-10-24 19:39:38 -07:00
|
|
|
(useCameraSettingsStore().currentPipelineType === PipelineType.AprilTag ||
|
|
|
|
|
useCameraSettingsStore().currentPipelineType === PipelineType.Aruco) &&
|
2023-08-31 16:56:58 -04:00
|
|
|
useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled
|
|
|
|
|
"
|
|
|
|
|
>
|
|
|
|
|
<th class="text-center">Ambiguity %</th>
|
2023-08-21 01:51:35 -04:00
|
|
|
</template>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
2023-10-17 10:20:00 -04:00
|
|
|
<tr v-for="(target, index) in useStateStore().currentPipelineResults?.targets" :key="index">
|
2023-08-31 16:56:58 -04:00
|
|
|
<td
|
|
|
|
|
v-if="
|
|
|
|
|
useCameraSettingsStore().currentPipelineType === PipelineType.AprilTag ||
|
|
|
|
|
useCameraSettingsStore().currentPipelineType === PipelineType.Aruco
|
|
|
|
|
"
|
|
|
|
|
>
|
2023-08-21 01:51:35 -04:00
|
|
|
{{ target.fiducialId }}
|
|
|
|
|
</td>
|
|
|
|
|
<template v-if="!useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled">
|
|
|
|
|
<td>{{ target.pitch.toFixed(2) }}°</td>
|
|
|
|
|
<td>{{ target.yaw.toFixed(2) }}°</td>
|
|
|
|
|
<td>{{ target.skew.toFixed(2) }}°</td>
|
|
|
|
|
<td>{{ target.area.toFixed(2) }}°</td>
|
|
|
|
|
</template>
|
2023-10-21 11:09:55 -04:00
|
|
|
<template v-else>
|
2023-08-21 01:51:35 -04:00
|
|
|
<td>{{ target.pose?.x.toFixed(2) }} m</td>
|
|
|
|
|
<td>{{ target.pose?.y.toFixed(2) }} m</td>
|
2023-10-17 10:20:00 -04:00
|
|
|
<td>{{ (((target.pose?.angle_z || 0) * 180.0) / Math.PI).toFixed(2) }}°</td>
|
2023-08-21 01:51:35 -04:00
|
|
|
</template>
|
2023-08-31 16:56:58 -04:00
|
|
|
<template
|
|
|
|
|
v-if="
|
2023-10-24 19:39:38 -07:00
|
|
|
(useCameraSettingsStore().currentPipelineType === PipelineType.AprilTag ||
|
|
|
|
|
useCameraSettingsStore().currentPipelineType === PipelineType.Aruco) &&
|
2023-08-31 16:56:58 -04:00
|
|
|
useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled
|
|
|
|
|
"
|
|
|
|
|
>
|
2023-10-17 10:20:00 -04:00
|
|
|
<td>{{ target.ambiguity >= 0 ? target.ambiguity?.toFixed(2) + "%" : "(In Multi-Target)" }}</td>
|
2023-08-21 01:51:35 -04:00
|
|
|
</template>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</template>
|
|
|
|
|
</v-simple-table>
|
|
|
|
|
</v-row>
|
2023-10-17 10:20:00 -04:00
|
|
|
<v-row
|
|
|
|
|
v-if="
|
2023-10-24 19:39:38 -07:00
|
|
|
(useCameraSettingsStore().currentPipelineType === PipelineType.AprilTag ||
|
|
|
|
|
useCameraSettingsStore().currentPipelineType === PipelineType.Aruco) &&
|
2023-10-21 11:09:55 -04:00
|
|
|
currentPipelineSettings.doMultiTarget &&
|
|
|
|
|
useCameraSettingsStore().isCurrentVideoFormatCalibrated &&
|
|
|
|
|
useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled
|
2023-10-17 10:20:00 -04:00
|
|
|
"
|
|
|
|
|
align="start"
|
|
|
|
|
class="pb-4 white--text"
|
|
|
|
|
>
|
2023-10-21 11:09:55 -04:00
|
|
|
<v-card-subtitle class="ma-0 pa-0 pb-4" style="font-size: 16px">Multi-tag pose, field-to-camera</v-card-subtitle>
|
2023-10-17 10:20:00 -04:00
|
|
|
<v-simple-table fixed-header height="100%" dense dark>
|
|
|
|
|
<thead style="font-size: 1.25rem">
|
|
|
|
|
<th class="text-center">X meters</th>
|
|
|
|
|
<th class="text-center">Y meters</th>
|
|
|
|
|
<th class="text-center">Z Angle θ°</th>
|
|
|
|
|
<th class="text-center">Tags</th>
|
|
|
|
|
</thead>
|
2023-10-21 11:09:55 -04:00
|
|
|
<tbody v-show="useStateStore().currentPipelineResults?.multitagResult">
|
|
|
|
|
<td>{{ useStateStore().currentPipelineResults?.multitagResult?.bestTransform.x.toFixed(2) }} m</td>
|
|
|
|
|
<td>{{ useStateStore().currentPipelineResults?.multitagResult?.bestTransform.y.toFixed(2) }} m</td>
|
|
|
|
|
<td>{{ useStateStore().currentPipelineResults?.multitagResult?.bestTransform.angle_z.toFixed(2) }}°</td>
|
2023-10-17 10:20:00 -04:00
|
|
|
<td>{{ useStateStore().currentPipelineResults?.multitagResult?.fiducialIDsUsed }}</td>
|
|
|
|
|
</tbody>
|
|
|
|
|
</v-simple-table>
|
|
|
|
|
</v-row>
|
2023-08-21 01:51:35 -04:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
|
|
.v-data-table {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
background-color: #006492 !important;
|
|
|
|
|
|
2023-08-31 16:56:58 -04:00
|
|
|
th,
|
|
|
|
|
td {
|
2023-08-21 01:51:35 -04:00
|
|
|
background-color: #006492 !important;
|
|
|
|
|
font-size: 1rem !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
td {
|
|
|
|
|
font-family: monospace !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tbody :hover td {
|
|
|
|
|
background-color: #005281 !important;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
|
width: 0;
|
|
|
|
|
height: 0.55em;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-track {
|
|
|
|
|
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
|
|
|
background-color: #ffd843;
|
|
|
|
|
border-radius: 10px;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|