Skip to content

Free Motion Capture for Everyone πŸ’€βœ¨

TypeScript

chckpt

jonmatthisfd797d278b62
diff --git a/app-design-v2/eslint.config.js b/app-design-v2/eslint.config.js
index d94e7deb..02c76837 100644
--- a/app-design-v2/eslint.config.js
+++ b/app-design-v2/eslint.config.js
@@ -3,7 +3,7 @@ import globals from 'globals'
import reactHooks from 'eslint-plugin-react-hooks'
import reactRefresh from 'eslint-plugin-react-refresh'
import tseslint from 'typescript-eslint'
-import { globalIgnores } from 'eslint/config'
+import {globalIgnores} from 'eslint/config'
export default tseslint.config([
globalIgnores(['dist']),
diff --git a/app-design-v2/public/vite.svg b/app-design-v2/public/vite.svg
index e7b8dfb1..7ecbe164 100644
--- a/app-design-v2/public/vite.svg
+++ b/app-design-v2/public/vite.svg
@@ -1 +1,2 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88"
+ height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
diff --git a/app-design-v2/src/assets/react.svg b/app-design-v2/src/assets/react.svg
index 6c87de9b..830bd23c 100644
--- a/app-design-v2/src/assets/react.svg
+++ b/app-design-v2/src/assets/react.svg
@@ -1 +1,2 @@
-<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
\ No newline at end of file
+<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" class="iconify iconify--logos" width="35.93"
+ height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 228"><path fill="#00D8FF" d="M210.483 73.824a171.49 171.49 0 0 0-8.24-2.597c.465-1.9.893-3.777 1.273-5.621c6.238-30.281 2.16-54.676-11.769-62.708c-13.355-7.7-35.196.329-57.254 19.526a171.23 171.23 0 0 0-6.375 5.848a155.866 155.866 0 0 0-4.241-3.917C100.759 3.829 77.587-4.822 63.673 3.233C50.33 10.957 46.379 33.89 51.995 62.588a170.974 170.974 0 0 0 1.892 8.48c-3.28.932-6.445 1.924-9.474 2.98C17.309 83.498 0 98.307 0 113.668c0 15.865 18.582 31.778 46.812 41.427a145.52 145.52 0 0 0 6.921 2.165a167.467 167.467 0 0 0-2.01 9.138c-5.354 28.2-1.173 50.591 12.134 58.266c13.744 7.926 36.812-.22 59.273-19.855a145.567 145.567 0 0 0 5.342-4.923a168.064 168.064 0 0 0 6.92 6.314c21.758 18.722 43.246 26.282 56.54 18.586c13.731-7.949 18.194-32.003 12.4-61.268a145.016 145.016 0 0 0-1.535-6.842c1.62-.48 3.21-.974 4.76-1.488c29.348-9.723 48.443-25.443 48.443-41.52c0-15.417-17.868-30.326-45.517-39.844Zm-6.365 70.984c-1.4.463-2.836.91-4.3 1.345c-3.24-10.257-7.612-21.163-12.963-32.432c5.106-11 9.31-21.767 12.459-31.957c2.619.758 5.16 1.557 7.61 2.4c23.69 8.156 38.14 20.213 38.14 29.504c0 9.896-15.606 22.743-40.946 31.14Zm-10.514 20.834c2.562 12.94 2.927 24.64 1.23 33.787c-1.524 8.219-4.59 13.698-8.382 15.893c-8.067 4.67-25.32-1.4-43.927-17.412a156.726 156.726 0 0 1-6.437-5.87c7.214-7.889 14.423-17.06 21.459-27.246c12.376-1.098 24.068-2.894 34.671-5.345a134.17 134.17 0 0 1 1.386 6.193ZM87.276 214.515c-7.882 2.783-14.16 2.863-17.955.675c-8.075-4.657-11.432-22.636-6.853-46.752a156.923 156.923 0 0 1 1.869-8.499c10.486 2.32 22.093 3.988 34.498 4.994c7.084 9.967 14.501 19.128 21.976 27.15a134.668 134.668 0 0 1-4.877 4.492c-9.933 8.682-19.886 14.842-28.658 17.94ZM50.35 144.747c-12.483-4.267-22.792-9.812-29.858-15.863c-6.35-5.437-9.555-10.836-9.555-15.216c0-9.322 13.897-21.212 37.076-29.293c2.813-.98 5.757-1.905 8.812-2.773c3.204 10.42 7.406 21.315 12.477 32.332c-5.137 11.18-9.399 22.249-12.634 32.792a134.718 134.718 0 0 1-6.318-1.979Zm12.378-84.26c-4.811-24.587-1.616-43.134 6.425-47.789c8.564-4.958 27.502 2.111 47.463 19.835a144.318 144.318 0 0 1 3.841 3.545c-7.438 7.987-14.787 17.08-21.808 26.988c-12.04 1.116-23.565 2.908-34.161 5.309a160.342 160.342 0 0 1-1.76-7.887Zm110.427 27.268a347.8 347.8 0 0 0-7.785-12.803c8.168 1.033 15.994 2.404 23.343 4.08c-2.206 7.072-4.956 14.465-8.193 22.045a381.151 381.151 0 0 0-7.365-13.322Zm-45.032-43.861c5.044 5.465 10.096 11.566 15.065 18.186a322.04 322.04 0 0 0-30.257-.006c4.974-6.559 10.069-12.652 15.192-18.18ZM82.802 87.83a323.167 323.167 0 0 0-7.227 13.238c-3.184-7.553-5.909-14.98-8.134-22.152c7.304-1.634 15.093-2.97 23.209-3.984a321.524 321.524 0 0 0-7.848 12.897Zm8.081 65.352c-8.385-.936-16.291-2.203-23.593-3.793c2.26-7.3 5.045-14.885 8.298-22.6a321.187 321.187 0 0 0 7.257 13.246c2.594 4.48 5.28 8.868 8.038 13.147Zm37.542 31.03c-5.184-5.592-10.354-11.779-15.403-18.433c4.902.192 9.899.29 14.978.29c5.218 0 10.376-.117 15.453-.343c-4.985 6.774-10.018 12.97-15.028 18.486Zm52.198-57.817c3.422 7.8 6.306 15.345 8.596 22.52c-7.422 1.694-15.436 3.058-23.88 4.071a382.417 382.417 0 0 0 7.859-13.026a347.403 347.403 0 0 0 7.425-13.565Zm-16.898 8.101a358.557 358.557 0 0 1-12.281 19.815a329.4 329.4 0 0 1-23.444.823c-7.967 0-15.716-.248-23.178-.732a310.202 310.202 0 0 1-12.513-19.846h.001a307.41 307.41 0 0 1-10.923-20.627a310.278 310.278 0 0 1 10.89-20.637l-.001.001a307.318 307.318 0 0 1 12.413-19.761c7.613-.576 15.42-.876 23.31-.876H128c7.926 0 15.743.303 23.354.883a329.357 329.357 0 0 1 12.335 19.695a358.489 358.489 0 0 1 11.036 20.54a329.472 329.472 0 0 1-11 20.722Zm22.56-122.124c8.572 4.944 11.906 24.881 6.52 51.026c-.344 1.668-.73 3.367-1.15 5.09c-10.622-2.452-22.155-4.275-34.23-5.408c-7.034-10.017-14.323-19.124-21.64-27.008a160.789 160.789 0 0 1 5.888-5.4c18.9-16.447 36.564-22.941 44.612-18.3ZM128 90.808c12.625 0 22.86 10.235 22.86 22.86s-10.235 22.86-22.86 22.86s-22.86-10.235-22.86-22.86s10.235-22.86 22.86-22.86Z"></path></svg>
diff --git a/app-design-v2/src/components/features/ConnectionDropdown/ConnectionDropdown.tsx b/app-design-v2/src/components/features/ConnectionDropdown/ConnectionDropdown.tsx
index d4508cd0..61cddd0e 100644
--- a/app-design-v2/src/components/features/ConnectionDropdown/ConnectionDropdown.tsx
+++ b/app-design-v2/src/components/features/ConnectionDropdown/ConnectionDropdown.tsx
@@ -1,5 +1,5 @@
/* --- Dropdown wrapper with connection controls --- */
-import { useAppSelector, type ServerStatus } from "@/store";
+import {type ServerStatus, useAppSelector} from "@/store";
import DropdownButton from "@/components/composites/DropdownButton.tsx";
import {ConnectionToggleButton} from "@/components/features/ConnectionDropdown/ConnectionToggleButton.tsx";
diff --git a/app-design-v2/src/components/features/ConnectionDropdown/ConnectionToggleButton.tsx b/app-design-v2/src/components/features/ConnectionDropdown/ConnectionToggleButton.tsx
index fbef3d4c..24cf0ae7 100644
--- a/app-design-v2/src/components/features/ConnectionDropdown/ConnectionToggleButton.tsx
+++ b/app-design-v2/src/components/features/ConnectionDropdown/ConnectionToggleButton.tsx
@@ -1,7 +1,7 @@
/* --- Connection Toggle Button Component --- */
import clsx from "clsx";
-import { useAppDispatch, useAppSelector } from "@/store";
-import { checkServerHealth } from "@/store/slices/server";
+import {useAppDispatch, useAppSelector} from "@/store";
+import {checkServerHealth} from "@/store/slices/server";
interface ConnectionToggleButtonProps {
textColor?: string;
diff --git a/app-design-v2/src/components/features/SplashModal/SplashModal.tsx b/app-design-v2/src/components/features/SplashModal/SplashModal.tsx
index 22c96723..82201952 100644
--- a/app-design-v2/src/components/features/SplashModal/SplashModal.tsx
+++ b/app-design-v2/src/components/features/SplashModal/SplashModal.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React, {useState} from "react";
import {ButtonSm} from "@/components/primitives/Buttons/ButtonSm.tsx";
import {ButtonCard} from "@/components/primitives/Buttons/ButtonCard.tsx";
import {Checkbox} from "@/components/primitives/Toggles/Checkbox.tsx";
diff --git a/app-design-v2/src/components/layout/BottomPanel.tsx b/app-design-v2/src/components/layout/BottomPanel.tsx
index 325a1486..3f9207e2 100644
--- a/app-design-v2/src/components/layout/BottomPanel.tsx
+++ b/app-design-v2/src/components/layout/BottomPanel.tsx
@@ -1,5 +1,5 @@
-import { type FC, type ReactElement, type SetStateAction, useState } from "react";
-import { SegmentedControl } from "@/components/primitives/Controls/SegmentedControlComponent.tsx";
+import {type FC, type ReactElement, type SetStateAction, useState} from "react";
+import {SegmentedControl} from "@/components/primitives/Controls/SegmentedControlComponent.tsx";
export type InfoMode = "Logs" | "Recording info" | "File directory";
diff --git a/app-design-v2/src/components/layout/MainContentPanel.tsx b/app-design-v2/src/components/layout/MainContentPanel.tsx
index 205e1f1d..1d936cd4 100644
--- a/app-design-v2/src/components/layout/MainContentPanel.tsx
+++ b/app-design-v2/src/components/layout/MainContentPanel.tsx
@@ -1,5 +1,5 @@
-import { type FC, type ReactElement, type SetStateAction, useState } from "react";
-import { SegmentedControl } from "@/components/primitives/Controls/SegmentedControlComponent.tsx";
+import {type FC, type ReactElement, type SetStateAction, useState} from "react";
+import {SegmentedControl} from "@/components/primitives/Controls/SegmentedControlComponent.tsx";
import {ConnectionToggleButton} from "@/components/features/ConnectionDropdown/ConnectionToggleButton.tsx";
export interface MainContentPanelProps {
diff --git a/app-design-v2/src/components/layout/SidePanel.tsx b/app-design-v2/src/components/layout/SidePanel.tsx
index 53819960..1a5ee5a0 100644
--- a/app-design-v2/src/components/layout/SidePanel.tsx
+++ b/app-design-v2/src/components/layout/SidePanel.tsx
@@ -1,6 +1,6 @@
-import { type FC, type ReactElement, useState, useEffect } from "react";
-import { ButtonSm } from "@/components/primitives/Buttons/ButtonSm.tsx";
-import { ToggleComponent } from "@/components/primitives/Toggles/ToggleComponent.tsx";
+import {type FC, type ReactElement, useEffect, useState} from "react";
+import {ButtonSm} from "@/components/primitives/Buttons/ButtonSm.tsx";
+import {ToggleComponent} from "@/components/primitives/Toggles/ToggleComponent.tsx";
export interface SidePanelSettings {
skipCalibration: boolean;
diff --git a/app-design-v2/src/components/layout/layout.types.ts b/app-design-v2/src/components/layout/layout.types.ts
index 36dc09e5..849a4317 100644
--- a/app-design-v2/src/components/layout/layout.types.ts
+++ b/app-design-v2/src/components/layout/layout.types.ts
@@ -1,6 +1,6 @@
// types/layout.viewport3d-types.ts
-import { type ReactElement, type MouseEvent } from "react";
+import {type MouseEvent, type ReactElement} from "react";
// ========================================
// Common Types
diff --git a/app-design-v2/src/components/primitives/Controls/SegmentedControlComponent.tsx b/app-design-v2/src/components/primitives/Controls/SegmentedControlComponent.tsx
index 0b2bc45e..4532fb00 100644
--- a/app-design-v2/src/components/primitives/Controls/SegmentedControlComponent.tsx
+++ b/app-design-v2/src/components/primitives/Controls/SegmentedControlComponent.tsx
@@ -1,7 +1,6 @@
import React, {useEffect, useState} from "react";
-
interface SegmentedControlProps {
/**
* Array of options to display.
diff --git a/app-design-v2/src/components/primitives/Toggles/ToggleComponent.tsx b/app-design-v2/src/components/primitives/Toggles/ToggleComponent.tsx
index 008348ea..cb52bb6d 100644
--- a/app-design-v2/src/components/primitives/Toggles/ToggleComponent.tsx
+++ b/app-design-v2/src/components/primitives/Toggles/ToggleComponent.tsx
@@ -1,4 +1,3 @@
-
import React, {useState} from "react";
interface ToggleProps {
diff --git a/app-design-v2/src/main.tsx b/app-design-v2/src/main.tsx
index 28149936..656ef45a 100644
--- a/app-design-v2/src/main.tsx
+++ b/app-design-v2/src/main.tsx
@@ -1,5 +1,5 @@
-import { StrictMode } from 'react'
-import { createRoot } from 'react-dom/client'
+import {StrictMode} from 'react'
+import {createRoot} from 'react-dom/client'
import './index.css'
import App from "@/App.tsx";
diff --git a/app-design-v2/src/services/frames/use-frame-metadata.ts b/app-design-v2/src/services/frames/use-frame-metadata.ts
index 29cd6467..e556ce04 100644
--- a/app-design-v2/src/services/frames/use-frame-metadata.ts
+++ b/app-design-v2/src/services/frames/use-frame-metadata.ts
@@ -1,6 +1,6 @@
// hooks/use-frame-metadata.ts
-import { useState, useEffect } from 'react';
-import { frameRouter, type FrameMetadata } from '@/services/frames/frame-router';
+import {useEffect, useState} from 'react';
+import {type FrameMetadata, frameRouter} from '@/services/frames/frame-router';
/**
* Hook to subscribe to frame metadata for all cameras
diff --git a/app-design-v2/src/services/websocket/websocket-service.ts b/app-design-v2/src/services/websocket/websocket-service.ts
index 0222dec6..407feb4f 100644
--- a/app-design-v2/src/services/websocket/websocket-service.ts
+++ b/app-design-v2/src/services/websocket/websocket-service.ts
@@ -1,23 +1,19 @@
// services/websocket/websocket-service.ts
-import { store } from '@/store';
import {
- websocketConnected,
- websocketDisconnected,
- websocketError,
- websocketReconnecting,
backendFramerateUpdated,
frontendFramerateUpdated,
logAdded,
- selectServerConfig,
+ type LogRecord,
selectIsServerAlive,
- type LogRecord
+ selectServerConfig,
+ store,
+ websocketConnected,
+ websocketDisconnected,
+ websocketError,
+ websocketReconnecting
} from '@/store';
-import { frameRouter } from '../frames/frame-router.ts';
-import type {
- WebSocketMessage,
- FramerateUpdateMessage,
- LogRecordMessage
-} from './websocket-types.ts';
+import {frameRouter} from '../frames/frame-router.ts';
+import type {FramerateUpdateMessage, LogRecordMessage, WebSocketMessage} from './websocket-types.ts';
export type MessageHandler = (data: WebSocketMessage) => void;
export type BinaryHandler = (data: ArrayBuffer) => void;
diff --git a/app-design-v2/src/services/websocket/websocket-types.ts b/app-design-v2/src/services/websocket/websocket-types.ts
index 8cc02ba0..071d12a1 100644
--- a/app-design-v2/src/services/websocket/websocket-types.ts
+++ b/app-design-v2/src/services/websocket/websocket-types.ts
@@ -1,4 +1,4 @@
-import { z } from 'zod';
+import {z} from 'zod';
// Import from framerate types
export const CurrentFramerateSchema = z.object({
diff --git a/app-design-v2/src/store/hooks.ts b/app-design-v2/src/store/hooks.ts
index b6d0e42a..b4cb2459 100644
--- a/app-design-v2/src/store/hooks.ts
+++ b/app-design-v2/src/store/hooks.ts
@@ -1,5 +1,5 @@
-import {type TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
-import type { RootState, AppDispatch } from './types';
+import {type TypedUseSelectorHook, useDispatch, useSelector} from 'react-redux';
+import type {AppDispatch, RootState} from './types';
export const useAppDispatch = (): AppDispatch => useDispatch<AppDispatch>();
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
diff --git a/app-design-v2/src/store/slices/cameras/cameras-adapter.ts b/app-design-v2/src/store/slices/cameras/cameras-adapter.ts
index b7751107..6222882b 100644
--- a/app-design-v2/src/store/slices/cameras/cameras-adapter.ts
+++ b/app-design-v2/src/store/slices/cameras/cameras-adapter.ts
@@ -1,4 +1,4 @@
-import { createEntityAdapter } from '@reduxjs/toolkit';
+import {createEntityAdapter} from '@reduxjs/toolkit';
import type {CameraDevice} from './cameras-types';
export const cameraAdapter = createEntityAdapter<CameraDevice, string>({
diff --git a/app-design-v2/src/store/slices/cameras/cameras-selectors.ts b/app-design-v2/src/store/slices/cameras/cameras-selectors.ts
index 5ff0357f..cdbe1904 100644
--- a/app-design-v2/src/store/slices/cameras/cameras-selectors.ts
+++ b/app-design-v2/src/store/slices/cameras/cameras-selectors.ts
@@ -1,6 +1,6 @@
-import { createSelector } from '@reduxjs/toolkit';
+import {createSelector} from '@reduxjs/toolkit';
import type {RootState} from '../../types';
-import { cameraAdapter } from './cameras-adapter';
+import {cameraAdapter} from './cameras-adapter';
import type {CameraConfig} from './cameras-types';
// Export entity adapter selectors
diff --git a/app-design-v2/src/store/slices/cameras/cameras-slice.ts b/app-design-v2/src/store/slices/cameras/cameras-slice.ts
index ab2d0de9..94159a26 100644
--- a/app-design-v2/src/store/slices/cameras/cameras-slice.ts
+++ b/app-design-v2/src/store/slices/cameras/cameras-slice.ts
@@ -1,16 +1,7 @@
-import {
- createSlice,
- type PayloadAction,
- type EntityState,
-} from '@reduxjs/toolkit';
-import type {CameraDevice, CameraConfig} from './cameras-types';
-import { cameraAdapter } from './cameras-adapter';
-import {
- detectCameras,
- connectToCameras,
- updateCameraConfigs,
- closeCameras,
-} from './cameras-thunks';
+import {createSlice, type EntityState, type PayloadAction,} from '@reduxjs/toolkit';
+import type {CameraConfig, CameraDevice} from './cameras-types';
+import {cameraAdapter} from './cameras-adapter';
+import {closeCameras, connectToCameras, detectCameras, updateCameraConfigs,} from './cameras-thunks';
interface CameraState extends EntityState<CameraDevice, string> {
isLoading: boolean;
diff --git a/app-design-v2/src/store/slices/cameras/cameras-thunks.ts b/app-design-v2/src/store/slices/cameras/cameras-thunks.ts
index ca8ac49e..17721fa4 100644
--- a/app-design-v2/src/store/slices/cameras/cameras-thunks.ts
+++ b/app-design-v2/src/store/slices/cameras/cameras-thunks.ts
@@ -1,6 +1,11 @@
import {createAsyncThunk} from '@reduxjs/toolkit';
import type {RootState} from '../../types';
-import {CAMERA_DEFAULT_CONSTRAINTS, type CameraConfig, type CameraDevice, createDefaultCameraConfig} from './cameras-types';
+import {
+ CAMERA_DEFAULT_CONSTRAINTS,
+ type CameraConfig,
+ type CameraDevice,
+ createDefaultCameraConfig
+} from './cameras-types';
import {selectSelectedCameraConfigs} from './cameras-selectors';
import {selectServerEndpoints} from "@/store";
diff --git a/app-design-v2/src/store/slices/cameras/cameras-types.ts b/app-design-v2/src/store/slices/cameras/cameras-types.ts
index f7b76c90..ce738b32 100644
--- a/app-design-v2/src/store/slices/cameras/cameras-types.ts
+++ b/app-design-v2/src/store/slices/cameras/cameras-types.ts
@@ -1,4 +1,4 @@
-import { z } from 'zod';
+import {z} from 'zod';
// Constants
export const PixelFormats = ['RGB', 'BGR', 'GRAY'] as const;
diff --git a/app-design-v2/src/store/slices/framerate/framerate-selectors.ts b/app-design-v2/src/store/slices/framerate/framerate-selectors.ts
index 7534d425..04e0206f 100644
--- a/app-design-v2/src/store/slices/framerate/framerate-selectors.ts
+++ b/app-design-v2/src/store/slices/framerate/framerate-selectors.ts
@@ -1,5 +1,5 @@
// framerate-selectors.ts
-import { createSelector } from '@reduxjs/toolkit';
+import {createSelector} from '@reduxjs/toolkit';
import type {RootState} from '../../types';
// Basic selectors for current framerates
diff --git a/app-design-v2/src/store/slices/framerate/framerate-types.ts b/app-design-v2/src/store/slices/framerate/framerate-types.ts
index b3c60e3b..48819b03 100644
--- a/app-design-v2/src/store/slices/framerate/framerate-types.ts
+++ b/app-design-v2/src/store/slices/framerate/framerate-types.ts
@@ -1,5 +1,5 @@
// framerate-viewport3d-types.ts
-import { z } from 'zod';
+import {z} from 'zod';
// The actual framerate data structure used in the Redux store
export const FramerateDataSchema = z.object({
diff --git a/app-design-v2/src/store/slices/log-records/log-records-slice.ts b/app-design-v2/src/store/slices/log-records/log-records-slice.ts
index a707f19d..33095b86 100644
--- a/app-design-v2/src/store/slices/log-records/log-records-slice.ts
+++ b/app-design-v2/src/store/slices/log-records/log-records-slice.ts
@@ -1,5 +1,5 @@
// log-records-slice.ts
-import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
+import {createSlice, type PayloadAction} from '@reduxjs/toolkit';
import type {LogRecord} from './logs-types';
interface LogRecordsState {
diff --git a/app-design-v2/src/store/slices/log-records/logs-selectors.ts b/app-design-v2/src/store/slices/log-records/logs-selectors.ts
index 49067983..c9938934 100644
--- a/app-design-v2/src/store/slices/log-records/logs-selectors.ts
+++ b/app-design-v2/src/store/slices/log-records/logs-selectors.ts
@@ -1,7 +1,7 @@
// logs-selectors.ts
-import { createSelector } from '@reduxjs/toolkit';
-import { type RootState } from '../../types';
-import { type LogRecord } from './logs-types';
+import {createSelector} from '@reduxjs/toolkit';
+import {type RootState} from '../../types';
+import {type LogRecord} from './logs-types';
// Basic selectors
export const selectAllLogs = (state: RootState): LogRecord[] =>
diff --git a/app-design-v2/src/store/slices/log-records/logs-types.ts b/app-design-v2/src/store/slices/log-records/logs-types.ts
index 3baad3ac..d899112c 100644
--- a/app-design-v2/src/store/slices/log-records/logs-types.ts
+++ b/app-design-v2/src/store/slices/log-records/logs-types.ts
@@ -1,4 +1,4 @@
-import { z } from 'zod';
+import {z} from 'zod';
export const LogRecordSchema = z.object({
name: z.string(),
diff --git a/app-design-v2/src/store/slices/recording/recording-slice.ts b/app-design-v2/src/store/slices/recording/recording-slice.ts
index b0c39e5e..389449e8 100644
--- a/app-design-v2/src/store/slices/recording/recording-slice.ts
+++ b/app-design-v2/src/store/slices/recording/recording-slice.ts
@@ -1,6 +1,6 @@
-import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
+import {createSlice, type PayloadAction} from '@reduxjs/toolkit';
import type {RecordingInfo} from './recording-types';
-import { startRecording, stopRecording } from './recording-thunks';
+import {startRecording, stopRecording} from './recording-thunks';
const initialState: RecordingInfo = {
isRecording: false,
diff --git a/app-design-v2/src/store/slices/recording/recording-thunks.ts b/app-design-v2/src/store/slices/recording/recording-thunks.ts
index 8d381046..be6d4a16 100644
--- a/app-design-v2/src/store/slices/recording/recording-thunks.ts
+++ b/app-design-v2/src/store/slices/recording/recording-thunks.ts
@@ -1,7 +1,7 @@
-import { createAsyncThunk } from '@reduxjs/toolkit';
-import { z } from 'zod';
+import {createAsyncThunk} from '@reduxjs/toolkit';
+import {z} from 'zod';
import type {RootState} from '@/store/types';
-import { selectServerEndpoints } from '@/store/slices/server/server-selectors';
+import {selectServerEndpoints} from '@/store/slices/server/server-selectors';
const RecordStartRequestSchema = z.object({
recording_name: z.string(),
diff --git a/app-design-v2/src/store/slices/recording/recording-types.ts b/app-design-v2/src/store/slices/recording/recording-types.ts
index 1aff0f50..4ce6eef2 100644
--- a/app-design-v2/src/store/slices/recording/recording-types.ts
+++ b/app-design-v2/src/store/slices/recording/recording-types.ts
@@ -1,4 +1,4 @@
-import { z } from 'zod';
+import {z} from 'zod';
export const RecordingInfoSchema = z.object({
isRecording: z.boolean(),
diff --git a/app-design-v2/src/store/slices/server/server-selectors.ts b/app-design-v2/src/store/slices/server/server-selectors.ts
index c0f46915..f88b3a54 100644
--- a/app-design-v2/src/store/slices/server/server-selectors.ts
+++ b/app-design-v2/src/store/slices/server/server-selectors.ts
@@ -1,6 +1,6 @@
// store/slices/server/server-selectors.ts
-import { createSelector } from '@reduxjs/toolkit';
-import type { RootState } from "../../types.ts";
+import {createSelector} from '@reduxjs/toolkit';
+import type {RootState} from "../../types.ts";
// Base selectors
export const selectServerConfig = (state: RootState) => state.server.config;
@@ -60,4 +60,3 @@ export const selectServerEndpoints = createSelector(
'/skellycam/websocket/connect',
})
);
-
diff --git a/app-design-v2/src/store/slices/server/server-slice.ts b/app-design-v2/src/store/slices/server/server-slice.ts
index ea8cdce6..552d92f9 100644
--- a/app-design-v2/src/store/slices/server/server-slice.ts
+++ b/app-design-v2/src/store/slices/server/server-slice.ts
@@ -1,13 +1,7 @@
// store/slices/server/server-slice.ts
-import { createSlice, type PayloadAction } from '@reduxjs/toolkit';
-import type {
- ServerConfig, ServerState,
- ServerStatus,
-} from './server-types';
-import {
- checkServerHealth,
- shutdownServer,
-} from './server-thunks';
+import {createSlice, type PayloadAction} from '@reduxjs/toolkit';
+import type {ServerConfig, ServerState, ServerStatus,} from './server-types';
+import {checkServerHealth, shutdownServer,} from './server-thunks';
// Helper to load config from localStorage
const loadConfigFromStorage = (): ServerConfig => ({
diff --git a/app-design-v2/src/store/slices/server/server-thunks.ts b/app-design-v2/src/store/slices/server/server-thunks.ts
index 7e35bf29..6c2049c1 100644
--- a/app-design-v2/src/store/slices/server/server-thunks.ts
+++ b/app-design-v2/src/store/slices/server/server-thunks.ts
@@ -1,7 +1,7 @@
// store/slices/server/server-thunks.ts
-import { createAsyncThunk } from '@reduxjs/toolkit';
-import type { RootState } from '../../types';
-import { selectServerEndpoints } from './server-selectors';
+import {createAsyncThunk} from '@reduxjs/toolkit';
+import type {RootState} from '../../types';
+import {selectServerEndpoints} from './server-selectors';
/**
* Check server health status
diff --git a/app-design-v2/src/store/types.ts b/app-design-v2/src/store/types.ts
index 82d5328b..95d0f2aa 100644
--- a/app-design-v2/src/store/types.ts
+++ b/app-design-v2/src/store/types.ts
@@ -1,5 +1,5 @@
-import { store } from './store';
-import type {ThunkAction, Action} from '@reduxjs/toolkit';
+import {store} from './store';
+import type {Action, ThunkAction} from '@reduxjs/toolkit';
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
diff --git a/app-design-v2/vite.config.ts b/app-design-v2/vite.config.ts
index 95a39102..62b90d63 100644
--- a/app-design-v2/vite.config.ts
+++ b/app-design-v2/vite.config.ts
@@ -1,6 +1,6 @@
-import { defineConfig } from 'vite'
+import {defineConfig} from 'vite'
import react from '@vitejs/plugin-react'
-import { resolve } from 'path'
+import {resolve} from 'path'
// https://vite.dev/config/
export default defineConfig({
plugins: [react()],
diff --git a/freemocap-ui-old/electron-old/main/api.ts b/freemocap-ui-old/electron-old/main/api.ts
index d7d85f7f..1a7e023f 100644
--- a/freemocap-ui-old/electron-old/main/api.ts
+++ b/freemocap-ui-old/electron-old/main/api.ts
@@ -1,16 +1,16 @@
-import { initTRPC } from '@trpc/server';
-import { z } from 'zod';
+import {initTRPC} from '@trpc/server';
+import {z} from 'zod';
import superjson from 'superjson';
// Services
-import { PythonServer } from './services/python-server';
-import { SystemScanner } from './services/system-scanner';
-import { DependencyManager } from './services/dependency-manager';
-import { AppSettings } from './services/app-settings';
-import { dialog, shell, app } from 'electron';
+import {PythonServer} from './services/python-server';
+import {SystemScanner} from './services/system-scanner';
+import {DependencyManager} from './services/dependency-manager';
+import {AppSettings} from './services/app-settings';
+import {app, dialog, shell} from 'electron';
import path from 'node:path';
import fs from 'node:fs';
-import { APP_PATHS } from './app-paths';
+import {APP_PATHS} from './app-paths';
// Initialize tRPC
const t = initTRPC.create({
@@ -350,4 +350,4 @@ export const api = t.router({
});
// Export the type for use in renderer
-export type AppAPI = typeof api;
\ No newline at end of file
+export type AppAPI = typeof api;
diff --git a/freemocap-ui-old/electron-old/main/index.ts b/freemocap-ui-old/electron-old/main/index.ts
index e6224780..00ecda8c 100644
--- a/freemocap-ui-old/electron-old/main/index.ts
+++ b/freemocap-ui-old/electron-old/main/index.ts
@@ -1,9 +1,9 @@
-import { app, BrowserWindow } from 'electron';
-import { setupIPC } from './ipc';
-import { WindowManager } from './services/window-manager';
-import { PythonServer } from './services/python-server';
-import { buildAppMenu } from './services/app-menu';
-import { LifecycleLogger } from './services/logger';
+import {app, BrowserWindow} from 'electron';
+import {setupIPC} from './ipc';
+import {WindowManager} from './services/window-manager';
+import {PythonServer} from './services/python-server';
+import {buildAppMenu} from './services/app-menu';
+import {LifecycleLogger} from './services/logger';
export const APP_ENVIRONMENT = {
IS_DEV: process.env.NODE_ENV === 'development',
diff --git a/freemocap-ui-old/electron-old/main/ipc.ts b/freemocap-ui-old/electron-old/main/ipc.ts
index cf09c44f..ac62ed87 100644
--- a/freemocap-ui-old/electron-old/main/ipc.ts
+++ b/freemocap-ui-old/electron-old/main/ipc.ts
@@ -1,6 +1,6 @@
// electron/main/ipc.ts
-import { ipcMain } from 'electron';
-import { api } from './api';
+import {ipcMain} from 'electron';
+import {api} from './api';
import superjson from 'superjson';
export function setupIPC(): void {
diff --git a/freemocap-ui-old/electron-old/main/services/app-menu.ts b/freemocap-ui-old/electron-old/main/services/app-menu.ts
index 15d215ab..cb5c3a09 100644
--- a/freemocap-ui-old/electron-old/main/services/app-menu.ts
+++ b/freemocap-ui-old/electron-old/main/services/app-menu.ts
@@ -1,4 +1,4 @@
-import { Menu, BrowserWindow, shell, app } from 'electron';
+import {app, BrowserWindow, Menu, shell} from 'electron';
import path from 'node:path';
import os from 'node:os';
@@ -141,4 +141,4 @@ function sendNavigate(window: BrowserWindow, route: string): void {
if (window.isDestroyed()) return;
window.webContents.send('navigate', route);
window.focus();
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/electron-old/main/services/dependency-manager.ts b/freemocap-ui-old/electron-old/main/services/dependency-manager.ts
index c4aab5f1..8f395f94 100644
--- a/freemocap-ui-old/electron-old/main/services/dependency-manager.ts
+++ b/freemocap-ui-old/electron-old/main/services/dependency-manager.ts
@@ -1,5 +1,5 @@
-import { exec } from 'node:child_process';
-import { promisify } from 'node:util';
+import {exec} from 'node:child_process';
+import {promisify} from 'node:util';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
@@ -369,4 +369,4 @@ export class DependencyManager {
throw new Error(`Unknown dependency: ${dependencyId}`);
}
}
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/electron-old/main/services/logger.ts b/freemocap-ui-old/electron-old/main/services/logger.ts
index deb6a09f..09cb8131 100644
--- a/freemocap-ui-old/electron-old/main/services/logger.ts
+++ b/freemocap-ui-old/electron-old/main/services/logger.ts
@@ -1,5 +1,5 @@
-import { app, BrowserWindow } from 'electron';
-import { exec } from 'child_process';
+import {app, BrowserWindow} from 'electron';
+import {exec} from 'child_process';
export class LifecycleLogger {
static logProcessInfo() {
diff --git a/freemocap-ui-old/electron-old/main/services/system-scanner.ts b/freemocap-ui-old/electron-old/main/services/system-scanner.ts
index f2c4b163..435e2dc7 100644
--- a/freemocap-ui-old/electron-old/main/services/system-scanner.ts
+++ b/freemocap-ui-old/electron-old/main/services/system-scanner.ts
@@ -1,9 +1,9 @@
import os from 'node:os';
import fs from 'node:fs';
import path from 'node:path';
-import { execFile, exec } from 'node:child_process';
-import { promisify } from 'node:util';
-import { app } from 'electron';
+import {exec, execFile} from 'node:child_process';
+import {promisify} from 'node:util';
+import {app} from 'electron';
const execFileAsync = promisify(execFile);
const execAsync = promisify(exec);
diff --git a/freemocap-ui-old/electron-old/main/services/update-handler.ts b/freemocap-ui-old/electron-old/main/services/update-handler.ts
index 35bb6182..105f31e4 100644
--- a/freemocap-ui-old/electron-old/main/services/update-handler.ts
+++ b/freemocap-ui-old/electron-old/main/services/update-handler.ts
@@ -1,6 +1,5 @@
-
-import { app, ipcMain, BrowserWindow } from 'electron';
-import { autoUpdater } from 'electron-updater';
+import {app, BrowserWindow, ipcMain} from 'electron';
+import {autoUpdater} from 'electron-updater';
export class UpdateHandler {
private mainWindow: BrowserWindow;
diff --git a/freemocap-ui-old/electron-old/main/services/window-manager.ts b/freemocap-ui-old/electron-old/main/services/window-manager.ts
index 1e2f219a..9c168f48 100644
--- a/freemocap-ui-old/electron-old/main/services/window-manager.ts
+++ b/freemocap-ui-old/electron-old/main/services/window-manager.ts
@@ -1,7 +1,7 @@
-import { BrowserWindow, shell } from 'electron';
-import { LifecycleLogger } from './logger';
-import { APP_ENVIRONMENT } from '../index';
-import { APP_PATHS } from '../app-paths';
+import {BrowserWindow, shell} from 'electron';
+import {LifecycleLogger} from './logger';
+import {APP_ENVIRONMENT} from '../index';
+import {APP_PATHS} from '../app-paths';
export class WindowManager {
private static mainWindow: BrowserWindow | null = null;
diff --git a/freemocap-ui-old/electron-old/preload/index.ts b/freemocap-ui-old/electron-old/preload/index.ts
index 2096156c..9d235780 100644
--- a/freemocap-ui-old/electron-old/preload/index.ts
+++ b/freemocap-ui-old/electron-old/preload/index.ts
@@ -1,4 +1,4 @@
-import { contextBridge, ipcRenderer } from 'electron';
+import {contextBridge, ipcRenderer} from 'electron';
contextBridge.exposeInMainWorld('electronAPI', {
// tRPC bridge
diff --git a/freemocap-ui-old/electron/main/api.ts b/freemocap-ui-old/electron/main/api.ts
index d7d85f7f..1a7e023f 100644
--- a/freemocap-ui-old/electron/main/api.ts
+++ b/freemocap-ui-old/electron/main/api.ts
@@ -1,16 +1,16 @@
-import { initTRPC } from '@trpc/server';
-import { z } from 'zod';
+import {initTRPC} from '@trpc/server';
+import {z} from 'zod';
import superjson from 'superjson';
// Services
-import { PythonServer } from './services/python-server';
-import { SystemScanner } from './services/system-scanner';
-import { DependencyManager } from './services/dependency-manager';
-import { AppSettings } from './services/app-settings';
-import { dialog, shell, app } from 'electron';
+import {PythonServer} from './services/python-server';
+import {SystemScanner} from './services/system-scanner';
+import {DependencyManager} from './services/dependency-manager';
+import {AppSettings} from './services/app-settings';
+import {app, dialog, shell} from 'electron';
import path from 'node:path';
import fs from 'node:fs';
-import { APP_PATHS } from './app-paths';
+import {APP_PATHS} from './app-paths';
// Initialize tRPC
const t = initTRPC.create({
@@ -350,4 +350,4 @@ export const api = t.router({
});
// Export the type for use in renderer
-export type AppAPI = typeof api;
\ No newline at end of file
+export type AppAPI = typeof api;
diff --git a/freemocap-ui-old/electron/main/index.ts b/freemocap-ui-old/electron/main/index.ts
index e6224780..00ecda8c 100644
--- a/freemocap-ui-old/electron/main/index.ts
+++ b/freemocap-ui-old/electron/main/index.ts
@@ -1,9 +1,9 @@
-import { app, BrowserWindow } from 'electron';
-import { setupIPC } from './ipc';
-import { WindowManager } from './services/window-manager';
-import { PythonServer } from './services/python-server';
-import { buildAppMenu } from './services/app-menu';
-import { LifecycleLogger } from './services/logger';
+import {app, BrowserWindow} from 'electron';
+import {setupIPC} from './ipc';
+import {WindowManager} from './services/window-manager';
+import {PythonServer} from './services/python-server';
+import {buildAppMenu} from './services/app-menu';
+import {LifecycleLogger} from './services/logger';
export const APP_ENVIRONMENT = {
IS_DEV: process.env.NODE_ENV === 'development',
diff --git a/freemocap-ui-old/electron/main/ipc.ts b/freemocap-ui-old/electron/main/ipc.ts
index cf09c44f..ac62ed87 100644
--- a/freemocap-ui-old/electron/main/ipc.ts
+++ b/freemocap-ui-old/electron/main/ipc.ts
@@ -1,6 +1,6 @@
// electron/main/ipc.ts
-import { ipcMain } from 'electron';
-import { api } from './api';
+import {ipcMain} from 'electron';
+import {api} from './api';
import superjson from 'superjson';
export function setupIPC(): void {
diff --git a/freemocap-ui-old/electron/main/services/app-menu.ts b/freemocap-ui-old/electron/main/services/app-menu.ts
index 15d215ab..cb5c3a09 100644
--- a/freemocap-ui-old/electron/main/services/app-menu.ts
+++ b/freemocap-ui-old/electron/main/services/app-menu.ts
@@ -1,4 +1,4 @@
-import { Menu, BrowserWindow, shell, app } from 'electron';
+import {app, BrowserWindow, Menu, shell} from 'electron';
import path from 'node:path';
import os from 'node:os';
@@ -141,4 +141,4 @@ function sendNavigate(window: BrowserWindow, route: string): void {
if (window.isDestroyed()) return;
window.webContents.send('navigate', route);
window.focus();
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/electron/main/services/dependency-manager.ts b/freemocap-ui-old/electron/main/services/dependency-manager.ts
index c4aab5f1..8f395f94 100644
--- a/freemocap-ui-old/electron/main/services/dependency-manager.ts
+++ b/freemocap-ui-old/electron/main/services/dependency-manager.ts
@@ -1,5 +1,5 @@
-import { exec } from 'node:child_process';
-import { promisify } from 'node:util';
+import {exec} from 'node:child_process';
+import {promisify} from 'node:util';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
@@ -369,4 +369,4 @@ export class DependencyManager {
throw new Error(`Unknown dependency: ${dependencyId}`);
}
}
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/electron/main/services/logger.ts b/freemocap-ui-old/electron/main/services/logger.ts
index deb6a09f..09cb8131 100644
--- a/freemocap-ui-old/electron/main/services/logger.ts
+++ b/freemocap-ui-old/electron/main/services/logger.ts
@@ -1,5 +1,5 @@
-import { app, BrowserWindow } from 'electron';
-import { exec } from 'child_process';
+import {app, BrowserWindow} from 'electron';
+import {exec} from 'child_process';
export class LifecycleLogger {
static logProcessInfo() {
diff --git a/freemocap-ui-old/electron/main/services/system-scanner.ts b/freemocap-ui-old/electron/main/services/system-scanner.ts
index f2c4b163..435e2dc7 100644
--- a/freemocap-ui-old/electron/main/services/system-scanner.ts
+++ b/freemocap-ui-old/electron/main/services/system-scanner.ts
@@ -1,9 +1,9 @@
import os from 'node:os';
import fs from 'node:fs';
import path from 'node:path';
-import { execFile, exec } from 'node:child_process';
-import { promisify } from 'node:util';
-import { app } from 'electron';
+import {exec, execFile} from 'node:child_process';
+import {promisify} from 'node:util';
+import {app} from 'electron';
const execFileAsync = promisify(execFile);
const execAsync = promisify(exec);
diff --git a/freemocap-ui-old/electron/main/services/update-handler.ts b/freemocap-ui-old/electron/main/services/update-handler.ts
index 35bb6182..105f31e4 100644
--- a/freemocap-ui-old/electron/main/services/update-handler.ts
+++ b/freemocap-ui-old/electron/main/services/update-handler.ts
@@ -1,6 +1,5 @@
-
-import { app, ipcMain, BrowserWindow } from 'electron';
-import { autoUpdater } from 'electron-updater';
+import {app, BrowserWindow, ipcMain} from 'electron';
+import {autoUpdater} from 'electron-updater';
export class UpdateHandler {
private mainWindow: BrowserWindow;
diff --git a/freemocap-ui-old/electron/main/services/window-manager.ts b/freemocap-ui-old/electron/main/services/window-manager.ts
index 1e2f219a..9c168f48 100644
--- a/freemocap-ui-old/electron/main/services/window-manager.ts
+++ b/freemocap-ui-old/electron/main/services/window-manager.ts
@@ -1,7 +1,7 @@
-import { BrowserWindow, shell } from 'electron';
-import { LifecycleLogger } from './logger';
-import { APP_ENVIRONMENT } from '../index';
-import { APP_PATHS } from '../app-paths';
+import {BrowserWindow, shell} from 'electron';
+import {LifecycleLogger} from './logger';
+import {APP_ENVIRONMENT} from '../index';
+import {APP_PATHS} from '../app-paths';
export class WindowManager {
private static mainWindow: BrowserWindow | null = null;
diff --git a/freemocap-ui-old/electron/preload/index.ts b/freemocap-ui-old/electron/preload/index.ts
index 2096156c..9d235780 100644
--- a/freemocap-ui-old/electron/preload/index.ts
+++ b/freemocap-ui-old/electron/preload/index.ts
@@ -1,4 +1,4 @@
-import { contextBridge, ipcRenderer } from 'electron';
+import {contextBridge, ipcRenderer} from 'electron';
contextBridge.exposeInMainWorld('electronAPI', {
// tRPC bridge
diff --git a/freemocap-ui-old/src/__tests__/calibration-slice.test.ts b/freemocap-ui-old/src/__tests__/calibration-slice.test.ts
index 03141e76..a3215aff 100644
--- a/freemocap-ui-old/src/__tests__/calibration-slice.test.ts
+++ b/freemocap-ui-old/src/__tests__/calibration-slice.test.ts
@@ -1,16 +1,15 @@
-import { describe, it, expect } from 'vitest';
+import {describe, expect, it} from 'vitest';
import {
- calibrationSlice,
calibrationConfigUpdated,
- calibrationProgressUpdated,
+ CalibrationDirectoryInfo,
+ calibrationDirectoryInfoUpdated,
calibrationErrorCleared,
+ calibrationProgressUpdated,
+ calibrationSlice,
+ CalibrationState,
manualCalibrationRecordingPathChanged,
manualCalibrationRecordingPathCleared,
- calibrationDirectoryInfoUpdated,
resetCalibrationState,
- CalibrationConfig,
- CalibrationState,
- CalibrationDirectoryInfo,
} from '@/store/slices/calibration/calibration-slice';
const reducer = calibrationSlice.reducer;
diff --git a/freemocap-ui-old/src/__tests__/message-type-guards.test.ts b/freemocap-ui-old/src/__tests__/message-type-guards.test.ts
index 2ce2c58e..51e4cf8c 100644
--- a/freemocap-ui-old/src/__tests__/message-type-guards.test.ts
+++ b/freemocap-ui-old/src/__tests__/message-type-guards.test.ts
@@ -1,8 +1,8 @@
-import { describe, it, expect } from 'vitest';
+import {describe, expect, it} from 'vitest';
import {
- isSettingsStateMessage,
- isLogRecord,
isFramerateUpdate,
+ isLogRecord,
+ isSettingsStateMessage,
} from '@/services/server/server-helpers/websocket-message-types';
// ---------------------------------------------------------------------------
diff --git a/freemocap-ui-old/src/__tests__/mocap-slice.test.ts b/freemocap-ui-old/src/__tests__/mocap-slice.test.ts
index 6877e6bb..9b12aebd 100644
--- a/freemocap-ui-old/src/__tests__/mocap-slice.test.ts
+++ b/freemocap-ui-old/src/__tests__/mocap-slice.test.ts
@@ -1,17 +1,17 @@
-import { describe, it, expect } from 'vitest';
+import {describe, expect, it} from 'vitest';
import {
- mocapSlice,
+ DEFAULT_ESTIMATOR_CONFIG,
+ DEFAULT_REALTIME_FILTER_CONFIG,
+ MEDIAPIPE_POSTHOC_PRESET,
+ MEDIAPIPE_REALTIME_PRESET,
mocapDetectorConfigReplaced,
mocapDetectorConfigUpdated,
- skeletonFilterConfigReplaced,
- skeletonFilterConfigUpdated,
mocapErrorCleared,
- resetMocapState,
- MEDIAPIPE_REALTIME_PRESET,
- MEDIAPIPE_POSTHOC_PRESET,
- DEFAULT_ESTIMATOR_CONFIG,
- DEFAULT_REALTIME_FILTER_CONFIG,
+ mocapSlice,
MocapState,
+ resetMocapState,
+ skeletonFilterConfigReplaced,
+ skeletonFilterConfigUpdated,
} from '@/store/slices/mocap/mocap-slice';
const reducer = mocapSlice.reducer;
diff --git a/freemocap-ui-old/src/__tests__/settings-slice.test.ts b/freemocap-ui-old/src/__tests__/settings-slice.test.ts
index 2d655a4c..60c38799 100644
--- a/freemocap-ui-old/src/__tests__/settings-slice.test.ts
+++ b/freemocap-ui-old/src/__tests__/settings-slice.test.ts
@@ -1,14 +1,11 @@
-import { describe, it, expect } from 'vitest';
+import {describe, expect, it} from 'vitest';
import {
- settingsSlice,
- serverSettingsUpdated,
serverSettingsCleared,
ServerSettingsState,
+ serverSettingsUpdated,
+ settingsSlice,
} from '@/store/slices/settings/settings-slice';
-import type {
- FreeMoCapSettings,
- SettingsStateMessage,
-} from '@/store/slices/settings/settings-types';
+import type {FreeMoCapSettings, SettingsStateMessage,} from '@/store/slices/settings/settings-types';
const reducer = settingsSlice.reducer;
@@ -19,7 +16,7 @@ const reducer = settingsSlice.reducer;
function makeSettings(overrides?: Partial<FreeMoCapSettings>): FreeMoCapSettings {
return {
cameras: {},
- pipeline: {
+ realtime: {
config: null,
is_connected: false,
pipeline_id: null,
diff --git a/freemocap-ui-old/src/components/MenuNavigationListener.tsx b/freemocap-ui-old/src/components/MenuNavigationListener.tsx
index ac7e41ee..e8e27924 100644
--- a/freemocap-ui-old/src/components/MenuNavigationListener.tsx
+++ b/freemocap-ui-old/src/components/MenuNavigationListener.tsx
@@ -1,5 +1,5 @@
-import React, { useEffect } from 'react';
-import { useNavigate } from 'react-router-dom';
+import React, {useEffect} from 'react';
+import {useNavigate} from 'react-router-dom';
/**
* Invisible component that listens for navigation events from the
diff --git a/freemocap-ui-old/src/components/camera-config-tree-view/CameraConfigTreeView.tsx b/freemocap-ui-old/src/components/camera-config-tree-view/CameraConfigTreeView.tsx
index 9a6df270..d5328f3e 100644
--- a/freemocap-ui-old/src/components/camera-config-tree-view/CameraConfigTreeView.tsx
+++ b/freemocap-ui-old/src/components/camera-config-tree-view/CameraConfigTreeView.tsx
@@ -14,7 +14,8 @@ import {
detectCameras,
selectCameras,
selectConnectedCameras,
- selectIsLoading, selectSelectedCameras,
+ selectIsLoading,
+ selectSelectedCameras,
useAppDispatch,
useAppSelector,
} from "@/store";
diff --git a/freemocap-ui-old/src/components/camera-config-tree-view/CameraHeaderActions.tsx b/freemocap-ui-old/src/components/camera-config-tree-view/CameraHeaderActions.tsx
index 0cfc4016..34de407d 100644
--- a/freemocap-ui-old/src/components/camera-config-tree-view/CameraHeaderActions.tsx
+++ b/freemocap-ui-old/src/components/camera-config-tree-view/CameraHeaderActions.tsx
@@ -5,13 +5,7 @@ import VideocamOffIcon from "@mui/icons-material/VideocamOff";
import PauseIcon from "@mui/icons-material/Pause";
import PlayArrowIcon from "@mui/icons-material/PlayArrow";
import YoutubeSearchedForIcon from "@mui/icons-material/YoutubeSearchedFor";
-import {
- camerasConnectOrUpdate,
- closeCameras,
- pauseUnpauseCameras,
- useAppDispatch,
- useAppSelector,
-} from "@/store";
+import {camerasConnectOrUpdate, closeCameras, pauseUnpauseCameras, useAppDispatch, useAppSelector,} from "@/store";
import {selectSelectedCameras} from "@/store/slices/cameras/cameras-selectors";
import {detectCameras} from "@/store/slices/cameras/cameras-thunks";
diff --git a/freemocap-ui-old/src/components/camera-views/camera-view-settings-overlay/CamerasViewSettingsOverlay.tsx b/freemocap-ui-old/src/components/camera-views/camera-view-settings-overlay/CamerasViewSettingsOverlay.tsx
index 4fb911aa..55cdbd99 100644
--- a/freemocap-ui-old/src/components/camera-views/camera-view-settings-overlay/CamerasViewSettingsOverlay.tsx
+++ b/freemocap-ui-old/src/components/camera-views/camera-view-settings-overlay/CamerasViewSettingsOverlay.tsx
@@ -1,5 +1,16 @@
import React, {useState} from 'react';
-import {Box, Button, Checkbox, FormControlLabel, IconButton, Paper, TextField, ToggleButton, ToggleButtonGroup, Tooltip} from '@mui/material';
+import {
+ Box,
+ Button,
+ Checkbox,
+ FormControlLabel,
+ IconButton,
+ Paper,
+ TextField,
+ ToggleButton,
+ ToggleButtonGroup,
+ Tooltip
+} from '@mui/material';
import SettingsIcon from '@mui/icons-material/Settings';
import CloseIcon from '@mui/icons-material/Close';
import GridViewIcon from '@mui/icons-material/GridView';
@@ -225,4 +236,4 @@ export const CamerasViewSettingsOverlay: React.FC<CamerasViewSettingsOverlayProp
)}
</>
);
-};
\ No newline at end of file
+};
diff --git a/freemocap-ui-old/src/components/mocap-control-panel/MediapipeConfigPanel.tsx b/freemocap-ui-old/src/components/mocap-control-panel/MediapipeConfigPanel.tsx
index 0916d6a8..367a9a0e 100644
--- a/freemocap-ui-old/src/components/mocap-control-panel/MediapipeConfigPanel.tsx
+++ b/freemocap-ui-old/src/components/mocap-control-panel/MediapipeConfigPanel.tsx
@@ -14,11 +14,7 @@ import {
useTheme,
} from "@mui/material";
import {useMocap} from "@/hooks/useMocap";
-import {
- MEDIAPIPE_REALTIME_PRESET,
- MEDIAPIPE_POSTHOC_PRESET,
- MediapipeModelComplexity,
-} from "@/store/slices/mocap";
+import {MEDIAPIPE_POSTHOC_PRESET, MEDIAPIPE_REALTIME_PRESET, MediapipeModelComplexity,} from "@/store/slices/mocap";
const MODEL_COMPLEXITY_LABELS: Record<MediapipeModelComplexity, string> = {
0: "Lite (fastest)",
diff --git a/freemocap-ui-old/src/components/mocap-control-panel/SkeletonFilterConfigPanel.tsx b/freemocap-ui-old/src/components/mocap-control-panel/SkeletonFilterConfigPanel.tsx
index 776cc1ff..94fa133e 100644
--- a/freemocap-ui-old/src/components/mocap-control-panel/SkeletonFilterConfigPanel.tsx
+++ b/freemocap-ui-old/src/components/mocap-control-panel/SkeletonFilterConfigPanel.tsx
@@ -1,15 +1,5 @@
import React, {useCallback} from "react";
-import {
- Box,
- Button,
- Divider,
- Slider,
- Stack,
- TextField,
- Tooltip,
- Typography,
- useTheme,
-} from "@mui/material";
+import {Box, Button, Divider, Slider, Stack, TextField, Tooltip, Typography, useTheme,} from "@mui/material";
import {useMocap} from "@/hooks/useMocap";
import {DEFAULT_REALTIME_FILTER_CONFIG} from "@/store/slices/mocap";
diff --git a/freemocap-ui-old/src/components/processing-pipeline-panel/PipelineSummary.tsx b/freemocap-ui-old/src/components/processing-pipeline-panel/PipelineSummary.tsx
index 05619890..9288ca26 100644
--- a/freemocap-ui-old/src/components/processing-pipeline-panel/PipelineSummary.tsx
+++ b/freemocap-ui-old/src/components/processing-pipeline-panel/PipelineSummary.tsx
@@ -1,11 +1,7 @@
import React from "react";
import {Chip, Typography, useTheme} from "@mui/material";
import {useAppSelector} from "@/store/hooks";
-import {
- selectIsPipelineConnected,
- selectPipelineError,
- selectPipelineId,
-} from "@/store/slices/pipeline";
+import {selectIsPipelineConnected, selectPipelineError, selectPipelineId,} from "@/store/slices/pipeline";
export const PipelineSummary: React.FC = () => {
const theme = useTheme();
diff --git a/freemocap-ui-old/src/components/settings-editor/SettingsEditor.tsx b/freemocap-ui-old/src/components/settings-editor/SettingsEditor.tsx
index 16d67b9a..2b497597 100644
--- a/freemocap-ui-old/src/components/settings-editor/SettingsEditor.tsx
+++ b/freemocap-ui-old/src/components/settings-editor/SettingsEditor.tsx
@@ -1,45 +1,36 @@
-import React, { useState, useCallback, useRef, useMemo, useEffect } from 'react';
-import {
- Box,
- Button,
- ButtonGroup,
- Alert,
- Snackbar,
- Tooltip,
- Divider,
- CircularProgress,
-} from '@mui/material';
-import { useTheme } from '@mui/material/styles';
-import Editor, { OnMount } from '@monaco-editor/react';
+import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
+import {Alert, Box, Button, ButtonGroup, CircularProgress, Divider, Snackbar, Tooltip,} from '@mui/material';
+import {useTheme} from '@mui/material/styles';
+import Editor, {OnMount} from '@monaco-editor/react';
import UploadFileIcon from '@mui/icons-material/UploadFile';
import DownloadIcon from '@mui/icons-material/Download';
import CheckIcon from '@mui/icons-material/Check';
import RestoreIcon from '@mui/icons-material/Restore';
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
import {
- useAppDispatch,
- useAppSelector,
- themeModeSet,
- recordingDirectoryChanged,
configUpdated,
+ recordingDirectoryChanged,
selectServerSettings,
+ themeModeSet,
+ useAppDispatch,
+ useAppSelector,
} from '@/store';
import {
mocapDetectorConfigReplaced,
skeletonFilterConfigReplaced,
updateMocapConfigOnServer,
} from '@/store/slices/mocap';
-import {calibrationConfigUpdated, updateCalibrationConfigOnServer } from '@/store/slices/calibration';
-import { ThemeMode } from '@/store/slices/theme/theme-types';
-import { useServer } from '@/hooks/useServer';
+import {calibrationConfigUpdated, updateCalibrationConfigOnServer} from '@/store/slices/calibration';
+import {ThemeMode} from '@/store/slices/theme/theme-types';
+import {useServer} from '@/hooks/useServer';
import {
- serialize,
- deserialize,
convertFormat,
- SerializationFormat,
+ deserialize,
FORMAT_EXTENSIONS,
FORMAT_MIME_TYPES,
FORMAT_MONACO_LANGUAGES,
+ SerializationFormat,
+ serialize,
} from './format-converters';
// ── Aggregated settings shape (config-only, no runtime state) ──
diff --git a/freemocap-ui-old/src/components/setup-wizard/FirstLaunchRedirect.tsx b/freemocap-ui-old/src/components/setup-wizard/FirstLaunchRedirect.tsx
index 2021bb52..4fc8d395 100644
--- a/freemocap-ui-old/src/components/setup-wizard/FirstLaunchRedirect.tsx
+++ b/freemocap-ui-old/src/components/setup-wizard/FirstLaunchRedirect.tsx
@@ -1,6 +1,6 @@
-import React, { useEffect } from 'react';
-import { useNavigate, useLocation } from 'react-router-dom';
-import { useSetupWizardRequired } from '@/components/setup-wizard/SetupWizard';
+import React, {useEffect} from 'react';
+import {useLocation, useNavigate} from 'react-router-dom';
+import {useSetupWizardRequired} from '@/components/setup-wizard/SetupWizard';
/**
* Invisible component that redirects to /setup on first launch.
diff --git a/freemocap-ui-old/src/components/setup-wizard/SetupWizard.tsx b/freemocap-ui-old/src/components/setup-wizard/SetupWizard.tsx
index 61c77eae..93a61a1b 100644
--- a/freemocap-ui-old/src/components/setup-wizard/SetupWizard.tsx
+++ b/freemocap-ui-old/src/components/setup-wizard/SetupWizard.tsx
@@ -1,20 +1,20 @@
-import React, { useState, useEffect, useCallback } from 'react';
+import React, {useCallback, useEffect, useState} from 'react';
import {
+ Alert,
Box,
- Typography,
Button,
- LinearProgress,
- CircularProgress,
Chip,
- Tooltip,
- Alert,
+ CircularProgress,
+ IconButton,
+ LinearProgress,
Paper,
- Stepper,
Step,
StepLabel,
- IconButton,
+ Stepper,
+ Tooltip,
+ Typography,
} from '@mui/material';
-import { useTheme } from '@mui/material/styles';
+import {useTheme} from '@mui/material/styles';
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
import ErrorIcon from '@mui/icons-material/Error';
import WarningIcon from '@mui/icons-material/Warning';
@@ -28,7 +28,7 @@ import VideocamIcon from '@mui/icons-material/Videocam';
import ArrowForwardIcon from '@mui/icons-material/ArrowForward';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import CloseIcon from '@mui/icons-material/Close';
-import { useElectronIPC } from '@/services';
+import {useElectronIPC} from '@/services';
// ── Types (mirrors electron-side types) ──
@@ -755,4 +755,4 @@ export function useSetupWizardRequired(): { loading: boolean; required: boolean
}, [isElectron, api]);
return { loading, required };
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/src/components/ui-components/LeftSidePanelContent.tsx b/freemocap-ui-old/src/components/ui-components/LeftSidePanelContent.tsx
index 78de7c17..99738117 100644
--- a/freemocap-ui-old/src/components/ui-components/LeftSidePanelContent.tsx
+++ b/freemocap-ui-old/src/components/ui-components/LeftSidePanelContent.tsx
@@ -1,6 +1,6 @@
-import React, { useCallback, useMemo, useState } from 'react';
+import React, {useCallback, useMemo, useState} from 'react';
import Box from '@mui/material/Box';
-import { IconButton, List, ListItem, Tooltip, useTheme } from '@mui/material';
+import {IconButton, List, ListItem, Tooltip, useTheme} from '@mui/material';
import {
closestCenter,
DndContext,
@@ -10,26 +10,21 @@ import {
useSensor,
useSensors,
} from '@dnd-kit/core';
-import {
- arrayMove,
- SortableContext,
- sortableKeyboardCoordinates,
- verticalListSortingStrategy,
-} from '@dnd-kit/sortable';
-import { restrictToVerticalAxis, restrictToParentElement } from '@dnd-kit/modifiers';
+import {arrayMove, SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy,} from '@dnd-kit/sortable';
+import {restrictToParentElement, restrictToVerticalAxis} from '@dnd-kit/modifiers';
import ThemeToggle from '@/components/ui-components/ThemeToggle';
import HomeIcon from '@mui/icons-material/Home';
-import { useLocation, useNavigate } from 'react-router-dom';
+import {useLocation, useNavigate} from 'react-router-dom';
import VideocamIcon from '@mui/icons-material/Videocam';
import DirectionsRunIcon from '@mui/icons-material/DirectionsRun';
import TuneIcon from '@mui/icons-material/Tune';
-import { VideoFolderPanel } from '@/components/video-folder-panel/VideoFolderPanel';
-import { SortableSectionWrapper } from '@/components/common/SortableSectionWrapper';
-import { ServerConnectionStatus } from '@/components/ServerConnectionStatus';
-import { ProcessingPipelinePanel } from '@/components/processing-pipeline-panel/ProcessingPipelinePanel';
-import { CameraConfigTreeView } from '@/components/camera-config-tree-view/CameraConfigTreeView';
-import { CalibrationControlPanel } from '@/components/calibration-control-panel/CalibrationControlPanel';
-import { MocapTaskTreeItem } from '@/components/mocap-control-panel/MocapTaskTreeItem';
+import {VideoFolderPanel} from '@/components/video-folder-panel/VideoFolderPanel';
+import {SortableSectionWrapper} from '@/components/common/SortableSectionWrapper';
+import {ServerConnectionStatus} from '@/components/ServerConnectionStatus';
+import {ProcessingPipelinePanel} from '@/components/processing-pipeline-panel/ProcessingPipelinePanel';
+import {CameraConfigTreeView} from '@/components/camera-config-tree-view/CameraConfigTreeView';
+import {CalibrationControlPanel} from '@/components/calibration-control-panel/CalibrationControlPanel';
+import {MocapTaskTreeItem} from '@/components/mocap-control-panel/MocapTaskTreeItem';
const STORAGE_KEY = 'freemocap-sidebar-section-order';
@@ -45,7 +40,7 @@ type SectionId = (typeof DEFAULT_SECTION_ORDER)[number];
const SECTION_COMPONENTS: Record<SectionId, React.FC> = {
connection: ServerConnectionStatus,
- pipeline: ProcessingPipelinePanel,
+ realtime: ProcessingPipelinePanel,
cameras: CameraConfigTreeView,
calibration: CalibrationControlPanel,
mocap: MocapTaskTreeItem,
diff --git a/freemocap-ui-old/src/components/viewport3d/ImageMesh.tsx b/freemocap-ui-old/src/components/viewport3d/ImageMesh.tsx
index 3442bd69..77853248 100644
--- a/freemocap-ui-old/src/components/viewport3d/ImageMesh.tsx
+++ b/freemocap-ui-old/src/components/viewport3d/ImageMesh.tsx
@@ -1,7 +1,7 @@
-import { useEffect, useMemo, useRef } from 'react';
-import { useFrame } from '@react-three/fiber';
+import {useEffect, useMemo, useRef} from 'react';
+import {useFrame} from '@react-three/fiber';
import * as THREE from 'three';
-import { useServer } from '@/services';
+import {useServer} from '@/services';
interface ImageMeshProps {
cameraId: string;
diff --git a/freemocap-ui-old/src/components/viewport3d/RigidBodyRenderer.tsx b/freemocap-ui-old/src/components/viewport3d/RigidBodyRenderer.tsx
index 4623d64f..10ddeaf3 100644
--- a/freemocap-ui-old/src/components/viewport3d/RigidBodyRenderer.tsx
+++ b/freemocap-ui-old/src/components/viewport3d/RigidBodyRenderer.tsx
@@ -1,16 +1,10 @@
-import { useEffect, useMemo, useRef } from "react";
-import {
- InstancedMesh,
- MeshStandardMaterial,
- CylinderGeometry,
- Object3D,
- Vector3,
-} from "three";
-import { useFrame } from "@react-three/fiber";
-import { useServer } from "@/services";
-import { RigidBodyPose } from "@/components/viewport3d/viewport3d-types";
-import { Z_OFFSET } from "@/components/viewport3d/skeleton-config";
-import { SKELETON_COLORS } from "@/components/viewport3d/skeleton-colors";
+import {useEffect, useMemo, useRef} from "react";
+import {CylinderGeometry, InstancedMesh, MeshStandardMaterial, Object3D, Vector3,} from "three";
+import {useFrame} from "@react-three/fiber";
+import {useServer} from "@/services";
+import {RigidBodyPose} from "@/components/viewport3d/viewport3d-types";
+import {Z_OFFSET} from "@/components/viewport3d/skeleton-config";
+import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
/** Maximum bone segments the instanced mesh can hold. */
const MAX_RIGID_BODIES = 64;
diff --git a/freemocap-ui-old/src/components/viewport3d/SceneEnvironment.tsx b/freemocap-ui-old/src/components/viewport3d/SceneEnvironment.tsx
index 7a234179..58fbb64c 100644
--- a/freemocap-ui-old/src/components/viewport3d/SceneEnvironment.tsx
+++ b/freemocap-ui-old/src/components/viewport3d/SceneEnvironment.tsx
@@ -1,4 +1,4 @@
-import { Grid } from "@react-three/drei";
+import {Grid} from "@react-three/drei";
/** Static scene environment: lighting, ground grid, and axes indicator. */
export function SceneEnvironment() {
diff --git a/freemocap-ui-old/src/components/viewport3d/SkeletonRenderer.tsx b/freemocap-ui-old/src/components/viewport3d/SkeletonRenderer.tsx
index f5b0f899..576e0a0e 100644
--- a/freemocap-ui-old/src/components/viewport3d/SkeletonRenderer.tsx
+++ b/freemocap-ui-old/src/components/viewport3d/SkeletonRenderer.tsx
@@ -1,27 +1,27 @@
-import { useEffect, useMemo, useRef } from "react";
+import {useEffect, useMemo, useRef} from "react";
import {
+ BufferAttribute,
+ BufferGeometry,
InstancedMesh,
+ LineBasicMaterial,
+ LineSegments,
MeshStandardMaterial,
- SphereGeometry,
Object3D,
+ SphereGeometry,
Vector3,
- BufferGeometry,
- BufferAttribute,
- LineBasicMaterial,
- LineSegments,
} from "three";
-import { useFrame } from "@react-three/fiber";
-import { useServer } from "@/services";
-import { Point3d, PointStyle } from "@/components/viewport3d/viewport3d-types";
+import {useFrame} from "@react-three/fiber";
+import {useServer} from "@/services";
+import {Point3d, PointStyle} from "@/components/viewport3d/viewport3d-types";
import {
+ getPointStyle,
MAX_POINTS,
MAX_SEGMENTS,
- Z_OFFSET,
- SEGMENT_DEFINITIONS,
SEGMENT_COLORS,
- getPointStyle,
+ SEGMENT_DEFINITIONS,
+ Z_OFFSET,
} from "@/components/viewport3d/skeleton-config";
-import { resolvePoint } from "@/components/viewport3d/virtual-points";
+import {resolvePoint} from "@/components/viewport3d/virtual-points";
import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
const DUMMY = new Object3D();
diff --git a/freemocap-ui-old/src/components/viewport3d/ThreeJsCanvas.tsx b/freemocap-ui-old/src/components/viewport3d/ThreeJsCanvas.tsx
index 90f5ebae..111ee9dc 100644
--- a/freemocap-ui-old/src/components/viewport3d/ThreeJsCanvas.tsx
+++ b/freemocap-ui-old/src/components/viewport3d/ThreeJsCanvas.tsx
@@ -1,11 +1,11 @@
-import { useCallback, useEffect, useRef } from "react";
-import { Canvas } from "@react-three/fiber";
-import { Box, IconButton, Tooltip } from "@mui/material";
+import {useCallback, useEffect, useRef} from "react";
+import {Canvas} from "@react-three/fiber";
+import {Box, IconButton, Tooltip} from "@mui/material";
import CenterFocusStrongIcon from "@mui/icons-material/CenterFocusStrong";
import type CameraControlsImpl from "camera-controls";
-import { ThreeJsScene } from "@/components/viewport3d/ThreeJsScene";
-import { fitCameraToSkeleton } from "@/components/viewport3d/fit-camera";
-import { useServer } from "@/services";
+import {ThreeJsScene} from "@/components/viewport3d/ThreeJsScene";
+import {fitCameraToSkeleton} from "@/components/viewport3d/fit-camera";
+import {useServer} from "@/services";
export function ThreeJsCanvas() {
const cameraControlsRef = useRef<CameraControlsImpl>(null!);
@@ -68,4 +68,4 @@ export function ThreeJsCanvas() {
</Tooltip>
</Box>
);
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/src/components/viewport3d/ThreeJsScene.tsx b/freemocap-ui-old/src/components/viewport3d/ThreeJsScene.tsx
index 3f9f79d6..73c45519 100644
--- a/freemocap-ui-old/src/components/viewport3d/ThreeJsScene.tsx
+++ b/freemocap-ui-old/src/components/viewport3d/ThreeJsScene.tsx
@@ -1,9 +1,9 @@
-import { RefObject } from "react";
-import { CameraControls } from "@react-three/drei";
+import {RefObject} from "react";
+import {CameraControls} from "@react-three/drei";
import type CameraControlsImpl from "camera-controls";
-import { SceneEnvironment } from "@/components/viewport3d/SceneEnvironment";
-import { SkeletonRenderer } from "@/components/viewport3d/SkeletonRenderer";
-import { RigidBodyRenderer } from "@/components/viewport3d/RigidBodyRenderer";
+import {SceneEnvironment} from "@/components/viewport3d/SceneEnvironment";
+import {SkeletonRenderer} from "@/components/viewport3d/SkeletonRenderer";
+import {RigidBodyRenderer} from "@/components/viewport3d/RigidBodyRenderer";
interface ThreeJsSceneProps {
cameraControlsRef: RefObject<CameraControlsImpl>;
diff --git a/freemocap-ui-old/src/components/viewport3d/VMCPanel.tsx b/freemocap-ui-old/src/components/viewport3d/VMCPanel.tsx
index 7c1c07fb..5f0de5d7 100644
--- a/freemocap-ui-old/src/components/viewport3d/VMCPanel.tsx
+++ b/freemocap-ui-old/src/components/viewport3d/VMCPanel.tsx
@@ -1,18 +1,9 @@
-import React, { useCallback } from "react";
-import {
- Box,
- IconButton,
- Stack,
- Switch,
- TextField,
- Tooltip,
- Typography,
- useTheme,
-} from "@mui/material";
+import React, {useCallback} from "react";
+import {Box, Stack, Switch, TextField, Tooltip, Typography, useTheme,} from "@mui/material";
import CastConnectedIcon from "@mui/icons-material/CastConnected";
-import { useAppSelector } from "@/store/hooks";
-import { selectServerSettings } from "@/store/slices/settings/settings-selectors";
-import { useServer } from "@/services";
+import {useAppSelector} from "@/store/hooks";
+import {selectServerSettings} from "@/store/slices/settings/settings-selectors";
+import {useServer} from "@/services";
/**
* Compact VMC output controls. Shows a toggle to enable/disable VMC
diff --git a/freemocap-ui-old/src/components/viewport3d/face-contours.ts b/freemocap-ui-old/src/components/viewport3d/face-contours.ts
index abb43873..7c131301 100644
--- a/freemocap-ui-old/src/components/viewport3d/face-contours.ts
+++ b/freemocap-ui-old/src/components/viewport3d/face-contours.ts
@@ -1,4 +1,4 @@
-import { Color } from "three";
+import {Color} from "three";
import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
/**
diff --git a/freemocap-ui-old/src/components/viewport3d/fit-camera.ts b/freemocap-ui-old/src/components/viewport3d/fit-camera.ts
index 8bea125a..0fd8ee9e 100644
--- a/freemocap-ui-old/src/components/viewport3d/fit-camera.ts
+++ b/freemocap-ui-old/src/components/viewport3d/fit-camera.ts
@@ -1,6 +1,6 @@
-import { Box3, Vector3 } from "three";
+import {Box3, Vector3} from "three";
import type CameraControlsImpl from "camera-controls";
-import { Z_OFFSET } from "@/components/viewport3d/skeleton-config";
+import {Z_OFFSET} from "@/components/viewport3d/skeleton-config";
import {Point3d} from "@/services";
const PADDING = 0.5;
diff --git a/freemocap-ui-old/src/components/viewport3d/skeleton-colors.ts b/freemocap-ui-old/src/components/viewport3d/skeleton-colors.ts
index 06c29589..a2e5cf2e 100644
--- a/freemocap-ui-old/src/components/viewport3d/skeleton-colors.ts
+++ b/freemocap-ui-old/src/components/viewport3d/skeleton-colors.ts
@@ -1,4 +1,4 @@
-import { Color } from "three";
+import {Color} from "three";
export const SKELETON_COLORS = {
left: new Color('#4488FF'),
diff --git a/freemocap-ui-old/src/components/viewport3d/skeleton-config.ts b/freemocap-ui-old/src/components/viewport3d/skeleton-config.ts
index d69fb3f3..256e688f 100644
--- a/freemocap-ui-old/src/components/viewport3d/skeleton-config.ts
+++ b/freemocap-ui-old/src/components/viewport3d/skeleton-config.ts
@@ -1,6 +1,6 @@
-import { Color } from "three";
-import { PointStyle } from "@/components/viewport3d/viewport3d-types";
-import { buildFaceContourSegments, buildFaceContourColors } from "@/components/viewport3d/face-contours";
+import {Color} from "three";
+import {PointStyle} from "@/components/viewport3d/viewport3d-types";
+import {buildFaceContourColors, buildFaceContourSegments} from "@/components/viewport3d/face-contours";
import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
// Maximum tracked points the instanced mesh can hold
@@ -165,4 +165,4 @@ export const SEGMENT_DEFINITIONS: Record<string, { proximal: string; distal: str
export const MAX_SEGMENTS = Object.keys(SEGMENT_DEFINITIONS).length;
// Colors in matching order: body+hand first, then face contours
-export const SEGMENT_COLORS: Color[] = [...BODY_HAND_COLORS, ...FACE_COLORS];
\ No newline at end of file
+export const SEGMENT_COLORS: Color[] = [...BODY_HAND_COLORS, ...FACE_COLORS];
diff --git a/freemocap-ui-old/src/components/viewport3d/viewport3d-types.ts b/freemocap-ui-old/src/components/viewport3d/viewport3d-types.ts
index 7474ed3a..25b50c69 100644
--- a/freemocap-ui-old/src/components/viewport3d/viewport3d-types.ts
+++ b/freemocap-ui-old/src/components/viewport3d/viewport3d-types.ts
@@ -1,4 +1,4 @@
-import { Color } from "three";
+import {Color} from "three";
export type { Point3d } from "@/services/server/ServerContextProvider";
diff --git a/freemocap-ui-old/src/components/viewport3d/virtual-points.ts b/freemocap-ui-old/src/components/viewport3d/virtual-points.ts
index 424cfb40..1daf859f 100644
--- a/freemocap-ui-old/src/components/viewport3d/virtual-points.ts
+++ b/freemocap-ui-old/src/components/viewport3d/virtual-points.ts
@@ -1,4 +1,4 @@
-import { Point3d } from "@/components/viewport3d/viewport3d-types";
+import {Point3d} from "@/components/viewport3d/viewport3d-types";
/**
* Resolve a point name to a 3D position. Handles both raw landmark names
diff --git a/freemocap-ui-old/src/hooks/useMocap.ts b/freemocap-ui-old/src/hooks/useMocap.ts
index 0233834a..a24d380a 100644
--- a/freemocap-ui-old/src/hooks/useMocap.ts
+++ b/freemocap-ui-old/src/hooks/useMocap.ts
@@ -2,27 +2,27 @@ import {useCallback} from 'react';
import {useAppDispatch, useAppSelector} from '@/store/hooks';
import {useElectronIPC} from '@/services';
import {
+ manualMocapRecordingPathChanged,
+ manualMocapRecordingPathCleared,
MediapipeDetectorConfig,
- RealtimeFilterConfig,
mocapDetectorConfigReplaced,
mocapDetectorConfigUpdated,
- skeletonFilterConfigReplaced,
- skeletonFilterConfigUpdated,
mocapDirectoryInfoUpdated,
mocapErrorCleared,
- manualMocapRecordingPathChanged,
- manualMocapRecordingPathCleared,
+ processMocapRecording,
+ RealtimeFilterConfig,
+ selectCanProcessMocapRecording,
+ selectCanStartMocapRecording,
+ selectIsUsingManualMocapPath,
selectMocap,
selectMocapDetectorConfig,
- selectSkeletonFilterConfig,
selectMocapDirectoryInfo,
selectMocapRecordingPath,
- selectCanProcessMocapRecording,
- selectCanStartMocapRecording,
- selectIsUsingManualMocapPath,
+ selectSkeletonFilterConfig,
+ skeletonFilterConfigReplaced,
+ skeletonFilterConfigUpdated,
startMocapRecording,
stopMocapRecording,
- processMocapRecording,
updateMocapConfigOnServer,
} from "@/store/slices/mocap";
diff --git a/freemocap-ui-old/src/i18n/i18n.ts b/freemocap-ui-old/src/i18n/i18n.ts
index fb47193a..2cd06a51 100644
--- a/freemocap-ui-old/src/i18n/i18n.ts
+++ b/freemocap-ui-old/src/i18n/i18n.ts
@@ -1,5 +1,5 @@
import i18n from "i18next";
-import { initReactI18next } from "react-i18next";
+import {initReactI18next} from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector";
// Only eagerly load the fallback locale β€” all others are lazy-loaded on demand
diff --git a/freemocap-ui-old/src/layout/AppContent.tsx b/freemocap-ui-old/src/layout/AppContent.tsx
index 535275c4..efef4f37 100644
--- a/freemocap-ui-old/src/layout/AppContent.tsx
+++ b/freemocap-ui-old/src/layout/AppContent.tsx
@@ -1,13 +1,13 @@
import * as React from 'react';
-import { ThemeProvider } from '@mui/material/styles';
-import { HashRouter } from 'react-router-dom';
-import { CssBaseline } from '@mui/material';
-import { BasePanelLayout } from '@/layout/BasePanelLayout';
-import { createExtendedTheme } from '@/layout/paperbase-theme';
-import { useAppSelector } from '@/store';
-import { BaseContentRouter } from '@/layout/BaseContentRouter';
-import { FirstLaunchRedirect } from '@/components/setup-wizard/FirstLaunchRedirect';
-import { MenuNavigationListener } from '@/components/MenuNavigationListener';
+import {ThemeProvider} from '@mui/material/styles';
+import {HashRouter} from 'react-router-dom';
+import {CssBaseline} from '@mui/material';
+import {BasePanelLayout} from '@/layout/BasePanelLayout';
+import {createExtendedTheme} from '@/layout/paperbase-theme';
+import {useAppSelector} from '@/store';
+import {BaseContentRouter} from '@/layout/BaseContentRouter';
+import {FirstLaunchRedirect} from '@/components/setup-wizard/FirstLaunchRedirect';
+import {MenuNavigationListener} from '@/components/MenuNavigationListener';
export const AppContent = function () {
const themeMode = useAppSelector(state => state.theme.mode);
diff --git a/freemocap-ui-old/src/layout/BaseContentRouter.tsx b/freemocap-ui-old/src/layout/BaseContentRouter.tsx
index cb1eca53..6fabd12c 100644
--- a/freemocap-ui-old/src/layout/BaseContentRouter.tsx
+++ b/freemocap-ui-old/src/layout/BaseContentRouter.tsx
@@ -1,10 +1,10 @@
import React from 'react';
-import { Navigate, Route, Routes } from 'react-router-dom';
-import { CamerasPage } from '@/pages/CamerasPage';
+import {Navigate, Route, Routes} from 'react-router-dom';
+import {CamerasPage} from '@/pages/CamerasPage';
import VideosPage from '@/pages/VideosPage';
import WelcomePage from '@/pages/WelcomePage';
-import { Viewport3dPage } from '@/pages/Viewport3dPage';
-import { SettingsPage } from "@/pages/SettingsPage";
+import {Viewport3dPage} from '@/pages/Viewport3dPage';
+import {SettingsPage} from "@/pages/SettingsPage";
export const BaseContentRouter: React.FC = () => {
return (
diff --git a/freemocap-ui-old/src/pages/SettingsPage.tsx b/freemocap-ui-old/src/pages/SettingsPage.tsx
index ffe2731b..a1562156 100644
--- a/freemocap-ui-old/src/pages/SettingsPage.tsx
+++ b/freemocap-ui-old/src/pages/SettingsPage.tsx
@@ -1,30 +1,28 @@
-import React, { useState, useCallback, useEffect } from 'react';
+import React, {useCallback, useEffect, useState} from 'react';
import {
+ Alert,
Box,
- Typography,
- Switch,
- FormControlLabel,
- TextField,
- Slider,
- Select,
- MenuItem,
+ Button,
+ Chip,
+ CircularProgress,
+ Divider,
FormControl,
- InputLabel,
- Paper,
+ IconButton,
+ LinearProgress,
List,
ListItemButton,
ListItemIcon,
ListItemText,
- Divider,
- Chip,
- Button,
- CircularProgress,
- Alert,
+ MenuItem,
+ Paper,
+ Select,
+ Slider,
+ Switch,
+ TextField,
Tooltip,
- LinearProgress,
- IconButton,
+ Typography,
} from '@mui/material';
-import { useTheme } from '@mui/material/styles';
+import {useTheme} from '@mui/material/styles';
import PaletteIcon from '@mui/icons-material/Palette';
import DnsIcon from '@mui/icons-material/Dns';
import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';
@@ -43,35 +41,35 @@ import DownloadIcon from '@mui/icons-material/Download';
import RefreshIcon from '@mui/icons-material/Refresh';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import CodeIcon from '@mui/icons-material/Code';
-import { useNavigate } from 'react-router-dom';
+import {useNavigate} from 'react-router-dom';
import {
- useAppDispatch,
- useAppSelector,
- themeModeSet,
- themeModeToggled,
- recordingDirectoryChanged,
- useDelayStartToggled,
- delaySecondsChanged,
- useTimestampToggled,
- useIncrementToggled,
baseNameChanged,
- recordingTagChanged,
createSubfolderToggled,
customSubfolderNameChanged,
+ delaySecondsChanged,
+ recordingDirectoryChanged,
+ recordingTagChanged,
selectServerSettings,
+ themeModeSet,
+ themeModeToggled,
+ useAppDispatch,
+ useAppSelector,
+ useDelayStartToggled,
+ useIncrementToggled,
+ useTimestampToggled,
} from '@/store';
-import { ThemeMode } from '@/store/slices/theme/theme-types';
-import { useCalibration } from '@/hooks/useCalibration';
-import { useMocap } from '@/hooks/useMocap';
-import { useServer } from '@/hooks/useServer';
-import { useElectronIPC } from '@/services';
+import {ThemeMode} from '@/store/slices/theme/theme-types';
+import {useCalibration} from '@/hooks/useCalibration';
+import {useMocap} from '@/hooks/useMocap';
+import {useServer} from '@/hooks/useServer';
+import {useElectronIPC} from '@/services';
import {
- MediapipeModelComplexity,
- MEDIAPIPE_REALTIME_PRESET,
- MEDIAPIPE_POSTHOC_PRESET,
DEFAULT_REALTIME_FILTER_CONFIG,
+ MEDIAPIPE_POSTHOC_PRESET,
+ MEDIAPIPE_REALTIME_PRESET,
+ MediapipeModelComplexity,
} from '@/store/slices/mocap';
-import { SettingsEditor } from '@/components/settings-editor/SettingsEditor';
+import {SettingsEditor} from '@/components/settings-editor/SettingsEditor';
// ── Section IDs ──
diff --git a/freemocap-ui-old/src/services/server/ServerContextProvider.tsx b/freemocap-ui-old/src/services/server/ServerContextProvider.tsx
index 422095e6..1c7d2eaf 100644
--- a/freemocap-ui-old/src/services/server/ServerContextProvider.tsx
+++ b/freemocap-ui-old/src/services/server/ServerContextProvider.tsx
@@ -18,8 +18,12 @@ import {CharucoObservation} from "@/services/server/server-helpers/image-overlay
import {OverlayManager} from "@/services/server/server-helpers/image-overlay/overlay-renderer-factory";
import {MediapipeObservation} from "@/services/server/server-helpers/image-overlay/mediapipe-overlay-renderer";
import {
- arraysEqual, handleModelInfoUpdate,
- isCharucoOverlayDataMessage, isFramerateUpdate, isLogRecord, isMediapipeOverlayDataMessage,
+ arraysEqual,
+ handleModelInfoUpdate,
+ isCharucoOverlayDataMessage,
+ isFramerateUpdate,
+ isLogRecord,
+ isMediapipeOverlayDataMessage,
isSettingsStateMessage
} from "@/services/server/server-helpers/websocket-message-types";
import {RigidBodyPose} from "@/components/viewport3d/viewport3d-types";
diff --git a/freemocap-ui-old/src/services/server/server-helpers/image-overlay/image-overlay-system.ts b/freemocap-ui-old/src/services/server/server-helpers/image-overlay/image-overlay-system.ts
index f0fe2b21..f574ac73 100644
--- a/freemocap-ui-old/src/services/server/server-helpers/image-overlay/image-overlay-system.ts
+++ b/freemocap-ui-old/src/services/server/server-helpers/image-overlay/image-overlay-system.ts
@@ -1,5 +1,4 @@
// base-overlay-renderer.ts
-import { z } from 'zod';
// Generic types for any observation
export interface Point2D {
@@ -300,4 +299,4 @@ export abstract class BaseOverlayRenderer {
public destroy(): void {
// Cleanup if needed
}
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts b/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts
index 060463b3..0dbb8528 100644
--- a/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts
+++ b/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts
@@ -1,6 +1,6 @@
// overlay-renderer-factory.ts
-import { CharucoOverlayRenderer } from './charuco-overlay-renderer';
-import { MediapipeOverlayRenderer, MediapipeObservation } from './mediapipe-overlay-renderer';
+import {CharucoOverlayRenderer} from './charuco-overlay-renderer';
+import {MediapipeObservation, MediapipeOverlayRenderer} from './mediapipe-overlay-renderer';
import {BaseOverlayRenderer, ModelInfo} from "@/services/server/server-helpers/image-overlay/image-overlay-system";
import {CharucoObservation} from "@/services/server/server-helpers/image-overlay/charuco-types";
@@ -142,4 +142,4 @@ export class OverlayManager {
this.charucoRenderer = new CharucoOverlayRenderer();
this.mediapipeRenderer = new MediapipeOverlayRenderer();
}
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-types.ts b/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-types.ts
index ea043a32..4bdddee8 100644
--- a/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-types.ts
+++ b/freemocap-ui-old/src/services/server/server-helpers/image-overlay/overlay-types.ts
@@ -1,5 +1,11 @@
-import {CharucoObservation, CharucoOverlayDataMessage} from "@/services/server/server-helpers/image-overlay/charuco-types";
-import {MediapipeObservation, MediapipeOverlayDataMessage} from "@/services/server/server-helpers/image-overlay/mediapipe-types";
+import {
+ CharucoObservation,
+ CharucoOverlayDataMessage
+} from "@/services/server/server-helpers/image-overlay/charuco-types";
+import {
+ MediapipeObservation,
+ MediapipeOverlayDataMessage
+} from "@/services/server/server-helpers/image-overlay/mediapipe-types";
// Union type for all observation data messages
export type ObservationDataMessage = CharucoOverlayDataMessage | MediapipeOverlayDataMessage;
diff --git a/freemocap-ui-old/src/store/slices/settings/settings-types.ts b/freemocap-ui-old/src/store/slices/settings/settings-types.ts
index f81ef937..69675a7f 100644
--- a/freemocap-ui-old/src/store/slices/settings/settings-types.ts
+++ b/freemocap-ui-old/src/store/slices/settings/settings-types.ts
@@ -119,15 +119,7 @@ export interface BackendPipelineSettings {
is_paused: boolean;
}
-// ---------------------------------------------------------------------------
-// VMC settings (mirrors VMCSettings)
-// ---------------------------------------------------------------------------
-export interface BackendVMCSettings {
- enabled: boolean;
- host: string;
- port: number;
-}
// ---------------------------------------------------------------------------
// Top-level settings blob
@@ -138,7 +130,6 @@ export interface FreeMoCapSettings {
pipeline: BackendPipelineSettings;
calibration: BackendCalibrationSettings;
mocap: BackendMocapSettings;
- vmc: BackendVMCSettings;
}
// ---------------------------------------------------------------------------
diff --git a/freemocap-ui-old/vitest.config.ts b/freemocap-ui-old/vitest.config.ts
index 24dce78d..c53395f6 100644
--- a/freemocap-ui-old/vitest.config.ts
+++ b/freemocap-ui-old/vitest.config.ts
@@ -1,5 +1,5 @@
/// <reference types="vitest" />
-import { defineConfig } from 'vite';
+import {defineConfig} from 'vite';
import path from 'path';
export default defineConfig({
diff --git a/freemocap-ui/electron/main/api.ts b/freemocap-ui/electron/main/api.ts
index 1ebe73ce..a02819e5 100644
--- a/freemocap-ui/electron/main/api.ts
+++ b/freemocap-ui/electron/main/api.ts
@@ -1,16 +1,17 @@
-import { initTRPC } from '@trpc/server';
-import { z } from 'zod';
+import {initTRPC} from '@trpc/server';
+import {z} from 'zod';
import superjson from 'superjson';
// Services
-import { PythonServer } from './services/python-server';
-import { dialog, shell, app } from 'electron';
+import {PythonServer} from './services/python-server';
+import {app, dialog, shell} from 'electron';
import pkg from 'electron-updater';
-const { autoUpdater } = pkg;
import path from 'node:path';
import fs from 'node:fs';
import os from 'node:os';
-import { APP_PATHS } from './app-paths';
+import {APP_PATHS} from './app-paths';
+
+const { autoUpdater } = pkg;
// Configure auto-updater (user triggers download manually)
autoUpdater.autoDownload = false;
diff --git a/freemocap-ui/electron/main/index.ts b/freemocap-ui/electron/main/index.ts
index 280f090d..50a7ea2c 100644
--- a/freemocap-ui/electron/main/index.ts
+++ b/freemocap-ui/electron/main/index.ts
@@ -1,11 +1,11 @@
// electron/main/index.ts
-import { app, BrowserWindow } from 'electron';
-import { setupIPC } from './ipc';
-import { WindowManager } from './services/window-manager';
-import { PythonServer } from './services/python-server';
-import { UpdateHandler } from './services/update-handler';
-import { LifecycleLogger } from './services/logger';
-import { buildApplicationMenu } from './services/menu-builder';
+import {app, BrowserWindow} from 'electron';
+import {setupIPC} from './ipc';
+import {WindowManager} from './services/window-manager';
+import {PythonServer} from './services/python-server';
+import {UpdateHandler} from './services/update-handler';
+import {LifecycleLogger} from './services/logger';
+import {buildApplicationMenu} from './services/menu-builder';
// import os from 'node:os'; // Uncomment if needed for platform-specific checks
// Export environment configuration
diff --git a/freemocap-ui/electron/main/ipc.ts b/freemocap-ui/electron/main/ipc.ts
index 3e20aa90..3caa0f49 100644
--- a/freemocap-ui/electron/main/ipc.ts
+++ b/freemocap-ui/electron/main/ipc.ts
@@ -1,9 +1,9 @@
// electron/main/ipc.ts
-import { ipcMain } from 'electron';
-import { api } from './api';
+import {ipcMain} from 'electron';
+import {api} from './api';
import superjson from 'superjson';
-import { buildApplicationMenu } from './services/menu-builder';
-import type { MenuBuildParams } from './services/menu-builder';
+import type {MenuBuildParams} from './services/menu-builder';
+import {buildApplicationMenu} from './services/menu-builder';
export function setupIPC(): void {
ipcMain.handle('trpc', async (_event, { path, input }) => {
diff --git a/freemocap-ui/electron/main/services/app-menu.ts b/freemocap-ui/electron/main/services/app-menu.ts
index 15d215ab..cb5c3a09 100644
--- a/freemocap-ui/electron/main/services/app-menu.ts
+++ b/freemocap-ui/electron/main/services/app-menu.ts
@@ -1,4 +1,4 @@
-import { Menu, BrowserWindow, shell, app } from 'electron';
+import {app, BrowserWindow, Menu, shell} from 'electron';
import path from 'node:path';
import os from 'node:os';
@@ -141,4 +141,4 @@ function sendNavigate(window: BrowserWindow, route: string): void {
if (window.isDestroyed()) return;
window.webContents.send('navigate', route);
window.focus();
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui/electron/main/services/dependency-manager.ts b/freemocap-ui/electron/main/services/dependency-manager.ts
index c4aab5f1..8f395f94 100644
--- a/freemocap-ui/electron/main/services/dependency-manager.ts
+++ b/freemocap-ui/electron/main/services/dependency-manager.ts
@@ -1,5 +1,5 @@
-import { exec } from 'node:child_process';
-import { promisify } from 'node:util';
+import {exec} from 'node:child_process';
+import {promisify} from 'node:util';
import fs from 'node:fs';
import path from 'node:path';
import os from 'node:os';
@@ -369,4 +369,4 @@ export class DependencyManager {
throw new Error(`Unknown dependency: ${dependencyId}`);
}
}
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui/electron/main/services/logger.ts b/freemocap-ui/electron/main/services/logger.ts
index deb6a09f..09cb8131 100644
--- a/freemocap-ui/electron/main/services/logger.ts
+++ b/freemocap-ui/electron/main/services/logger.ts
@@ -1,5 +1,5 @@
-import { app, BrowserWindow } from 'electron';
-import { exec } from 'child_process';
+import {app, BrowserWindow} from 'electron';
+import {exec} from 'child_process';
export class LifecycleLogger {
static logProcessInfo() {
diff --git a/freemocap-ui/electron/main/services/menu-builder.ts b/freemocap-ui/electron/main/services/menu-builder.ts
index 2e4aefc2..cd78a118 100644
--- a/freemocap-ui/electron/main/services/menu-builder.ts
+++ b/freemocap-ui/electron/main/services/menu-builder.ts
@@ -1,5 +1,5 @@
// electron/main/services/menu-builder.ts
-import { app, BrowserWindow, Menu, MenuItemConstructorOptions, shell } from 'electron';
+import {app, BrowserWindow, Menu, MenuItemConstructorOptions, shell} from 'electron';
// Channel name for menu-triggered actions sent to the renderer
const MENU_CHANNEL = 'menu-action';
diff --git a/freemocap-ui/electron/main/services/system-scanner.ts b/freemocap-ui/electron/main/services/system-scanner.ts
index f2c4b163..435e2dc7 100644
--- a/freemocap-ui/electron/main/services/system-scanner.ts
+++ b/freemocap-ui/electron/main/services/system-scanner.ts
@@ -1,9 +1,9 @@
import os from 'node:os';
import fs from 'node:fs';
import path from 'node:path';
-import { execFile, exec } from 'node:child_process';
-import { promisify } from 'node:util';
-import { app } from 'electron';
+import {exec, execFile} from 'node:child_process';
+import {promisify} from 'node:util';
+import {app} from 'electron';
const execFileAsync = promisify(execFile);
const execAsync = promisify(exec);
diff --git a/freemocap-ui/electron/main/services/update-handler.ts b/freemocap-ui/electron/main/services/update-handler.ts
index 08f8633c..fb8ed87e 100644
--- a/freemocap-ui/electron/main/services/update-handler.ts
+++ b/freemocap-ui/electron/main/services/update-handler.ts
@@ -1,4 +1,4 @@
-import { app, ipcMain, BrowserWindow } from 'electron';
+import {app, BrowserWindow, ipcMain} from 'electron';
import * as electronUpdater from 'electron-updater';
// Access autoUpdater from the namespace import (ESM/CJS interop)
diff --git a/freemocap-ui/electron/main/services/window-manager.ts b/freemocap-ui/electron/main/services/window-manager.ts
index 1e2f219a..9c168f48 100644
--- a/freemocap-ui/electron/main/services/window-manager.ts
+++ b/freemocap-ui/electron/main/services/window-manager.ts
@@ -1,7 +1,7 @@
-import { BrowserWindow, shell } from 'electron';
-import { LifecycleLogger } from './logger';
-import { APP_ENVIRONMENT } from '../index';
-import { APP_PATHS } from '../app-paths';
+import {BrowserWindow, shell} from 'electron';
+import {LifecycleLogger} from './logger';
+import {APP_ENVIRONMENT} from '../index';
+import {APP_PATHS} from '../app-paths';
export class WindowManager {
private static mainWindow: BrowserWindow | null = null;
diff --git a/freemocap-ui/electron/preload/index.ts b/freemocap-ui/electron/preload/index.ts
index 337e7e50..43d769a7 100644
--- a/freemocap-ui/electron/preload/index.ts
+++ b/freemocap-ui/electron/preload/index.ts
@@ -1,4 +1,4 @@
-import { contextBridge, ipcRenderer } from 'electron';
+import {contextBridge, ipcRenderer} from 'electron';
// Expose a simple tRPC bridge + menu action listener + menu label updater
contextBridge.exposeInMainWorld('electronAPI', {
diff --git a/freemocap-ui/src/components/LogTerminal.tsx b/freemocap-ui/src/components/LogTerminal.tsx
index a70cd819..3546a64d 100644
--- a/freemocap-ui/src/components/LogTerminal.tsx
+++ b/freemocap-ui/src/components/LogTerminal.tsx
@@ -1,28 +1,19 @@
// LogTerminal.tsx
+import {alpha, Box, IconButton, TextField, ToggleButton, ToggleButtonGroup, Tooltip, useTheme,} from "@mui/material";
+import React, {useCallback, useEffect, useMemo, useRef, useState} from "react";
+import {useServer} from "@/services/server/ServerContextProvider";
+import {LogRecord, LogSnapshot} from "@/services/server/server-helpers/log-store";
import {
- alpha,
- Box,
- IconButton,
- TextField,
- ToggleButton,
- ToggleButtonGroup,
- Tooltip,
- useTheme,
-} from "@mui/material";
-import React, { useCallback, useEffect, useMemo, useRef, useState } from "react";
-import { useServer } from "@/services/server/ServerContextProvider";
-import { LogRecord, LogSnapshot } from "@/services/server/server-helpers/log-store";
-import {
+ ContentCopy as ContentCopyIcon,
DeleteSweep as DeleteSweepIcon,
Pause as PauseIcon,
PlayArrow as PlayArrowIcon,
- Search as SearchIcon,
- Warning as WarningIcon,
- ContentCopy as ContentCopyIcon,
Save as SaveIcon,
SaveAlt as ScrollToBottomIcon,
+ Search as SearchIcon,
+ Warning as WarningIcon,
} from "@mui/icons-material";
-import { useTranslation } from "react-i18next";
+import {useTranslation} from "react-i18next";
const LOG_POLL_INTERVAL_MS = 500;
diff --git a/freemocap-ui/src/components/ServerConnectionStatus.tsx b/freemocap-ui/src/components/ServerConnectionStatus.tsx
index 8fb894c2..7ebe806e 100644
--- a/freemocap-ui/src/components/ServerConnectionStatus.tsx
+++ b/freemocap-ui/src/components/ServerConnectionStatus.tsx
@@ -1,22 +1,22 @@
-import React, { useState, useEffect, useCallback, useRef } from 'react';
+import React, {useCallback, useEffect, useRef, useState} from 'react';
import {
Box,
- Typography,
- IconButton,
Button,
- Collapse,
- Tooltip,
+ Chip,
CircularProgress,
- Select,
- MenuItem,
+ Collapse,
FormControl,
+ FormControlLabel,
+ IconButton,
InputLabel,
- Chip,
+ MenuItem,
+ Select,
Switch,
- FormControlLabel,
TextField,
+ Tooltip,
+ Typography,
} from '@mui/material';
-import { useTheme } from '@mui/material/styles';
+import {useTheme} from '@mui/material/styles';
import WifiIcon from '@mui/icons-material/Wifi';
import WifiOffIcon from '@mui/icons-material/WifiOff';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
@@ -26,10 +26,10 @@ import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
import RefreshIcon from '@mui/icons-material/Refresh';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
-import { useServer } from '@/services/server/ServerContextProvider';
-import { useTranslation } from "react-i18next";
-import { useElectronIPC } from '@/services';
-import { DEFAULT_HOST, DEFAULT_PORT } from '@/services/server/server-helpers/server-urls';
+import {useServer} from '@/services/server/ServerContextProvider';
+import {useTranslation} from "react-i18next";
+import {useElectronIPC} from '@/services';
+import {DEFAULT_HOST, DEFAULT_PORT} from '@/services/server/server-helpers/server-urls';
interface ExecutableCandidate {
name: string;
diff --git a/freemocap-ui/src/components/camera-view-settings-overlay/CamerasViewSettingsOverlay.tsx b/freemocap-ui/src/components/camera-view-settings-overlay/CamerasViewSettingsOverlay.tsx
deleted file mode 100644
index bf23fed3..00000000
--- a/freemocap-ui/src/components/camera-view-settings-overlay/CamerasViewSettingsOverlay.tsx
+++ /dev/null
@@ -1,212 +0,0 @@
-import React, { useState } from 'react';
-import {
- Box,
- IconButton,
- Paper,
- TextField,
- Checkbox,
- FormControlLabel,
- Tooltip,
- Divider,
- ToggleButton,
- ToggleButtonGroup,
- Switch,
-} from '@mui/material';
-import SettingsIcon from '@mui/icons-material/Settings';
-import CloseIcon from '@mui/icons-material/Close';
-import GridViewIcon from '@mui/icons-material/GridView';
-import ViewSidebarIcon from '@mui/icons-material/ViewSidebar';
-import SplitscreenIcon from '@mui/icons-material/Splitscreen';
-import ViewAgendaIcon from '@mui/icons-material/ViewAgenda';
-import { useServer } from '@/services/server/ServerContextProvider';
-import { useTranslation } from 'react-i18next';
-import type { CameraSettings, LayoutDirection } from '@/pages/CamerasPage';
-
-interface CamerasViewSettingsOverlayProps {
- settings: CameraSettings;
- onSettingsChange: (partial: Partial<CameraSettings>) => void;
- onResetLayout: () => void;
-}
-
-export const CamerasViewSettingsOverlay: React.FC<CamerasViewSettingsOverlayProps> = ({
- settings,
- onSettingsChange,
- onResetLayout,
-}) => {
- const { connectedCameraIds } = useServer();
- const { t } = useTranslation();
- const [isOpen, setIsOpen] = useState<boolean>(false);
- const [isAuto, setIsAuto] = useState<boolean>(settings.columns === null);
- const [manualColumns, setManualColumns] = useState<number>(settings.columns ?? 2);
-
- const getAutoColumns = (total: number): number => {
- if (total <= 1) return 1;
- if (total <= 4) return 2;
- if (total <= 9) return 3;
- return 4;
- };
-
- const autoColumns = getAutoColumns(connectedCameraIds.length);
-
- const handleAutoChange = (event: React.ChangeEvent<HTMLInputElement>) => {
- const checked = event.target.checked;
- setIsAuto(checked);
- onSettingsChange({ columns: checked ? null : manualColumns });
- };
-
- const handleColumnsChange = (event: React.ChangeEvent<HTMLInputElement>) => {
- const value = parseInt(event.target.value);
- if (!isNaN(value) && value > 0) {
- setManualColumns(value);
- if (isAuto) setIsAuto(false);
- onSettingsChange({ columns: value });
- }
- };
-
- const handle3dViewToggle = (event: React.ChangeEvent<HTMLInputElement>) => {
- onSettingsChange({ show3dView: event.target.checked });
- };
-
- const handleLayoutDirectionChange = (
- _event: React.MouseEvent<HTMLElement>,
- newDirection: LayoutDirection | null,
- ) => {
- if (newDirection !== null) {
- onSettingsChange({ layoutDirection: newDirection });
- }
- };
-
- return (
- <>
- {/* Settings toggle button */}
- <Box sx={{ position: 'absolute', top: 16, right: 16, zIndex: 1000 }}>
- <Tooltip title={isOpen ? t('closeSettings') : t('gridSettings')}>
- <IconButton
- onClick={() => setIsOpen(!isOpen)}
- sx={{
- backgroundColor: 'background.paper',
- boxShadow: 2,
- '&:hover': { backgroundColor: 'action.hover' },
- }}
- >
- {isOpen ? <CloseIcon /> : <SettingsIcon />}
- </IconButton>
- </Tooltip>
- </Box>
-
- {/* Settings panel */}
- {isOpen && (
- <Paper
- elevation={8}
- sx={{
- position: 'absolute',
- top: 70,
- right: 16,
- zIndex: 999,
- padding: 2,
- minWidth: 260,
- display: 'flex',
- flexDirection: 'column',
- gap: 2,
- }}
- >
- {/* ── Grid columns ──────────────────────────── */}
- <Box>
- <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, mb: 1.5 }}>
- <GridViewIcon fontSize="small" />
- <Box sx={{ fontWeight: 600, fontSize: '0.875rem' }}>{t('gridColumns')}</Box>
- </Box>
-
- <Box sx={{ display: 'flex', alignItems: 'flex-start', gap: 1 }}>
- <FormControlLabel
- control={
- <Checkbox
- checked={isAuto}
- onChange={handleAutoChange}
- sx={{ '&.Mui-checked': { color: 'text.primary' } }}
- />
- }
- label={t('auto')}
- />
- <TextField
- type="number"
- label={t('columns')}
- value={isAuto ? autoColumns : manualColumns}
- onChange={handleColumnsChange}
- fullWidth
- inputProps={{ min: 1, step: 1 }}
- helperText={
- isAuto
- ? `Auto-detected: ${autoColumns}`
- : 'Enter any positive number'
- }
- />
- </Box>
- </Box>
-
- <Divider />
-
- {/* ── 3D viewport toggle ────────────────────── */}
- <Box>
- <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, mb: 0.5 }}>
- <ViewSidebarIcon fontSize="small" />
- <Box sx={{ fontWeight: 600, fontSize: '0.875rem' }}>3D Viewport</Box>
- </Box>
-
- <FormControlLabel
- control={
- <Switch
- checked={settings.show3dView}
- onChange={handle3dViewToggle}
- size="small"
- />
- }
- label={settings.show3dView ? 'Visible' : 'Hidden'}
- sx={{ ml: 0 }}
- />
- </Box>
-
- {/* ── Layout direction (only when 3D is on) ─── */}
- {settings.show3dView && (
- <>
- <Divider />
-
- <Box>
- <Box sx={{ display: 'flex', alignItems: 'center', gap: 1, mb: 1 }}>
- <SplitscreenIcon fontSize="small" />
- <Box sx={{ fontWeight: 600, fontSize: '0.875rem' }}>Layout</Box>
- </Box>
-
- <ToggleButtonGroup
- value={settings.layoutDirection}
- exclusive
- onChange={handleLayoutDirectionChange}
- size="small"
- fullWidth
- >
- <ToggleButton value="horizontal" aria-label="side by side">
- <Tooltip title="Side by side">
- <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
- {/* Two vertical panels icon */}
- <ViewSidebarIcon fontSize="small" />
- <Box sx={{ fontSize: '0.75rem' }}>Side by side</Box>
- </Box>
- </Tooltip>
- </ToggleButton>
- <ToggleButton value="vertical" aria-label="stacked">
- <Tooltip title="Stacked">
- <Box sx={{ display: 'flex', alignItems: 'center', gap: 0.5 }}>
- <ViewAgendaIcon fontSize="small" />
- <Box sx={{ fontSize: '0.75rem' }}>Stacked</Box>
- </Box>
- </Tooltip>
- </ToggleButton>
- </ToggleButtonGroup>
- </Box>
- </>
- )}
- </Paper>
- )}
- </>
- );
-};
diff --git a/freemocap-ui/src/components/camera-view-settings-overlay/ImageScaleSlider.tsx b/freemocap-ui/src/components/camera-view-settings-overlay/ImageScaleSlider.tsx
deleted file mode 100644
index 18beb8dd..00000000
--- a/freemocap-ui/src/components/camera-view-settings-overlay/ImageScaleSlider.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import React from 'react';
-import {Box, Slider, Tooltip, Typography, useTheme} from '@mui/material';
-
-interface ImageScaleSliderProps {
- scale: number;
- onScaleChange: (value: number) => void;
-}
-
-const ValueLabelComponent = (props: {
- children: React.ReactElement;
- value: number;
-}) => {
- const {children, value} = props;
-
- return (
- <Tooltip title={
- <span>
- {`Scale: ${value.toFixed(1)}`}
- </span>
- }>
- {children}
- </Tooltip>
- );
-};
-
-export const ImageScaleSlider: React.FC<ImageScaleSliderProps> = ({
- scale = 0.5,
- onScaleChange,
- }) => {
- const theme = useTheme();
-
- const marks = [
- {value: 0.1, label: '0.1'},
- {value: 0.5, label: '0.5 (default)'},
- {value: 2.0, label: '2.0'},
- ];
-
- return (
- <Box>
- <Typography variant="body2" color="text.secondary" gutterBottom>
- Image Scale
- </Typography>
- <Slider
- value={scale}
- min={0.1}
- max={2.0}
- step={0.1}
- marks={marks}
- valueLabelDisplay="auto"
- onChange={(_, value) => onScaleChange(value as number)}
- components={{
- ValueLabel: ValueLabelComponent,
- }}
- sx={{
- color: theme.palette.primary.light,
- '& .MuiSlider-thumb': {
- '&:hover, &.Mui-focusVisible': {
- boxShadow: `0px 0px 0px 8px ${theme.palette.primary.light}33`,
- },
- },
- }}
- />
- </Box>
- );
-};
diff --git a/freemocap-ui/src/components/camera-views/CameraView.tsx b/freemocap-ui/src/components/camera-views/CameraView.tsx
index 14cc8f6b..73b3f7b1 100644
--- a/freemocap-ui/src/components/camera-views/CameraView.tsx
+++ b/freemocap-ui/src/components/camera-views/CameraView.tsx
@@ -1,6 +1,6 @@
-import React, { useEffect, useRef, useMemo, memo } from 'react';
-import { useServer } from '@/services/server/ServerContextProvider';
-import { frontendColor, backendColor } from '@/components/framerate-viewer/FrameRateViewer';
+import React, {memo, useEffect, useMemo, useRef} from 'react';
+import {useServer} from '@/services/server/ServerContextProvider';
+import {backendColor, frontendColor} from '@/components/framerate-viewer/FrameRateViewer';
interface CameraViewProps {
cameraId: string;
diff --git a/freemocap-ui/src/components/camera-views/CameraViewsGrid.tsx b/freemocap-ui/src/components/camera-views/CameraViewsGrid.tsx
index 4a71c2e9..4858f775 100644
--- a/freemocap-ui/src/components/camera-views/CameraViewsGrid.tsx
+++ b/freemocap-ui/src/components/camera-views/CameraViewsGrid.tsx
@@ -1,14 +1,14 @@
-import React, { useState, useCallback, useRef, useEffect, useMemo } from "react";
-import { Box, keyframes } from "@mui/material";
-import ReactGridLayout, { noCompactor } from "react-grid-layout";
-import type { Layout, LayoutItem } from "react-grid-layout";
+import React, {useCallback, useEffect, useMemo, useRef, useState} from "react";
+import {Box, keyframes} from "@mui/material";
+import type {Layout, LayoutItem} from "react-grid-layout";
+import ReactGridLayout, {noCompactor} from "react-grid-layout";
import "react-grid-layout/css/styles.css";
import "react-resizable/css/styles.css";
-import { CameraView } from "./CameraView";
-import { useServer } from "@/services/server/ServerContextProvider";
-import { useTranslation } from "react-i18next";
-import { useAppSelector } from "@/store/hooks";
-import { selectConnectedCameras } from "@/store/slices/cameras/cameras-selectors";
+import {CameraView} from "./CameraView";
+import {useServer} from "@/services/server/ServerContextProvider";
+import {useTranslation} from "react-i18next";
+import {useAppSelector} from "@/store/hooks";
+import {selectConnectedCameras} from "@/store/slices/cameras/cameras-selectors";
const recordingBorderPulse = keyframes`
0% { border-color: #ff2020; box-shadow: 0 0 4px rgba(255, 32, 32, 0.4); }
diff --git a/freemocap-ui/src/components/camera-views/ResizableCameraView.tsx b/freemocap-ui/src/components/camera-views/ResizableCameraView.tsx
index b3cf65ef..e4f57859 100644
--- a/freemocap-ui/src/components/camera-views/ResizableCameraView.tsx
+++ b/freemocap-ui/src/components/camera-views/ResizableCameraView.tsx
@@ -1,6 +1,6 @@
-import React, { useState, useCallback, useRef, useEffect } from 'react';
-import { Box } from '@mui/material';
-import { CameraView } from './CameraView';
+import React, {useCallback, useEffect, useRef, useState} from 'react';
+import {Box} from '@mui/material';
+import {CameraView} from './CameraView';
interface ResizableCameraViewProps {
cameraId: string;
diff --git a/freemocap-ui/src/components/common/DirectoryStatusPanel.tsx b/freemocap-ui/src/components/common/DirectoryStatusPanel.tsx
index 824acfca..1b08e418 100644
--- a/freemocap-ui/src/components/common/DirectoryStatusPanel.tsx
+++ b/freemocap-ui/src/components/common/DirectoryStatusPanel.tsx
@@ -1,14 +1,5 @@
import React from "react";
-import {
- Box,
- Chip,
- CircularProgress,
- IconButton,
- Stack,
- Tooltip,
- Typography,
- useTheme,
-} from "@mui/material";
+import {Box, Chip, CircularProgress, IconButton, Stack, Tooltip, Typography, useTheme,} from "@mui/material";
import CheckCircleIcon from "@mui/icons-material/CheckCircle";
import CloseIcon from "@mui/icons-material/Close";
import InfoIcon from "@mui/icons-material/Info";
diff --git a/freemocap-ui/src/components/calibration-control-panel/CalibrationControlPanel.tsx b/freemocap-ui/src/components/control-panels/calibration-control-panel/CalibrationControlPanel.tsx
similarity index 95%
rename from freemocap-ui/src/components/calibration-control-panel/CalibrationControlPanel.tsx
rename to freemocap-ui/src/components/control-panels/calibration-control-panel/CalibrationControlPanel.tsx
index 5b37236f..f4b11701 100644
--- a/freemocap-ui/src/components/calibration-control-panel/CalibrationControlPanel.tsx
+++ b/freemocap-ui/src/components/control-panels/calibration-control-panel/CalibrationControlPanel.tsx
@@ -3,11 +3,9 @@ import {
Alert,
Box,
Button,
- Checkbox,
Chip,
CircularProgress,
FormControl,
- FormControlLabel,
IconButton,
InputAdornment,
InputLabel,
@@ -33,7 +31,7 @@ import {CollapsibleSidebarSection} from "@/components/common/CollapsibleSidebarS
import {DirectoryStatusPanel} from "@/components/common/DirectoryStatusPanel";
import {useCalibration} from "@/hooks/useCalibration";
import {useElectronIPC} from "@/services";
-import {CalibrationSolverSection} from "@/components/calibration-control-panel/CalibrationSolverSection";
+import {CalibrationSolverSection} from "@/components/control-panels/calibration-control-panel/CalibrationSolverSection";
type BoardPreset = "5x3" | "7x5" | "custom";
@@ -369,26 +367,7 @@ export const CalibrationControlPanel: React.FC = () => {
</Alert>
)}
- {/* Live Tracker Toggle */}
- <FormControlLabel
- control={
- <Checkbox
- checked={config.liveTrackCharuco}
- onChange={(e) =>
- updateCalibrationConfig({
- liveTrackCharuco: e.target.checked,
- })
- }
- disabled={isLoading}
- sx={{
- "&.Mui-checked": {
- color: theme.palette.text.primary,
- },
- }}
- />
- }
- label="Live Track Charuco Board"
- />
+
{/* Recording Controls */}
<Stack direction="row" spacing={2}>
diff --git a/freemocap-ui/src/components/calibration-control-panel/CalibrationSolverSection.tsx b/freemocap-ui/src/components/control-panels/calibration-control-panel/CalibrationSolverSection.tsx
similarity index 100%
rename from freemocap-ui/src/components/calibration-control-panel/CalibrationSolverSection.tsx
rename to freemocap-ui/src/components/control-panels/calibration-control-panel/CalibrationSolverSection.tsx
diff --git a/freemocap-ui/src/components/camera-config-panel/CameraConfigExposure.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigExposure.tsx
similarity index 96%
rename from freemocap-ui/src/components/camera-config-panel/CameraConfigExposure.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigExposure.tsx
index 62b9764a..ef1943ad 100644
--- a/freemocap-ui/src/components/camera-config-panel/CameraConfigExposure.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigExposure.tsx
@@ -1,7 +1,7 @@
import React from 'react';
-import { Box, Slider, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useTheme } from '@mui/material';
-import { ExposureMode } from "@/store/slices/cameras/cameras-types";
-import { useTranslation } from 'react-i18next';
+import {Box, Slider, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useTheme} from '@mui/material';
+import {ExposureMode} from "@/store/slices/cameras/cameras-types";
+import {useTranslation} from 'react-i18next';
interface CameraConfigExposureProps {
exposureMode: ExposureMode;
diff --git a/freemocap-ui/src/components/camera-config-panel/CameraConfigFramerate.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigFramerate.tsx
similarity index 96%
rename from freemocap-ui/src/components/camera-config-panel/CameraConfigFramerate.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigFramerate.tsx
index 4ecaa843..819f4d84 100644
--- a/freemocap-ui/src/components/camera-config-panel/CameraConfigFramerate.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigFramerate.tsx
@@ -1,6 +1,6 @@
-import React, { useState } from 'react';
-import { Box, TextField, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useTheme } from '@mui/material';
-import { useTranslation } from 'react-i18next';
+import React, {useState} from 'react';
+import {Box, TextField, ToggleButton, ToggleButtonGroup, Tooltip, Typography, useTheme} from '@mui/material';
+import {useTranslation} from 'react-i18next';
interface CameraConfigFramerateProps {
framerate: number | null;
@@ -171,4 +171,4 @@ export const CameraConfigFramerate: React.FC<CameraConfigFramerateProps> = ({
)}
</Box>
);
-};
\ No newline at end of file
+};
diff --git a/freemocap-ui/src/components/camera-config-panel/CameraConfigPanel.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigPanel.tsx
similarity index 89%
rename from freemocap-ui/src/components/camera-config-panel/CameraConfigPanel.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigPanel.tsx
index 4dc4a634..ea162cdb 100644
--- a/freemocap-ui/src/components/camera-config-panel/CameraConfigPanel.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigPanel.tsx
@@ -1,19 +1,13 @@
import React from "react";
-import {
- Box,
- Collapse,
- IconButton,
- Tooltip,
- useTheme,
-} from "@mui/material";
+import {Box, Collapse, IconButton, Tooltip, useTheme,} from "@mui/material";
import MediationIcon from "@mui/icons-material/Mediation";
-import { CameraConfigResolution } from "./CameraConfigResolution";
-import { CameraConfigExposure } from "./CameraConfigExposure";
-import { CameraConfigRotation } from "./CameraConfigRotation";
-import { CameraConfig, ExposureMode, RotationValue } from "@/store/slices/cameras/cameras-types";
-import { useAppDispatch, useAppSelector } from "@/store";
-import { selectCameras, configCopiedToAll } from "@/store/slices/cameras";
-import { useTranslation } from 'react-i18next';
+import {CameraConfigResolution} from "./CameraConfigResolution";
+import {CameraConfigExposure} from "./CameraConfigExposure";
+import {CameraConfigRotation} from "./CameraConfigRotation";
+import {CameraConfig, ExposureMode, RotationValue} from "@/store/slices/cameras/cameras-types";
+import {useAppDispatch, useAppSelector} from "@/store";
+import {configCopiedToAll, selectCameras} from "@/store/slices/cameras";
+import {useTranslation} from 'react-i18next';
interface CameraConfigPanelProps {
config: CameraConfig;
diff --git a/freemocap-ui/src/components/camera-config-panel/CameraConfigResolution.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigResolution.tsx
similarity index 96%
rename from freemocap-ui/src/components/camera-config-panel/CameraConfigResolution.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigResolution.tsx
index 2c31e0b9..9c5dc779 100644
--- a/freemocap-ui/src/components/camera-config-panel/CameraConfigResolution.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigResolution.tsx
@@ -1,15 +1,7 @@
-import React, { useState, useEffect } from "react";
-import {
- Box,
- FormControl,
- InputLabel,
- MenuItem,
- Select,
- TextField,
- useTheme
-} from "@mui/material";
-import { CameraConfig } from "@/store/slices/cameras/cameras-types";
-import { useTranslation } from 'react-i18next';
+import React, {useEffect, useState} from "react";
+import {Box, FormControl, InputLabel, MenuItem, Select, TextField, useTheme} from "@mui/material";
+import {CameraConfig} from "@/store/slices/cameras/cameras-types";
+import {useTranslation} from 'react-i18next';
interface CameraConfigResolutionProps {
resolution: CameraConfig['resolution'];
@@ -244,4 +236,4 @@ export const CameraConfigResolution: React.FC<CameraConfigResolutionProps> = ({
)}
</Box>
);
-};
\ No newline at end of file
+};
diff --git a/freemocap-ui/src/components/camera-config-panel/CameraConfigRotation.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigRotation.tsx
similarity index 95%
rename from freemocap-ui/src/components/camera-config-panel/CameraConfigRotation.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigRotation.tsx
index 852ee89d..51cb184a 100644
--- a/freemocap-ui/src/components/camera-config-panel/CameraConfigRotation.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/CameraConfigRotation.tsx
@@ -1,9 +1,9 @@
import React from 'react';
import ToggleButton from '@mui/material/ToggleButton';
import ToggleButtonGroup from '@mui/material/ToggleButtonGroup';
-import { Box, Tooltip, useTheme } from '@mui/material';
+import {Box, Tooltip, useTheme} from '@mui/material';
import {ROTATION_DEGREE_LABELS, ROTATION_OPTIONS, RotationValue} from '@/store/slices/cameras/cameras-types';
-import { useTranslation } from 'react-i18next';
+import {useTranslation} from 'react-i18next';
interface CameraConfigRotationProps {
rotation?: RotationValue;
diff --git a/freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeSection.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeSection.tsx
similarity index 73%
rename from freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeSection.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeSection.tsx
index 8e470fdf..03cc6b55 100644
--- a/freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeSection.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeSection.tsx
@@ -1,9 +1,9 @@
import React from "react";
-import { TreeItem } from "@mui/x-tree-view/TreeItem";
-import { useAppDispatch } from "@/store";
-import { cameraDesiredConfigUpdated } from "@/store/slices/cameras/cameras-slice";
-import { Camera, CameraConfig } from "@/store/slices/cameras/cameras-types";
-import {CameraConfigPanel} from "@/components/camera-config-panel/CameraConfigPanel";
+import {TreeItem} from "@mui/x-tree-view/TreeItem";
+import {useAppDispatch} from "@/store";
+import {cameraDesiredConfigUpdated} from "@/store/slices/cameras/cameras-slice";
+import {Camera, CameraConfig} from "@/store/slices/cameras/cameras-types";
+import {CameraConfigPanel} from "@/components/control-panels/camera-config-panel/CameraConfigPanel";
interface CameraConfigTreeSectionProps {
camera: Camera;
diff --git a/freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeView.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeView.tsx
similarity index 95%
rename from freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeView.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeView.tsx
index 67b3ef21..b32a131b 100644
--- a/freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeView.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeView.tsx
@@ -1,12 +1,6 @@
import React, {useEffect, useState} from "react";
-import {
- Box,
- Paper,
- Typography,
- useTheme,
-} from "@mui/material";
+import {Box, useTheme,} from "@mui/material";
import {SimpleTreeView} from "@mui/x-tree-view/SimpleTreeView";
-import {TreeItem} from "@mui/x-tree-view/TreeItem";
import ExpandMore from "@mui/icons-material/ExpandMore";
import ChevronRight from "@mui/icons-material/ChevronRight";
import VideoCameraFrontIcon from '@mui/icons-material/VideoCameraFront';
@@ -16,19 +10,19 @@ import {NoCamerasPlaceholder} from "./NoCamerasPlaceholder";
import {CameraSummary} from "./CameraSummary";
import {CameraHeaderActions} from "./CameraHeaderActions";
import {
- useAppDispatch,
- useAppSelector,
+ Camera,
+ detectCameras,
selectCameras,
- selectIsLoading,
selectConnectedCameras,
- selectSelectedCameras,
+ selectIsLoading,
selectIsPaused,
- detectCameras,
- Camera
+ selectSelectedCameras,
+ useAppDispatch,
+ useAppSelector
} from "@/store";
import {useServer} from "@/services/server/ServerContextProvider";
import {useTranslation} from 'react-i18next';
-import {CollapsibleSidebarSection} from "../common/CollapsibleSidebarSection";
+import {CollapsibleSidebarSection} from "../../../common/CollapsibleSidebarSection";
export const CameraConfigTreeView: React.FC = () => {
diff --git a/freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeViewHeader.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeViewHeader.tsx
similarity index 100%
rename from freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeViewHeader.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeViewHeader.tsx
index 277af90a..708e330b 100644
--- a/freemocap-ui/src/components/camera-config-tree-view/CameraConfigTreeViewHeader.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeViewHeader.tsx
@@ -11,8 +11,8 @@ import DeleteSweepIcon from "@mui/icons-material/DeleteSweep";
import {useAppDispatch, useAppSelector} from "@/store";
import {selectSelectedCameras} from "@/store/slices/cameras/cameras-selectors";
import {
- closeCameras,
camerasConnectOrUpdate,
+ closeCameras,
detectCameras,
pauseUnpauseCameras,
} from "@/store/slices/cameras/cameras-thunks";
diff --git a/freemocap-ui/src/components/camera-config-tree-view/CameraGroupTreeItem.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraGroupTreeItem.tsx
similarity index 86%
rename from freemocap-ui/src/components/camera-config-tree-view/CameraGroupTreeItem.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraGroupTreeItem.tsx
index e65fc001..fc5e7767 100644
--- a/freemocap-ui/src/components/camera-config-tree-view/CameraGroupTreeItem.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraGroupTreeItem.tsx
@@ -1,8 +1,8 @@
import React from "react";
-import { Box, Typography } from "@mui/material";
-import { TreeItem } from "@mui/x-tree-view/TreeItem";
-import { CameraTreeItem } from "./CameraTreeItem";
-import { Camera } from "@/store/slices/cameras/cameras-types";
+import {Box, Typography} from "@mui/material";
+import {TreeItem} from "@mui/x-tree-view/TreeItem";
+import {CameraTreeItem} from "./CameraTreeItem";
+import {Camera} from "@/store/slices/cameras/cameras-types";
interface CameraGroupTreeItemProps {
groupId: string;
diff --git a/freemocap-ui/src/components/camera-config-tree-view/CameraHeaderActions.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraHeaderActions.tsx
similarity index 99%
rename from freemocap-ui/src/components/camera-config-tree-view/CameraHeaderActions.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraHeaderActions.tsx
index 576e35bb..962b85ce 100644
--- a/freemocap-ui/src/components/camera-config-tree-view/CameraHeaderActions.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraHeaderActions.tsx
@@ -1,4 +1,4 @@
-import React, { useState } from "react";
+import React, {useState} from "react";
import {Box, CircularProgress, IconButton, Tooltip, useTheme} from "@mui/material";
import VideocamIcon from "@mui/icons-material/Videocam";
import VideocamOffIcon from "@mui/icons-material/VideocamOff";
@@ -11,8 +11,8 @@ import ArrowDownwardIcon from "@mui/icons-material/ArrowDownward";
import {useAppDispatch, useAppSelector} from "@/store";
import {selectSelectedCameras} from "@/store/slices/cameras/cameras-selectors";
import {
- closeCameras,
camerasConnectOrUpdate,
+ closeCameras,
detectCameras,
pauseUnpauseCameras,
} from "@/store/slices/cameras/cameras-thunks";
diff --git a/freemocap-ui/src/components/camera-config-tree-view/CameraSummary.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraSummary.tsx
similarity index 100%
rename from freemocap-ui/src/components/camera-config-tree-view/CameraSummary.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraSummary.tsx
diff --git a/freemocap-ui/src/components/camera-config-tree-view/CameraTreeItem.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraTreeItem.tsx
similarity index 100%
rename from freemocap-ui/src/components/camera-config-tree-view/CameraTreeItem.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/CameraTreeItem.tsx
diff --git a/freemocap-ui/src/components/camera-config-tree-view/NoCamerasPlaceholder.tsx b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/NoCamerasPlaceholder.tsx
similarity index 85%
rename from freemocap-ui/src/components/camera-config-tree-view/NoCamerasPlaceholder.tsx
rename to freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/NoCamerasPlaceholder.tsx
index 0aa16d01..e490e2e7 100644
--- a/freemocap-ui/src/components/camera-config-tree-view/NoCamerasPlaceholder.tsx
+++ b/freemocap-ui/src/components/control-panels/camera-config-panel/camera-config-tree-view/NoCamerasPlaceholder.tsx
@@ -1,7 +1,7 @@
import React from "react";
-import { Box, Typography } from "@mui/material";
-import { TreeItem } from "@mui/x-tree-view/TreeItem";
-import { useTranslation } from "react-i18next";
+import {Box, Typography} from "@mui/material";
+import {TreeItem} from "@mui/x-tree-view/TreeItem";
+import {useTranslation} from "react-i18next";
export const NoCamerasPlaceholder: React.FC = () => {
const { t } = useTranslation();
diff --git a/freemocap-ui/src/components/mocap-control-panel/MediapipeConfigPanel.tsx b/freemocap-ui/src/components/control-panels/mocap-control-panel/MediapipeConfigPanel.tsx
similarity index 98%
rename from freemocap-ui/src/components/mocap-control-panel/MediapipeConfigPanel.tsx
rename to freemocap-ui/src/components/control-panels/mocap-control-panel/MediapipeConfigPanel.tsx
index 0916d6a8..367a9a0e 100644
--- a/freemocap-ui/src/components/mocap-control-panel/MediapipeConfigPanel.tsx
+++ b/freemocap-ui/src/components/control-panels/mocap-control-panel/MediapipeConfigPanel.tsx
@@ -14,11 +14,7 @@ import {
useTheme,
} from "@mui/material";
import {useMocap} from "@/hooks/useMocap";
-import {
- MEDIAPIPE_REALTIME_PRESET,
- MEDIAPIPE_POSTHOC_PRESET,
- MediapipeModelComplexity,
-} from "@/store/slices/mocap";
+import {MEDIAPIPE_POSTHOC_PRESET, MEDIAPIPE_REALTIME_PRESET, MediapipeModelComplexity,} from "@/store/slices/mocap";
const MODEL_COMPLEXITY_LABELS: Record<MediapipeModelComplexity, string> = {
0: "Lite (fastest)",
diff --git a/freemocap-ui/src/components/mocap-control-panel/MocapTaskTreeItem.tsx b/freemocap-ui/src/components/control-panels/mocap-control-panel/MocapTaskTreeItem.tsx
similarity index 100%
rename from freemocap-ui/src/components/mocap-control-panel/MocapTaskTreeItem.tsx
rename to freemocap-ui/src/components/control-panels/mocap-control-panel/MocapTaskTreeItem.tsx
diff --git a/freemocap-ui/src/components/mocap-control-panel/SkeletonFilterConfigPanel.tsx b/freemocap-ui/src/components/control-panels/mocap-control-panel/SkeletonFilterConfigPanel.tsx
similarity index 98%
rename from freemocap-ui/src/components/mocap-control-panel/SkeletonFilterConfigPanel.tsx
rename to freemocap-ui/src/components/control-panels/mocap-control-panel/SkeletonFilterConfigPanel.tsx
index 776cc1ff..94fa133e 100644
--- a/freemocap-ui/src/components/mocap-control-panel/SkeletonFilterConfigPanel.tsx
+++ b/freemocap-ui/src/components/control-panels/mocap-control-panel/SkeletonFilterConfigPanel.tsx
@@ -1,15 +1,5 @@
import React, {useCallback} from "react";
-import {
- Box,
- Button,
- Divider,
- Slider,
- Stack,
- TextField,
- Tooltip,
- Typography,
- useTheme,
-} from "@mui/material";
+import {Box, Button, Divider, Slider, Stack, TextField, Tooltip, Typography, useTheme,} from "@mui/material";
import {useMocap} from "@/hooks/useMocap";
import {DEFAULT_REALTIME_FILTER_CONFIG} from "@/store/slices/mocap";
diff --git a/freemocap-ui/src/components/post-processing-panel/CalibrationSubsection.tsx b/freemocap-ui/src/components/control-panels/post-processing-panel/CalibrationSubsection.tsx
similarity index 97%
rename from freemocap-ui/src/components/post-processing-panel/CalibrationSubsection.tsx
rename to freemocap-ui/src/components/control-panels/post-processing-panel/CalibrationSubsection.tsx
index a8da8bcf..770fa401 100644
--- a/freemocap-ui/src/components/post-processing-panel/CalibrationSubsection.tsx
+++ b/freemocap-ui/src/components/control-panels/post-processing-panel/CalibrationSubsection.tsx
@@ -1,4 +1,4 @@
-import React, {useCallback, useEffect, useMemo, useState} from "react";
+import React, {useCallback, useMemo, useState} from "react";
import {
Accordion,
AccordionDetails,
@@ -8,7 +8,6 @@ import {
Button,
Checkbox,
Chip,
- CircularProgress,
FormControl,
FormControlLabel,
IconButton,
@@ -28,16 +27,12 @@ import PlayArrowIcon from "@mui/icons-material/PlayArrow";
import StopIcon from "@mui/icons-material/Stop";
import FolderOpenIcon from "@mui/icons-material/FolderOpen";
import ClearIcon from "@mui/icons-material/Clear";
-import CheckCircleIcon from "@mui/icons-material/CheckCircle";
-import FiberManualRecordIcon from "@mui/icons-material/FiberManualRecord";
import RefreshIcon from "@mui/icons-material/Refresh";
-import WarningAmberIcon from "@mui/icons-material/WarningAmber";
-import CancelIcon from "@mui/icons-material/Cancel";
import {DirectoryStatusPanel} from "@/components/common/DirectoryStatusPanel";
import {useCalibration} from "@/hooks/useCalibration";
import {useDirectoryWatcher} from "@/hooks/useDirectoryWatcher";
import {useElectronIPC} from "@/services";
-import {CalibrationSolverSection} from "@/components/calibration-control-panel/CalibrationSolverSection";
+import {CalibrationSolverSection} from "@/components/control-panels/calibration-control-panel/CalibrationSolverSection";
type BoardPreset = "5x3" | "7x5" | "custom";
diff --git a/freemocap-ui/src/components/post-processing-panel/MocapSubsection.tsx b/freemocap-ui/src/components/control-panels/post-processing-panel/MocapSubsection.tsx
similarity index 98%
rename from freemocap-ui/src/components/post-processing-panel/MocapSubsection.tsx
rename to freemocap-ui/src/components/control-panels/post-processing-panel/MocapSubsection.tsx
index 6e5aee66..76c48313 100644
--- a/freemocap-ui/src/components/post-processing-panel/MocapSubsection.tsx
+++ b/freemocap-ui/src/components/control-panels/post-processing-panel/MocapSubsection.tsx
@@ -23,12 +23,12 @@ import FolderOpenIcon from "@mui/icons-material/FolderOpen";
import ClearIcon from "@mui/icons-material/Clear";
import RefreshIcon from "@mui/icons-material/Refresh";
import {DirectoryStatusPanel} from "@/components/common/DirectoryStatusPanel";
-import {CalibrationTomlPicker} from "@/components/pipeline-config/CalibrationTomlPicker";
-import {PipelineConfigTree} from "@/components/pipeline-config/PipelineConfigTree";
import {useMocap} from "@/hooks/useMocap";
import {useCalibration} from "@/hooks/useCalibration";
import {useDirectoryWatcher} from "@/hooks/useDirectoryWatcher";
import {useElectronIPC} from "@/services";
+import {CalibrationTomlPicker} from "@/components/common/CalibrationTomlPicker";
+import {RealtimePipelineConfigTree} from "@/components/control-panels/realtime-panel/RealtimePipelineConfigTree";
export const MocapSubsection: React.FC = () => {
const theme = useTheme();
@@ -348,7 +348,7 @@ export const MocapSubsection: React.FC = () => {
)}
{/* Hierarchical pipeline config (replaces flat MediapipeConfigPanel + SkeletonFilterConfigPanel) */}
- <PipelineConfigTree
+ <RealtimePipelineConfigTree
context="posthoc"
charucoEnabled={charucoEnabled}
onCharucoToggle={setCharucoEnabled}
diff --git a/freemocap-ui/src/components/post-processing-panel/PostProcessingPanel.tsx b/freemocap-ui/src/components/control-panels/post-processing-panel/PostProcessingPanel.tsx
similarity index 74%
rename from freemocap-ui/src/components/post-processing-panel/PostProcessingPanel.tsx
rename to freemocap-ui/src/components/control-panels/post-processing-panel/PostProcessingPanel.tsx
index f0185b90..75992882 100644
--- a/freemocap-ui/src/components/post-processing-panel/PostProcessingPanel.tsx
+++ b/freemocap-ui/src/components/control-panels/post-processing-panel/PostProcessingPanel.tsx
@@ -2,8 +2,8 @@ import React from "react";
import {Box} from "@mui/material";
import BuildIcon from "@mui/icons-material/Build";
import {CollapsibleSidebarSection} from "@/components/common/CollapsibleSidebarSection";
-import {CalibrationSubsection} from "@/components/post-processing-panel/CalibrationSubsection";
-import {MocapSubsection} from "@/components/post-processing-panel/MocapSubsection";
+import {CalibrationSubsection} from "@/components/control-panels/post-processing-panel/CalibrationSubsection";
+import {MocapSubsection} from "@/components/control-panels/post-processing-panel/MocapSubsection";
export const PostProcessingPanel: React.FC = () => {
return (
diff --git a/freemocap-ui/src/components/recording-info-panel/RecordingCompleteDialog.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingCompleteDialog.tsx
similarity index 94%
rename from freemocap-ui/src/components/recording-info-panel/RecordingCompleteDialog.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/RecordingCompleteDialog.tsx
index 0b03d9e7..d6317948 100644
--- a/freemocap-ui/src/components/recording-info-panel/RecordingCompleteDialog.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingCompleteDialog.tsx
@@ -1,29 +1,29 @@
import React from 'react';
import {
+ Box,
+ Button,
Dialog,
- DialogTitle,
- DialogContent,
DialogActions,
- Button,
- Typography,
+ DialogContent,
+ DialogTitle,
+ Divider,
+ IconButton,
Table,
TableBody,
TableCell,
TableContainer,
TableHead,
TableRow,
- IconButton,
- Box,
- Divider,
+ Typography,
} from '@mui/material';
import ContentCopyIcon from '@mui/icons-material/ContentCopy';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
-import { useNavigate } from 'react-router-dom';
-import { useAppDispatch, useAppSelector } from '@/store/hooks';
-import { recordingCompletionDismissed } from '@/store/slices/recording/recording-slice';
-import { useElectronIPC } from '@/services/electron-ipc/electron-ipc';
-import type { RecordingCompletionData, StatsSummary } from '@/store/slices/recording/recording-types';
+import {useNavigate} from 'react-router-dom';
+import {useAppDispatch, useAppSelector} from '@/store/hooks';
+import {recordingCompletionDismissed} from '@/store/slices/recording/recording-slice';
+import {useElectronIPC} from '@/services/electron-ipc/electron-ipc';
+import type {RecordingCompletionData, StatsSummary} from '@/store/slices/recording/recording-types';
function formatStat(value: number, precision: number = 3): string {
return value.toFixed(precision);
diff --git a/freemocap-ui/src/components/recording-info-panel/RecordingControlsTreeSection.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingControlsTreeSection.tsx
similarity index 90%
rename from freemocap-ui/src/components/recording-info-panel/RecordingControlsTreeSection.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/RecordingControlsTreeSection.tsx
index ef38918b..a3f1b124 100644
--- a/freemocap-ui/src/components/recording-info-panel/RecordingControlsTreeSection.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingControlsTreeSection.tsx
@@ -2,14 +2,16 @@ import React from 'react';
import {Box} from '@mui/material';
import {
DelayRecordingStartControl
-} from "@/components/recording-info-panel/recording-subcomponents/DelayRecordingStartControl";
+} from "@/components/control-panels/recording-info-panel/recording-subcomponents/DelayRecordingStartControl";
import {
BaseRecordingDirectoryInput
-} from "@/components/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput";
-import {RecordingNamePreview} from "@/components/recording-info-panel/recording-subcomponents/RecordingNamePreview";
+} from "@/components/control-panels/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput";
+import {
+ RecordingNamePreview
+} from "@/components/control-panels/recording-info-panel/recording-subcomponents/RecordingNamePreview";
import {
RecordingSettingsSection
-} from "@/components/recording-info-panel/recording-subcomponents/RecordingSettingsSection";
+} from "@/components/control-panels/recording-info-panel/recording-subcomponents/RecordingSettingsSection";
interface RecordingControlsSectionProps {
recordingDirectory: string;
diff --git a/freemocap-ui/src/components/recording-info-panel/RecordingHeaderButton.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingHeaderButton.tsx
similarity index 96%
rename from freemocap-ui/src/components/recording-info-panel/RecordingHeaderButton.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/RecordingHeaderButton.tsx
index 0e5912e5..c046d0c7 100644
--- a/freemocap-ui/src/components/recording-info-panel/RecordingHeaderButton.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingHeaderButton.tsx
@@ -1,5 +1,5 @@
import React from "react";
-import {Box, CircularProgress, IconButton, Tooltip} from "@mui/material";
+import {CircularProgress, IconButton, Tooltip} from "@mui/material";
import FiberManualRecordIcon from "@mui/icons-material/FiberManualRecord";
import StopIcon from "@mui/icons-material/Stop";
diff --git a/freemocap-ui/src/components/recording-info-panel/RecordingInfoPanel.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingInfoPanel.tsx
similarity index 95%
rename from freemocap-ui/src/components/recording-info-panel/RecordingInfoPanel.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/RecordingInfoPanel.tsx
index 3ea3431f..6deede38 100644
--- a/freemocap-ui/src/components/recording-info-panel/RecordingInfoPanel.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingInfoPanel.tsx
@@ -1,20 +1,18 @@
import React, {useEffect, useState} from "react";
import {Box, useTheme} from "@mui/material";
import {SimpleTreeView} from "@mui/x-tree-view/SimpleTreeView";
-import {TreeItem} from "@mui/x-tree-view/TreeItem";
import ExpandMoreIcon from "@mui/icons-material/ExpandMore";
import ChevronRightIcon from "@mui/icons-material/ChevronRight";
import FiberManualRecordIcon from '@mui/icons-material/FiberManualRecord';
-import {useAppDispatch, useAppSelector} from "@/store";
+import {recordingInfoUpdated, startRecording, stopRecording, useAppDispatch, useAppSelector} from "@/store";
import {
MicrophoneSelector
-} from "@/components/recording-info-panel/recording-subcomponents/MicrophoneSelector";
-import {startRecording, stopRecording, recordingInfoUpdated} from "@/store";
-import {RecordingPathTreeItem} from "@/components/recording-info-panel/RecordingPathTreeItem";
-import {electronIpc, useElectronIPC} from "@/services/electron-ipc/electron-ipc";
+} from "@/components/control-panels/recording-info-panel/recording-subcomponents/MicrophoneSelector";
+import {RecordingPathTreeItem} from "@/components/control-panels/recording-info-panel/RecordingPathTreeItem";
+import {useElectronIPC} from "@/services/electron-ipc/electron-ipc";
import {useServer} from "@/services/server/ServerContextProvider";
-import {getTimestampString} from "@/components/recording-info-panel/getTimestampString";
-import {RecordingCompleteDialog} from "@/components/recording-info-panel/RecordingCompleteDialog";
+import {getTimestampString} from "@/components/control-panels/recording-info-panel/getTimestampString";
+import {RecordingCompleteDialog} from "@/components/control-panels/recording-info-panel/RecordingCompleteDialog";
import {CollapsibleSidebarSection} from "@/components/common/CollapsibleSidebarSection";
import {RecordingSummary} from "./RecordingSummary";
import {RecordingHeaderButton} from "./RecordingHeaderButton";
diff --git a/freemocap-ui/src/components/recording-info-panel/RecordingPathTreeItem.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingPathTreeItem.tsx
similarity index 96%
rename from freemocap-ui/src/components/recording-info-panel/RecordingPathTreeItem.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/RecordingPathTreeItem.tsx
index 1a471b2a..cb54e422 100644
--- a/freemocap-ui/src/components/recording-info-panel/RecordingPathTreeItem.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingPathTreeItem.tsx
@@ -3,8 +3,8 @@ import {Box, Typography} from '@mui/material';
import {TreeItem} from '@mui/x-tree-view/TreeItem';
import {
FullRecordingPathPreview
-} from "@/components/recording-info-panel/recording-subcomponents/FullRecordingPathPreview";
-import {RecordingControlsSection} from "@/components/recording-info-panel/RecordingControlsTreeSection";
+} from "@/components/control-panels/recording-info-panel/recording-subcomponents/FullRecordingPathPreview";
+import {RecordingControlsSection} from "@/components/control-panels/recording-info-panel/RecordingControlsTreeSection";
interface RecordingPathTreeItemProps {
recordingDirectory: string;
diff --git a/freemocap-ui/src/components/recording-info-panel/RecordingSummary.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/RecordingSummary.tsx
similarity index 100%
rename from freemocap-ui/src/components/recording-info-panel/RecordingSummary.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/RecordingSummary.tsx
diff --git a/freemocap-ui/src/components/recording-info-panel/getTimestampString.ts b/freemocap-ui/src/components/control-panels/recording-info-panel/getTimestampString.ts
similarity index 100%
rename from freemocap-ui/src/components/recording-info-panel/getTimestampString.ts
rename to freemocap-ui/src/components/control-panels/recording-info-panel/getTimestampString.ts
diff --git a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput.tsx
similarity index 89%
rename from freemocap-ui/src/components/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput.tsx
index 3062ce2c..4a73452b 100644
--- a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/BaseRecordingDirectoryInput.tsx
@@ -1,10 +1,10 @@
import React from 'react';
-import { useTranslation } from 'react-i18next';
-import { IconButton, InputAdornment, TextField } from '@mui/material';
+import {useTranslation} from 'react-i18next';
+import {IconButton, InputAdornment, TextField} from '@mui/material';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
-import { useAppDispatch } from '@/store';
-import { recordingDirectoryChanged } from '@/store/slices/recording/recording-slice';
-import { useElectronIPC } from '@/services';
+import {useAppDispatch} from '@/store';
+import {recordingDirectoryChanged} from '@/store/slices/recording/recording-slice';
+import {useElectronIPC} from '@/services';
interface DirectoryInputProps {
value: string;
diff --git a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/DelayRecordingStartControl.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/DelayRecordingStartControl.tsx
similarity index 97%
rename from freemocap-ui/src/components/recording-info-panel/recording-subcomponents/DelayRecordingStartControl.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/DelayRecordingStartControl.tsx
index 4835eae1..a82a97c8 100644
--- a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/DelayRecordingStartControl.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/DelayRecordingStartControl.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { useTranslation } from 'react-i18next';
+import {useTranslation} from 'react-i18next';
import {Box, Checkbox, FormControlLabel, TextField, useTheme} from '@mui/material';
interface DelayStartControlProps {
diff --git a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/FullRecordingPathPreview.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/FullRecordingPathPreview.tsx
similarity index 99%
rename from freemocap-ui/src/components/recording-info-panel/recording-subcomponents/FullRecordingPathPreview.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/FullRecordingPathPreview.tsx
index 80ecdc38..5228baca 100644
--- a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/FullRecordingPathPreview.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/FullRecordingPathPreview.tsx
@@ -3,7 +3,7 @@ import React from 'react';
import {Box, IconButton, Paper, Tooltip, Typography, useTheme} from '@mui/material';
import FolderIcon from '@mui/icons-material/Folder';
import FolderSpecialIcon from '@mui/icons-material/FolderSpecial';
-import { useTranslation } from "react-i18next";
+import {useTranslation} from "react-i18next";
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
import {useElectronIPC} from "@/services";
diff --git a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/MicrophoneSelector.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/MicrophoneSelector.tsx
similarity index 95%
rename from freemocap-ui/src/components/recording-info-panel/recording-subcomponents/MicrophoneSelector.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/MicrophoneSelector.tsx
index 0065457b..e2926a42 100644
--- a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/MicrophoneSelector.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/MicrophoneSelector.tsx
@@ -1,14 +1,6 @@
import React, {useEffect, useState} from "react";
-import { useTranslation } from "react-i18next";
-import {
- Box,
- FormControl,
- IconButton,
- MenuItem,
- Select,
- Tooltip,
- Typography,
-} from "@mui/material";
+import {useTranslation} from "react-i18next";
+import {Box, FormControl, IconButton, MenuItem, Select, Tooltip, Typography,} from "@mui/material";
import {Mic, MicOff, Refresh} from "@mui/icons-material";
import {serverUrls} from "@/services";
diff --git a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/RecordingNamePreview.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/RecordingNamePreview.tsx
similarity index 96%
rename from freemocap-ui/src/components/recording-info-panel/recording-subcomponents/RecordingNamePreview.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/RecordingNamePreview.tsx
index a28751b4..e7877915 100644
--- a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/RecordingNamePreview.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/RecordingNamePreview.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { useTranslation } from 'react-i18next';
+import {useTranslation} from 'react-i18next';
import {TextField, Typography} from '@mui/material';
interface RecordingNamePreviewProps {
diff --git a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/RecordingSettingsSection.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/RecordingSettingsSection.tsx
similarity index 99%
rename from freemocap-ui/src/components/recording-info-panel/recording-subcomponents/RecordingSettingsSection.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/RecordingSettingsSection.tsx
index d10b45b3..a22b8282 100644
--- a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/RecordingSettingsSection.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/RecordingSettingsSection.tsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { useTranslation } from 'react-i18next';
+import {useTranslation} from 'react-i18next';
import {Box, Checkbox, FormControlLabel, TextField, Typography, useTheme} from '@mui/material';
interface RecordingSettingsProps {
diff --git a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/StartStopRecordingButton.tsx b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/StartStopRecordingButton.tsx
similarity index 95%
rename from freemocap-ui/src/components/recording-info-panel/recording-subcomponents/StartStopRecordingButton.tsx
rename to freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/StartStopRecordingButton.tsx
index 2ba78a04..01e57270 100644
--- a/freemocap-ui/src/components/recording-info-panel/recording-subcomponents/StartStopRecordingButton.tsx
+++ b/freemocap-ui/src/components/control-panels/recording-info-panel/recording-subcomponents/StartStopRecordingButton.tsx
@@ -1,7 +1,7 @@
-import React, { useEffect, useState } from 'react';
-import { Button, CircularProgress, keyframes, Typography, Box } from '@mui/material';
-import { styled } from '@mui/system';
-import { useTranslation } from 'react-i18next';
+import React, {useEffect, useState} from 'react';
+import {Box, Button, CircularProgress, keyframes, Typography} from '@mui/material';
+import {styled} from '@mui/system';
+import {useTranslation} from 'react-i18next';
interface StartStopButtonProps {
isRecording: boolean;
diff --git a/freemocap-ui/src/components/framerate-viewer/BaseD3ChartView.tsx b/freemocap-ui/src/components/framerate-viewer/BaseD3ChartView.tsx
index 5c2c86ec..95d41bfd 100644
--- a/freemocap-ui/src/components/framerate-viewer/BaseD3ChartView.tsx
+++ b/freemocap-ui/src/components/framerate-viewer/BaseD3ChartView.tsx
@@ -1,5 +1,5 @@
// src/components/framerate-viewer/BaseD3ChartView.tsx
-import {useEffect, useRef, useState, useCallback, memo} from "react"
+import {memo, useCallback, useEffect, useRef, useState} from "react"
import * as d3 from "d3"
import {Box, Fade, IconButton, Tooltip, Typography} from "@mui/material"
import {RestartAlt, ZoomIn, ZoomOut} from "@mui/icons-material"
diff --git a/freemocap-ui/src/components/framerate-viewer/FrameRateViewer.tsx b/freemocap-ui/src/components/framerate-viewer/FrameRateViewer.tsx
index 9abe4d80..8222e947 100644
--- a/freemocap-ui/src/components/framerate-viewer/FrameRateViewer.tsx
+++ b/freemocap-ui/src/components/framerate-viewer/FrameRateViewer.tsx
@@ -6,7 +6,7 @@ import {alpha, useTheme} from "@mui/material/styles"
import FramerateTimeseriesView from "./FramerateTimeseriesView"
import FramerateHistogramView from "./FramerateHistogramView"
import FramerateStatisticsView from "./FramerateStatisticsView"
-import { useTranslation } from "react-i18next";
+import {useTranslation} from "react-i18next";
export const frontendColor: string = "#1976D2"
export const backendColor: string = "#ff4d00"
diff --git a/freemocap-ui/src/components/framerate-viewer/FramerateHistogramView.tsx b/freemocap-ui/src/components/framerate-viewer/FramerateHistogramView.tsx
index 13892f80..92a327b7 100644
--- a/freemocap-ui/src/components/framerate-viewer/FramerateHistogramView.tsx
+++ b/freemocap-ui/src/components/framerate-viewer/FramerateHistogramView.tsx
@@ -3,7 +3,7 @@ import {useCallback, useRef} from "react"
import * as d3 from "d3"
import {useTheme} from "@mui/material/styles"
import {applyAxisStyles} from "./d3ChartUtils"
-import BaseD3ChartView, {ChartScaffolding, ChartLifecycle} from "@/components/framerate-viewer/BaseD3ChartView"
+import BaseD3ChartView, {ChartLifecycle, ChartScaffolding} from "@/components/framerate-viewer/BaseD3ChartView"
import {useTranslation} from "react-i18next"
import {useServer} from "@/services/server/ServerContextProvider"
diff --git a/freemocap-ui/src/components/framerate-viewer/FramerateStatisticsView.tsx b/freemocap-ui/src/components/framerate-viewer/FramerateStatisticsView.tsx
index c61511b6..437bca18 100644
--- a/freemocap-ui/src/components/framerate-viewer/FramerateStatisticsView.tsx
+++ b/freemocap-ui/src/components/framerate-viewer/FramerateStatisticsView.tsx
@@ -1,5 +1,5 @@
// src/components/framerate-viewer/FramerateStatisticsView.tsx
-import React from "react";
+import React, {useEffect, useRef, useState} from "react";
import {
Box,
Divider,
@@ -15,8 +15,7 @@ import {
} from "@mui/material";
import {alpha, useTheme} from "@mui/material/styles";
import {DetailedFramerate} from "@/services/server/server-helpers/framerate-store";
-import {useEffect, useRef, useState} from "react";
-import {frontendColor, backendColor} from "@/components/framerate-viewer/FrameRateViewer";
+import {backendColor, frontendColor} from "@/components/framerate-viewer/FrameRateViewer";
import {useTranslation} from "react-i18next";
import {useServer} from "@/services/server/ServerContextProvider";
diff --git a/freemocap-ui/src/components/framerate-viewer/FramerateTimeseriesView.tsx b/freemocap-ui/src/components/framerate-viewer/FramerateTimeseriesView.tsx
index 2dee7711..3d9a8a45 100644
--- a/freemocap-ui/src/components/framerate-viewer/FramerateTimeseriesView.tsx
+++ b/freemocap-ui/src/components/framerate-viewer/FramerateTimeseriesView.tsx
@@ -4,7 +4,7 @@ import * as d3 from "d3"
import {useTheme} from "@mui/material/styles"
import {TimestampedSample} from "@/services/server/server-helpers/framerate-store"
import {applyAxisStyles} from "@/components/framerate-viewer/d3ChartUtils"
-import BaseD3ChartView, {ChartScaffolding, ChartLifecycle} from "@/components/framerate-viewer/BaseD3ChartView"
+import BaseD3ChartView, {ChartLifecycle, ChartScaffolding} from "@/components/framerate-viewer/BaseD3ChartView"
import {useTranslation} from "react-i18next"
import {useServer} from "@/services/server/ServerContextProvider"
diff --git a/freemocap-ui/src/components/languages/LanguageSwitcher.tsx b/freemocap-ui/src/components/languages/LanguageSwitcher.tsx
index b695765a..efe4b1f3 100644
--- a/freemocap-ui/src/components/languages/LanguageSwitcher.tsx
+++ b/freemocap-ui/src/components/languages/LanguageSwitcher.tsx
@@ -1,30 +1,14 @@
-import React, { useCallback } from "react";
-import { useTranslation } from "react-i18next";
-import {
- Box,
- Chip,
- FormControl,
- InputLabel,
- MenuItem,
- Select,
- Tooltip,
- Typography,
-} from "@mui/material";
-import type { SelectChangeEvent } from "@mui/material/Select";
+import React, {useCallback} from "react";
+import {useTranslation} from "react-i18next";
+import {Box, Chip, FormControl, InputLabel, MenuItem, Select, Tooltip, Typography,} from "@mui/material";
+import type {SelectChangeEvent} from "@mui/material/Select";
import SmartToyIcon from "@mui/icons-material/SmartToy";
import VerifiedIcon from "@mui/icons-material/Verified";
import {EXTERNAL_URLS} from "@/constants/external-urls";
-import { useAppDispatch, useAppSelector } from "@/store";
-import {
- localeChanged,
- selectLocale,
- selectShowTranslationIndicator,
-} from "@/store/slices/locale";
-import {
- SUPPORTED_LOCALES,
- getTranslationSource,
-} from "@/i18n";
-import type { SupportedLocale } from "@/i18n";
+import {useAppDispatch, useAppSelector} from "@/store";
+import {localeChanged, selectLocale, selectShowTranslationIndicator,} from "@/store/slices/locale";
+import type {SupportedLocale} from "@/i18n";
+import {getTranslationSource, SUPPORTED_LOCALES,} from "@/i18n";
import * as Flags from "country-flag-icons/react/3x2";
import {CherokeeFlag} from "@/components/languages/custom-flag-icons/CherokeeFlag";
import {YiddishFlag} from "@/components/languages/custom-flag-icons/YiddishFlag";
diff --git a/freemocap-ui/src/components/pipeline-config/CalibrationTomlPicker.tsx b/freemocap-ui/src/components/pipeline-config/CalibrationTomlPicker.tsx
deleted file mode 100644
index a5ec5c9c..00000000
--- a/freemocap-ui/src/components/pipeline-config/CalibrationTomlPicker.tsx
+++ /dev/null
@@ -1,116 +0,0 @@
-import React from "react";
-import {Box, Button, Chip, Tooltip, Typography, useTheme} from "@mui/material";
-import CheckCircleIcon from "@mui/icons-material/CheckCircle";
-import ErrorIcon from "@mui/icons-material/Error";
-import WarningAmberIcon from "@mui/icons-material/WarningAmber";
-import FolderOpenIcon from "@mui/icons-material/FolderOpen";
-import AutorenewIcon from "@mui/icons-material/Autorenew";
-
-export type CalibrationTomlSource = "auto" | "calibration-panel" | "manual";
-
-interface CalibrationTomlPickerProps {
- tomlPath: string | null;
- source: CalibrationTomlSource;
- onSelect: () => void;
- onUseAutoDetected: () => void;
- disabled?: boolean;
-}
-
-const SOURCE_LABELS: Record<CalibrationTomlSource, string> = {
- auto: "Auto-detected",
- "calibration-panel": "From calibration panel",
- manual: "Manually selected",
-};
-
-export const CalibrationTomlPicker: React.FC<CalibrationTomlPickerProps> = ({
- tomlPath,
- source,
- onSelect,
- onUseAutoDetected,
- disabled = false,
-}) => {
- const theme = useTheme();
-
- const statusIcon = tomlPath ? (
- <CheckCircleIcon sx={{fontSize: 18, color: "#00e5ff"}} />
- ) : (
- <ErrorIcon sx={{fontSize: 18, color: theme.palette.error.main}} />
- );
-
- return (
- <Box
- sx={{
- display: "flex",
- alignItems: "center",
- gap: 1,
- p: 1,
- borderRadius: 1,
- border: `1px solid ${theme.palette.divider}`,
- minHeight: 36,
- }}
- >
- {statusIcon}
-
- <Box sx={{flex: 1, minWidth: 0}}>
- {tomlPath ? (
- <>
- <Chip
- label={SOURCE_LABELS[source]}
- size="small"
- sx={{
- height: 16,
- fontSize: 9,
- "& .MuiChip-label": {px: 0.5},
- mb: 0.25,
- }}
- />
- <Tooltip title={tomlPath} arrow>
- <Typography
- variant="caption"
- sx={{
- fontFamily: "monospace",
- fontSize: 10,
- display: "block",
- color: "success.main",
- overflow: "hidden",
- textOverflow: "ellipsis",
- whiteSpace: "nowrap",
- }}
- >
- {tomlPath}
- </Typography>
- </Tooltip>
- </>
- ) : (
- <Typography variant="caption" color="text.secondary">
- No calibration TOML found
- </Typography>
- )}
- </Box>
-
- {source !== "auto" && tomlPath && (
- <Tooltip title="Use auto-detected calibration" arrow>
- <Button
- size="small"
- onClick={onUseAutoDetected}
- disabled={disabled}
- sx={{minWidth: 0, p: 0.5}}
- >
- <AutorenewIcon fontSize="small" />
- </Button>
- </Tooltip>
- )}
-
- <Button
- size="small"
- variant="outlined"
- onClick={onSelect}
- disabled={disabled}
- startIcon={<FolderOpenIcon />}
- sx={{flexShrink: 0, textTransform: "none", fontSize: 11}}
- >
- Browse
- </Button>
- </Box>
- );
-};
diff --git a/freemocap-ui/src/components/pipeline-config/PipelineConfigTree.tsx b/freemocap-ui/src/components/pipeline-config/PipelineConfigTree.tsx
deleted file mode 100644
index 412f3834..00000000
--- a/freemocap-ui/src/components/pipeline-config/PipelineConfigTree.tsx
+++ /dev/null
@@ -1,173 +0,0 @@
-import React, {useState} from "react";
-import {Box, Typography, useTheme} from "@mui/material";
-import {SimpleTreeView} from "@mui/x-tree-view/SimpleTreeView";
-import ExpandMore from "@mui/icons-material/ExpandMore";
-import ChevronRight from "@mui/icons-material/ChevronRight";
-
-import {PipelineStageTreeItem} from "./PipelineStageTreeItem";
-import {MediapipeConfigPanel} from "@/components/mocap-control-panel/MediapipeConfigPanel";
-import {SkeletonFilterConfigPanel} from "@/components/mocap-control-panel/SkeletonFilterConfigPanel";
-
-export type PipelineContext = "realtime" | "posthoc";
-
-interface PipelineConfigTreeProps {
- context: PipelineContext;
- // 2D Tracking stage toggles
- charucoEnabled: boolean;
- onCharucoToggle: (checked: boolean) => void;
- skeletonEnabled: boolean;
- onSkeletonToggle: (checked: boolean) => void;
- // 3D Reconstruction stage toggles
- triangulateEnabled: boolean;
- onTriangulateToggle: (checked: boolean) => void;
- filterEnabled: boolean;
- onFilterToggle: (checked: boolean) => void;
- rigidBodyEnabled: boolean;
- onRigidBodyToggle: (checked: boolean) => void;
-}
-
-export const PipelineConfigTree: React.FC<PipelineConfigTreeProps> = ({
- context,
- charucoEnabled,
- onCharucoToggle,
- skeletonEnabled,
- onSkeletonToggle,
- triangulateEnabled,
- onTriangulateToggle,
- filterEnabled,
- onFilterToggle,
- rigidBodyEnabled,
- onRigidBodyToggle,
-}) => {
- const theme = useTheme();
- const [expandedItems, setExpandedItems] = useState<string[]>([]);
-
- const isExpanded = (id: string) => expandedItems.includes(id);
-
- // Derive parent-level checked state
- const tracking2dEnabled = charucoEnabled || skeletonEnabled;
- const reconstruction3dEnabled = triangulateEnabled || filterEnabled || rigidBodyEnabled;
-
- const handleToggle2dTracking = (checked: boolean) => {
- onCharucoToggle(checked);
- onSkeletonToggle(checked);
- };
-
- const handleToggle3dReconstruction = (checked: boolean) => {
- onTriangulateToggle(checked);
- onFilterToggle(checked);
- onRigidBodyToggle(checked);
- };
-
- return (
- <SimpleTreeView
- expandedItems={expandedItems}
- onExpandedItemsChange={(_, items) => setExpandedItems(items)}
- slots={{
- collapseIcon: ExpandMore,
- expandIcon: ChevronRight,
- }}
- >
- {/* ── 2D Tracking ── */}
- <PipelineStageTreeItem
- itemId="2d-tracking"
- label="2D Tracking"
- checked={tracking2dEnabled}
- onToggle={handleToggle2dTracking}
- isExpanded={isExpanded("2d-tracking")}
- summaryWhenCollapsed={
- [charucoEnabled && "Charuco", skeletonEnabled && "Skeleton"]
- .filter(Boolean)
- .join(" + ") || "Off"
- }
- >
- {/* Charuco */}
- <PipelineStageTreeItem
- itemId="2d-charuco"
- label="Charuco"
- checked={charucoEnabled}
- onToggle={onCharucoToggle}
- isExpanded={isExpanded("2d-charuco")}
- >
- <Box sx={{p: 1, pl: 2}}>
- <Typography variant="caption" color="text.secondary">
- Charuco board detection settings (uses calibration config)
- </Typography>
- </Box>
- </PipelineStageTreeItem>
-
- {/* Skeleton (MediaPipe) */}
- <PipelineStageTreeItem
- itemId="2d-skeleton"
- label="Skeleton"
- checked={skeletonEnabled}
- onToggle={onSkeletonToggle}
- isExpanded={isExpanded("2d-skeleton")}
- summaryWhenCollapsed={context === "realtime" ? "Realtime preset" : "Posthoc preset"}
- >
- <Box sx={{p: 1, pl: 2, borderLeft: `2px solid ${theme.palette.divider}`}}>
- <MediapipeConfigPanel />
- </Box>
- </PipelineStageTreeItem>
- </PipelineStageTreeItem>
-
- {/* ── 3D Reconstruction ── */}
- <PipelineStageTreeItem
- itemId="3d-reconstruction"
- label="3D Reconstruction"
- checked={reconstruction3dEnabled}
- onToggle={handleToggle3dReconstruction}
- isExpanded={isExpanded("3d-reconstruction")}
- summaryWhenCollapsed={
- [triangulateEnabled && "Triangulate", filterEnabled && "Filter", rigidBodyEnabled && "Skeleton"]
- .filter(Boolean)
- .join(" + ") || "Off"
- }
- >
- {/* Triangulate */}
- <PipelineStageTreeItem
- itemId="3d-triangulate"
- label="Triangulate"
- checked={triangulateEnabled}
- onToggle={onTriangulateToggle}
- isExpanded={isExpanded("3d-triangulate")}
- >
- <Box sx={{p: 1, pl: 2}}>
- <Typography variant="caption" color="text.secondary">
- Triangulation settings β€” calibration TOML picker and parameters (placeholder)
- </Typography>
- </Box>
- </PipelineStageTreeItem>
-
- {/* Filter */}
- <PipelineStageTreeItem
- itemId="3d-filter"
- label="Filter"
- checked={filterEnabled}
- onToggle={onFilterToggle}
- isExpanded={isExpanded("3d-filter")}
- summaryWhenCollapsed="One Euro, FABRIK"
- >
- <Box sx={{p: 1, pl: 2, borderLeft: `2px solid ${theme.palette.divider}`}}>
- <SkeletonFilterConfigPanel />
- </Box>
- </PipelineStageTreeItem>
-
- {/* Skeleton (rigid body) */}
- <PipelineStageTreeItem
- itemId="3d-skeleton"
- label="Skeleton"
- checked={rigidBodyEnabled}
- onToggle={onRigidBodyToggle}
- isExpanded={isExpanded("3d-skeleton")}
- >
- <Box sx={{p: 1, pl: 2}}>
- <Typography variant="caption" color="text.secondary">
- Rigid body and skeleton reconstruction parameters (placeholder)
- </Typography>
- </Box>
- </PipelineStageTreeItem>
- </PipelineStageTreeItem>
- </SimpleTreeView>
- );
-};
diff --git a/freemocap-ui/src/components/pipeline-config/PipelineStageTreeItem.tsx b/freemocap-ui/src/components/pipeline-config/PipelineStageTreeItem.tsx
deleted file mode 100644
index 32b2c621..00000000
--- a/freemocap-ui/src/components/pipeline-config/PipelineStageTreeItem.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import React from "react";
-import {Box, Checkbox, Chip, Tooltip, Typography, useTheme} from "@mui/material";
-import {TreeItem} from "@mui/x-tree-view/TreeItem";
-
-interface PipelineStageTreeItemProps {
- itemId: string;
- label: string;
- checked: boolean;
- onToggle: (checked: boolean) => void;
- disabled?: boolean;
- disabledReason?: string;
- summaryWhenCollapsed?: string;
- isExpanded?: boolean;
- children?: React.ReactNode;
-}
-
-export const PipelineStageTreeItem: React.FC<PipelineStageTreeItemProps> = ({
- itemId,
- label,
- checked,
- onToggle,
- disabled = false,
- disabledReason,
- summaryWhenCollapsed,
- isExpanded = false,
- children,
-}) => {
- const theme = useTheme();
-
- const handleCheckboxClick = (e: React.MouseEvent) => {
- e.stopPropagation();
- if (!disabled) {
- onToggle(!checked);
- }
- };
-
- const checkbox = (
- <Checkbox
- size="small"
- checked={checked}
- disabled={disabled}
- onClick={handleCheckboxClick}
- sx={{p: 0.5, flexShrink: 0}}
- />
- );
-
- const labelContent = (
- <Box
- sx={{
- display: "flex",
- alignItems: "center",
- py: 0.25,
- minHeight: 32,
- gap: 0.5,
- }}
- >
- {disabled && disabledReason ? (
- <Tooltip title={disabledReason} arrow>
- <span>{checkbox}</span>
- </Tooltip>
- ) : (
- checkbox
- )}
-
- <Typography
- variant="body2"
- sx={{
- flexShrink: 0,
- color: disabled
- ? theme.palette.text.disabled
- : theme.palette.text.primary,
- }}
- >
- {label}
- </Typography>
-
- {!isExpanded && summaryWhenCollapsed && (
- <Chip
- label={summaryWhenCollapsed}
- size="small"
- variant="outlined"
- sx={{
- ml: 0.5,
- height: 18,
- fontSize: 10,
- "& .MuiChip-label": {px: 0.75},
- borderColor: theme.palette.divider,
- color: theme.palette.text.secondary,
- }}
- />
- )}
- </Box>
- );
-
- return (
- <TreeItem itemId={itemId} label={labelContent}>
- {children}
- </TreeItem>
- );
-};
diff --git a/freemocap-ui/src/components/playback/PlaybackControls.tsx b/freemocap-ui/src/components/playback/PlaybackControls.tsx
index e96e1381..11688397 100644
--- a/freemocap-ui/src/components/playback/PlaybackControls.tsx
+++ b/freemocap-ui/src/components/playback/PlaybackControls.tsx
@@ -1,4 +1,4 @@
-import React, { useMemo, useState } from 'react';
+import React, {useMemo, useState} from 'react';
import {
Box,
Checkbox,
@@ -15,7 +15,7 @@ import {
Typography,
useTheme,
} from '@mui/material';
-import { ThemeProvider, createTheme } from '@mui/material/styles';
+import {createTheme, ThemeProvider} from '@mui/material/styles';
import PlayArrowIcon from '@mui/icons-material/PlayArrow';
import PauseIcon from '@mui/icons-material/Pause';
import SkipPreviousIcon from '@mui/icons-material/SkipPrevious';
@@ -25,8 +25,8 @@ import LastPageIcon from '@mui/icons-material/LastPage';
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
import RepeatIcon from '@mui/icons-material/Repeat';
import SettingsIcon from '@mui/icons-material/Settings';
-import type { PlaybackSettings } from './SyncedVideoPlayer';
-import { useTranslation } from 'react-i18next';
+import type {PlaybackSettings} from './SyncedVideoPlayer';
+import {useTranslation} from 'react-i18next';
interface PlaybackControlsProps {
isPlaying: boolean;
diff --git a/freemocap-ui/src/components/playback/RecordingBrowser.tsx b/freemocap-ui/src/components/playback/RecordingBrowser.tsx
index 892abd48..f3939feb 100644
--- a/freemocap-ui/src/components/playback/RecordingBrowser.tsx
+++ b/freemocap-ui/src/components/playback/RecordingBrowser.tsx
@@ -4,7 +4,7 @@
*
* Standalone component: only depends on MUI + server URL helper.
*/
-import React, { useCallback, useEffect, useMemo, useState } from 'react';
+import React, {useCallback, useEffect, useMemo, useState} from 'react';
import {
Box,
Button,
@@ -32,8 +32,8 @@ import StorageIcon from '@mui/icons-material/Storage';
import AccessTimeIcon from '@mui/icons-material/AccessTime';
import SearchIcon from '@mui/icons-material/Search';
import SortIcon from '@mui/icons-material/Sort';
-import { serverUrls } from '@/services/server/server-helpers/server-urls';
-import { useTranslation } from 'react-i18next';
+import {serverUrls} from '@/services/server/server-helpers/server-urls';
+import {useTranslation} from 'react-i18next';
// ---------------------------------------------------------------------------
// Types
diff --git a/freemocap-ui/src/components/playback/SyncedVideoPlayer.tsx b/freemocap-ui/src/components/playback/SyncedVideoPlayer.tsx
index dad1a227..3d5ce0e7 100644
--- a/freemocap-ui/src/components/playback/SyncedVideoPlayer.tsx
+++ b/freemocap-ui/src/components/playback/SyncedVideoPlayer.tsx
@@ -1,11 +1,11 @@
-import React, { useCallback, useEffect, useRef, useState, useMemo } from 'react';
-import { Box, Tooltip, Typography, useTheme } from '@mui/material';
-import ReactGridLayout, { noCompactor } from 'react-grid-layout';
-import type { Layout, LayoutItem } from 'react-grid-layout';
+import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
+import {Box, Tooltip, Typography, useTheme} from '@mui/material';
+import type {Layout, LayoutItem} from 'react-grid-layout';
+import ReactGridLayout, {noCompactor} from 'react-grid-layout';
import 'react-grid-layout/css/styles.css';
import 'react-resizable/css/styles.css';
-import { PlaybackControls } from './PlaybackControls';
-import { useTranslation } from 'react-i18next';
+import {PlaybackControls} from './PlaybackControls';
+import {useTranslation} from 'react-i18next';
interface VideoEntry {
videoId: string;
diff --git a/freemocap-ui/src/components/processing-pipeline-panel/PipelineConnectionStatus.tsx b/freemocap-ui/src/components/processing-pipeline-panel/PipelineConnectionStatus.tsx
deleted file mode 100644
index 9c658847..00000000
--- a/freemocap-ui/src/components/processing-pipeline-panel/PipelineConnectionStatus.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import {Box, CircularProgress, Typography} from "@mui/material";
-import CheckIcon from '@mui/icons-material/Check';
-import CloseIcon from '@mui/icons-material/Close';
-import {useAppDispatch, useAppSelector} from "@/store/hooks";
-import {
- closePipeline,
- connectRealtimePipeline,
- selectCanConnectPipeline,
- selectCanDisconnectPipeline,
- selectIsPipelineConnected,
- selectIsPipelineLoading,
- selectPipelineError,
- selectPipelineId,
-} from "@/store/slices/pipeline";
-
-export const PipelineConnectionStatus = () => {
- const dispatch = useAppDispatch();
-
- const isConnected = useAppSelector(selectIsPipelineConnected);
- const pipelineId = useAppSelector(selectPipelineId);
- const isLoading = useAppSelector(selectIsPipelineLoading);
- const error = useAppSelector(selectPipelineError);
- const canConnect = useAppSelector(selectCanConnectPipeline);
- const canDisconnect = useAppSelector(selectCanDisconnectPipeline);
-
- const handleToggleConnection = async (e: React.MouseEvent) => {
- e.stopPropagation();
-
- if (isLoading) return;
-
- if (isConnected) {
- console.log('Disconnecting from pipeline');
- await dispatch(closePipeline());
- } else {
- console.log('Connecting to pipeline');
- await dispatch(connectRealtimePipeline(undefined));
- }
- };
-
- const isClickable = canConnect || canDisconnect;
-
- return (
- <Box
- sx={{
- display: 'flex',
- justifyContent: 'flex-end',
- padding: '10px',
- flexDirection: 'column',
- pl: 4,
- cursor: isClickable ? 'pointer' : 'not-allowed',
- border: '4px solid rgb(0, 125, 125)',
- backgroundColor: isConnected ? '#005d94' : '#395067',
- borderRadius: '8px',
- opacity: isClickable ? 1 : 0.6,
- ':hover': isClickable ? {
- backgroundColor: 'rgba(255, 255, 255, 0.05)',
- borderColor: 'rgb(0, 225, 225)',
- } : {},
- }}
- onClick={isClickable ? handleToggleConnection : undefined}
- >
- <Typography
- variant="body1"
- component="div"
- sx={{
- display: 'flex',
- alignItems: 'center',
- gap: 1,
- }}
- >
- <Box sx={{
- border: '1px solid rgba(255, 255, 255, 0.3)',
- width: '24px',
- height: '24px',
- marginRight: '8px',
- cursor: isClickable ? 'pointer' : 'not-allowed',
- borderRadius: '4px',
- transition: 'background-color 0.3s, border-color 0.3s',
- backgroundColor: isConnected ? 'rgba(0, 255, 255, 0.1)' : 'rgba(255, 0, 0, 0.1)',
- borderColor: isConnected ? 'rgba(0, 255, 255, 0.5)' : 'rgba(255, 0, 0, 0.5)',
- boxShadow: '0 2px 4px rgba(0, 0, 0, 0.1)',
- display: 'flex',
- alignItems: 'center',
- padding: '4px',
- justifyContent: 'center',
- '&:hover': isClickable ? {
- backgroundColor: 'rgba(255, 255, 255, 0.05)',
- borderColor: 'rgba(255, 255, 255, 0.2)',
- } : {},
- }}>
- {isLoading ? (
- <CircularProgress size={16} sx={{ color: 'cyan' }} />
- ) : isConnected ? (
- <CheckIcon sx={{ color: 'green' }} />
- ) : (
- <CloseIcon fontSize="small" sx={{ color: 'red' }} />
- )}
- </Box>
- Pipeline: {isConnected ? `connected (id: ${pipelineId})` : 'disconnected'}
- {error && (
- <Typography variant="caption" color="error" sx={{ ml: 1 }}>
- {error}
- </Typography>
- )}
- </Typography>
- </Box>
- );
-};
-
-export default PipelineConnectionStatus;
diff --git a/freemocap-ui/src/components/processing-pipeline-panel/PipelineConnectionToggle.tsx b/freemocap-ui/src/components/processing-pipeline-panel/PipelineConnectionToggle.tsx
deleted file mode 100644
index a53a1d8c..00000000
--- a/freemocap-ui/src/components/processing-pipeline-panel/PipelineConnectionToggle.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import React from "react";
-import {CircularProgress, IconButton, Tooltip, useTheme} from "@mui/material";
-import PowerSettingsNewIcon from "@mui/icons-material/PowerSettingsNew";
-import {useAppDispatch, useAppSelector} from "@/store/hooks";
-import {
- closePipeline,
- connectRealtimePipeline,
- selectCanConnectPipeline,
- selectCanDisconnectPipeline,
- selectIsPipelineConnected,
- selectIsPipelineLoading,
-} from "@/store/slices/pipeline";
-
-export const PipelineConnectionToggle: React.FC = () => {
- const theme = useTheme();
- const dispatch = useAppDispatch();
-
- const isConnected = useAppSelector(selectIsPipelineConnected);
- const isLoading = useAppSelector(selectIsPipelineLoading);
- const canConnect = useAppSelector(selectCanConnectPipeline);
- const canDisconnect = useAppSelector(selectCanDisconnectPipeline);
-
- const isClickable = canConnect || canDisconnect;
-
- const handleToggle = async (e: React.MouseEvent): Promise<void> => {
- e.stopPropagation();
- if (isLoading) return;
-
- if (isConnected) {
- await dispatch(closePipeline());
- } else {
- await dispatch(connectRealtimePipeline(undefined));
- }
- };
-
- const tooltipText = isConnected
- ? "Disconnect pipeline"
- : canConnect
- ? "Connect pipeline"
- : "Select cameras first";
-
- return (
- <Tooltip title={tooltipText}>
- <span>
- <IconButton
- size="small"
- onClick={handleToggle}
- disabled={!isClickable || isLoading}
- sx={{
- color: "inherit",
- border: "1.5px solid",
- borderColor: isConnected
- ? theme.palette.success.light
- : "rgba(255,255,255,0.25)",
- borderRadius: 1,
- p: 0.5,
- backgroundColor: isConnected
- ? "rgba(76, 175, 80, 0.2)"
- : "transparent",
- "&:hover": {
- backgroundColor: isConnected
- ? "rgba(76, 175, 80, 0.3)"
- : "rgba(255,255,255,0.1)",
- },
- "&.Mui-disabled": {
- color: "rgba(255,255,255,0.3)",
- borderColor: "rgba(255,255,255,0.1)",
- },
- }}
- >
- {isLoading ? (
- <CircularProgress size={18} sx={{color: "inherit"}} />
- ) : (
- <PowerSettingsNewIcon fontSize="small" />
- )}
- </IconButton>
- </span>
- </Tooltip>
- );
-};
diff --git a/freemocap-ui/src/components/processing-pipeline-panel/PipelineSummary.tsx b/freemocap-ui/src/components/processing-pipeline-panel/PipelineSummary.tsx
deleted file mode 100644
index 05619890..00000000
--- a/freemocap-ui/src/components/processing-pipeline-panel/PipelineSummary.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-import React from "react";
-import {Chip, Typography, useTheme} from "@mui/material";
-import {useAppSelector} from "@/store/hooks";
-import {
- selectIsPipelineConnected,
- selectPipelineError,
- selectPipelineId,
-} from "@/store/slices/pipeline";
-
-export const PipelineSummary: React.FC = () => {
- const theme = useTheme();
-
- const isConnected = useAppSelector(selectIsPipelineConnected);
- const pipelineId = useAppSelector(selectPipelineId);
- const error = useAppSelector(selectPipelineError);
-
- if (error) {
- return (
- <Typography
- variant="caption"
- sx={{
- color: theme.palette.error.light,
- fontWeight: 500,
- whiteSpace: "nowrap",
- overflow: "hidden",
- textOverflow: "ellipsis",
- }}
- >
- Error
- </Typography>
- );
- }
-
- const statusColor = isConnected
- ? theme.palette.success.main
- : theme.palette.grey[600];
-
- return (
- <Chip
- label={isConnected ? `Active (${pipelineId})` : "Inactive"}
- size="small"
- sx={{
- height: 20,
- fontSize: 11,
- fontWeight: 600,
- backgroundColor: statusColor,
- color: theme.palette.getContrastText(statusColor),
- maxWidth: 160,
- "& .MuiChip-label": {
- overflow: "hidden",
- textOverflow: "ellipsis",
- },
- }}
- />
- );
-};
diff --git a/freemocap-ui/src/components/processing-pipeline-panel/ProcessingPipelinePanel.tsx b/freemocap-ui/src/components/processing-pipeline-panel/ProcessingPipelinePanel.tsx
deleted file mode 100644
index dd4c74a1..00000000
--- a/freemocap-ui/src/components/processing-pipeline-panel/ProcessingPipelinePanel.tsx
+++ /dev/null
@@ -1,57 +0,0 @@
-import React, {useState} from "react";
-import {Box, Typography} from "@mui/material";
-import LanIcon from "@mui/icons-material/Lan";
-import {CollapsibleSidebarSection} from "@/components/common/CollapsibleSidebarSection";
-import {PipelineConnectionToggle} from "@/components/processing-pipeline-panel/PipelineConnectionToggle";
-import {PipelineSummary} from "@/components/processing-pipeline-panel/PipelineSummary";
-import {useAppSelector} from "@/store/hooks";
-import {selectBackendPipeline} from "@/store/slices/settings";
-import {PipelineConfigTree} from "@/components/pipeline-config/PipelineConfigTree";
-import {useServer} from "@/services";
-
-export const ProcessingPipelinePanel: React.FC = () => {
- const {send, isConnected} = useServer();
- const backendPipeline = useAppSelector(selectBackendPipeline);
-
- const pipelineConfig = backendPipeline?.config;
-
-
- // 3D Reconstruction toggles β€” local state until backend support is added
- const [triangulateEnabled, setTriangulateEnabled] = useState(false);
- const [filterEnabled, setFilterEnabled] = useState(false);
- const [rigidBodyEnabled, setRigidBodyEnabled] = useState(false);
-
- const patchPipelineConfig = (patch: Record<string, unknown>) => {
- send({
- message_type: "settings/patch",
- patch: {pipeline: {config: patch}},
- });
- };
-
- return (
- <CollapsibleSidebarSection
- icon={<LanIcon sx={{transform: "scaleY(-1.05)", color: "inherit"}} />}
- title="Realtime Pipeline"
- summaryContent={<PipelineSummary />}
- primaryControl={<PipelineConnectionToggle />}
- defaultExpanded={false}
- >
- <Box sx={{p: 2}}>
-
- <PipelineConfigTree
- context="realtime"
- charucoEnabled={pipelineConfig?.calibration_detection_enabled ?? true}
- onCharucoToggle={(v) => patchPipelineConfig({calibration_detection_enabled: v})}
- skeletonEnabled={pipelineConfig?.mocap_detection_enabled ?? true}
- onSkeletonToggle={(v) => patchPipelineConfig({mocap_detection_enabled: v})}
- triangulateEnabled={triangulateEnabled}
- onTriangulateToggle={setTriangulateEnabled}
- filterEnabled={filterEnabled}
- onFilterToggle={setFilterEnabled}
- rigidBodyEnabled={rigidBodyEnabled}
- onRigidBodyToggle={setRigidBodyEnabled}
- />
- </Box>
- </CollapsibleSidebarSection>
- );
-};
diff --git a/freemocap-ui/src/components/settings-editor/SettingsEditor.tsx b/freemocap-ui/src/components/settings-editor/SettingsEditor.tsx
index 31c3050d..07751401 100644
--- a/freemocap-ui/src/components/settings-editor/SettingsEditor.tsx
+++ b/freemocap-ui/src/components/settings-editor/SettingsEditor.tsx
@@ -1,198 +1,182 @@
-import React, { useState, useCallback, useRef, useMemo, useEffect } from 'react';
-import {
- Box,
- Button,
- ButtonGroup,
- Alert,
- Snackbar,
- Tooltip,
- Divider,
- CircularProgress,
-} from '@mui/material';
-import { useTheme } from '@mui/material/styles';
-import Editor, { OnMount } from '@monaco-editor/react';
-import UploadFileIcon from '@mui/icons-material/UploadFile';
-import DownloadIcon from '@mui/icons-material/Download';
-import CheckIcon from '@mui/icons-material/Check';
-import RestoreIcon from '@mui/icons-material/Restore';
-import ContentCopyIcon from '@mui/icons-material/ContentCopy';
-import {
- useAppDispatch,
- useAppSelector,
- themeModeSet,
- recordingDirectoryChanged,
- configUpdated,
- selectServerSettings,
-} from '@/store';
-import {
- mocapDetectorConfigReplaced,
- skeletonFilterConfigReplaced,
- updateMocapConfigOnServer,
-} from '@/store/slices/mocap';
-import {calibrationConfigUpdated, updateCalibrationConfigOnServer } from '@/store/slices/calibration';
-import { ThemeMode } from '@/store/slices/theme/theme-types';
-import {
- serialize,
- deserialize,
- convertFormat,
- SerializationFormat,
- FORMAT_EXTENSIONS,
- FORMAT_MIME_TYPES,
- FORMAT_MONACO_LANGUAGES,
-} from './format-converters';
-import {useServer} from "@/services";
-
-// ── Aggregated settings shape (config-only, no runtime state) ──
-
-interface AggregatedSettings {
- appearance: {
- mode: string;
- };
- recording: {
- recording_directory: string;
- use_delay_start: boolean;
- delay_seconds: number;
- use_timestamp: boolean;
- use_increment: boolean;
- current_increment: number;
- base_name: string;
- recording_tag: string;
- create_subfolder: boolean;
- custom_subfolder_name: string;
- };
- calibration: {
- live_track_charuco: boolean;
- charuco_board_x_squares: number;
- charuco_board_y_squares: number;
- charuco_square_length: number;
- min_shared_views_per_camera: number;
- auto_stop_on_min_view_count: boolean;
- solver_method: string;
- use_groundplane: boolean;
- };
- mocap: {
- detector: Record<string, unknown>;
- skeleton_filter: Record<string, unknown>;
- };
- // vmc: {
- // enabled: boolean;
- // host: string;
- // port: number;
- // };
-}
-
-// ── Hook: gather current settings into a flat config object ──
-
-function useAggregatedSettings(): AggregatedSettings {
- const themeMode = useAppSelector(state => state.theme.mode);
- const recording = useAppSelector(state => state.recording);
- const calibration = useAppSelector(state => state.calibration.config);
- const mocap = useAppSelector(state => state.mocap.config);
- const serverSettings = useAppSelector(selectServerSettings);
-
- return useMemo((): AggregatedSettings => ({
- appearance: {
- mode: themeMode,
- },
- recording: {
- recording_directory: recording.recordingDirectory,
- use_delay_start: recording.config.useDelayStart,
- delay_seconds: recording.config.delaySeconds,
- use_timestamp: recording.config.useTimestamp,
- use_increment: recording.config.useIncrement,
- current_increment: recording.config.currentIncrement,
- base_name: recording.config.baseName,
- recording_tag: recording.config.recordingTag,
- create_subfolder: recording.config.createSubfolder,
- custom_subfolder_name: recording.config.customSubfolderName,
- },
- calibration: {
- live_track_charuco: calibration.liveTrackCharuco,
- charuco_board_x_squares: calibration.charucoBoardXSquares,
- charuco_board_y_squares: calibration.charucoBoardYSquares,
- charuco_square_length: calibration.charucoSquareLength,
- min_shared_views_per_camera: calibration.minSharedViewsPerCamera,
- auto_stop_on_min_view_count: calibration.autoStopOnMinViewCount,
- solver_method: calibration.solverMethod,
- use_groundplane: calibration.useGroundplane,
- },
- mocap: {
- detector: mocap.detector as unknown as Record<string, unknown>,
- skeleton_filter: mocap.skeleton_filter as unknown as Record<string, unknown>,
- },
- // vmc: {
- // enabled: serverSettings?.vmc?.enabled ?? false,
- // host: serverSettings?.vmc?.host ?? '127.0.0.1',
- // port: serverSettings?.vmc?.port ?? 39539,
- // },
- }), [themeMode, recording, calibration, mocap, serverSettings]);
-}
-
-// ── Apply parsed settings back to the Redux stores ──
-
-function useApplySettings() {
- const dispatch = useAppDispatch();
- const { send, isConnected } = useServer();
-
- return useCallback((parsed: Record<string, unknown>) => {
- const settings = parsed as unknown as Partial<AggregatedSettings>;
-
- // Appearance
- if (settings.appearance && typeof settings.appearance.mode === 'string') {
- const mode = settings.appearance.mode;
- if (mode === 'dark' || mode === 'light') {
- dispatch(themeModeSet(mode as ThemeMode));
- } else {
- throw new Error(`Invalid appearance.mode: "${mode}" (must be "dark" or "light")`);
- }
- }
-
- // Recording
- if (settings.recording) {
- const rec = settings.recording;
- if (typeof rec.recording_directory === 'string') {
- dispatch(recordingDirectoryChanged(rec.recording_directory));
- }
- dispatch(configUpdated({
- useDelayStart: rec.use_delay_start,
- delaySeconds: rec.delay_seconds,
- useTimestamp: rec.use_timestamp,
- useIncrement: rec.use_increment,
- currentIncrement: rec.current_increment,
- baseName: rec.base_name,
- recordingTag: rec.recording_tag,
- createSubfolder: rec.create_subfolder,
- customSubfolderName: rec.custom_subfolder_name,
- }));
- }
-
- // Calibration
- if (settings.calibration) {
- const cal = settings.calibration;
- dispatch(calibrationConfigUpdated({
- liveTrackCharuco: cal.live_track_charuco,
- charucoBoardXSquares: cal.charuco_board_x_squares,
- charucoBoardYSquares: cal.charuco_board_y_squares,
- charucoSquareLength: cal.charuco_square_length,
- minSharedViewsPerCamera: cal.min_shared_views_per_camera,
- autoStopOnMinViewCount: cal.auto_stop_on_min_view_count,
- solverMethod: cal.solver_method as 'anipose' | 'pyceres',
- useGroundplane: cal.use_groundplane,
- }));
- dispatch(updateCalibrationConfigOnServer());
- }
-
- // Mocap
- if (settings.mocap) {
- if (settings.mocap.detector) {
- dispatch(mocapDetectorConfigReplaced(settings.mocap.detector as any));
- }
- if (settings.mocap.skeleton_filter) {
- dispatch(skeletonFilterConfigReplaced(settings.mocap.skeleton_filter as any));
- }
- dispatch(updateMocapConfigOnServer());
- }
-
+import React, {useCallback, useEffect, useMemo, useRef, useState} from 'react';
+import {Alert, Box, Button, ButtonGroup, CircularProgress, Divider, Snackbar, Tooltip,} from '@mui/material';
+import {useTheme} from '@mui/material/styles';
+import Editor, {OnMount} from '@monaco-editor/react';
+import UploadFileIcon from '@mui/icons-material/UploadFile';
+import DownloadIcon from '@mui/icons-material/Download';
+import CheckIcon from '@mui/icons-material/Check';
+import RestoreIcon from '@mui/icons-material/Restore';
+import ContentCopyIcon from '@mui/icons-material/ContentCopy';
+import {
+ configUpdated,
+ recordingDirectoryChanged,
+ selectServerSettings,
+ themeModeSet,
+ useAppDispatch,
+ useAppSelector,
+} from '@/store';
+import {
+ mocapDetectorConfigReplaced,
+ skeletonFilterConfigReplaced,
+ updateMocapConfigOnServer,
+} from '@/store/slices/mocap';
+import {calibrationConfigUpdated, updateCalibrationConfigOnServer} from '@/store/slices/calibration';
+import {ThemeMode} from '@/store/slices/theme/theme-types';
+import {
+ convertFormat,
+ deserialize,
+ FORMAT_EXTENSIONS,
+ FORMAT_MIME_TYPES,
+ FORMAT_MONACO_LANGUAGES,
+ SerializationFormat,
+ serialize,
+} from './format-converters';
+import {useServer} from "@/services";
+
+// ── Aggregated settings shape (config-only, no runtime state) ──
+
+interface AggregatedSettings {
+ appearance: {
+ mode: string;
+ };
+ recording: {
+ recording_directory: string;
+ use_delay_start: boolean;
+ delay_seconds: number;
+ use_timestamp: boolean;
+ use_increment: boolean;
+ current_increment: number;
+ base_name: string;
+ recording_tag: string;
+ create_subfolder: boolean;
+ custom_subfolder_name: string;
+ };
+ calibration: {
+ charuco_board_x_squares: number;
+ charuco_board_y_squares: number;
+ charuco_square_length: number;
+ min_shared_views_per_camera: number;
+ auto_stop_on_min_view_count: boolean;
+ solver_method: string;
+ use_groundplane: boolean;
+ };
+ mocap: {
+ detector: Record<string, unknown>;
+ skeleton_filter: Record<string, unknown>;
+ };
+
+}
+
+// ── Hook: gather current settings into a flat config object ──
+
+function useAggregatedSettings(): AggregatedSettings {
+ const themeMode = useAppSelector(state => state.theme.mode);
+ const recording = useAppSelector(state => state.recording);
+ const calibration = useAppSelector(state => state.calibration.config);
+ const mocap = useAppSelector(state => state.mocap.config);
+ const serverSettings = useAppSelector(selectServerSettings);
+
+ return useMemo((): AggregatedSettings => ({
+ appearance: {
+ mode: themeMode,
+ },
+ recording: {
+ recording_directory: recording.recordingDirectory,
+ use_delay_start: recording.config.useDelayStart,
+ delay_seconds: recording.config.delaySeconds,
+ use_timestamp: recording.config.useTimestamp,
+ use_increment: recording.config.useIncrement,
+ current_increment: recording.config.currentIncrement,
+ base_name: recording.config.baseName,
+ recording_tag: recording.config.recordingTag,
+ create_subfolder: recording.config.createSubfolder,
+ custom_subfolder_name: recording.config.customSubfolderName,
+ },
+ calibration: {
+ charuco_board_x_squares: calibration.charucoBoardXSquares,
+ charuco_board_y_squares: calibration.charucoBoardYSquares,
+ charuco_square_length: calibration.charucoSquareLength,
+ min_shared_views_per_camera: calibration.minSharedViewsPerCamera,
+ auto_stop_on_min_view_count: calibration.autoStopOnMinViewCount,
+ solver_method: calibration.solverMethod,
+ use_groundplane: calibration.useGroundplane,
+ },
+ mocap: {
+ detector: mocap.detector as unknown as Record<string, unknown>,
+ skeleton_filter: mocap.skeleton_filter as unknown as Record<string, unknown>,
+ },
+ // vmc: {
+ // enabled: serverSettings?.vmc?.enabled ?? false,
+ // host: serverSettings?.vmc?.host ?? '127.0.0.1',
+ // port: serverSettings?.vmc?.port ?? 39539,
+ // },
+ }), [themeMode, recording, calibration, mocap, serverSettings]);
+}
+
+// ── Apply parsed settings back to the Redux stores ──
+
+function useApplySettings() {
+ const dispatch = useAppDispatch();
+ const { sendWebsocketMessage, isConnected } = useServer();
+
+ return useCallback((parsed: Record<string, unknown>) => {
+ const settings = parsed as unknown as Partial<AggregatedSettings>;
+
+ // Appearance
+ if (settings.appearance && typeof settings.appearance.mode === 'string') {
+ const mode = settings.appearance.mode;
+ if (mode === 'dark' || mode === 'light') {
+ dispatch(themeModeSet(mode as ThemeMode));
+ } else {
+ throw new Error(`Invalid appearance.mode: "${mode}" (must be "dark" or "light")`);
+ }
+ }
+
+ // Recording
+ if (settings.recording) {
+ const rec = settings.recording;
+ if (typeof rec.recording_directory === 'string') {
+ dispatch(recordingDirectoryChanged(rec.recording_directory));
+ }
+ dispatch(configUpdated({
+ useDelayStart: rec.use_delay_start,
+ delaySeconds: rec.delay_seconds,
+ useTimestamp: rec.use_timestamp,
+ useIncrement: rec.use_increment,
+ currentIncrement: rec.current_increment,
+ baseName: rec.base_name,
+ recordingTag: rec.recording_tag,
+ createSubfolder: rec.create_subfolder,
+ customSubfolderName: rec.custom_subfolder_name,
+ }));
+ }
+
+ // Calibration
+ if (settings.calibration) {
+ const cal = settings.calibration;
+ dispatch(calibrationConfigUpdated({
+ charucoBoardXSquares: cal.charuco_board_x_squares,
+ charucoBoardYSquares: cal.charuco_board_y_squares,
+ charucoSquareLength: cal.charuco_square_length,
+ minSharedViewsPerCamera: cal.min_shared_views_per_camera,
+ autoStopOnMinViewCount: cal.auto_stop_on_min_view_count,
+ solverMethod: cal.solver_method as 'anipose' | 'pyceres',
+ useGroundplane: cal.use_groundplane,
+ }));
+ dispatch(updateCalibrationConfigOnServer());
+ }
+
+ // Mocap
+ if (settings.mocap) {
+ if (settings.mocap.detector) {
+ dispatch(mocapDetectorConfigReplaced(settings.mocap.detector as any));
+ }
+ if (settings.mocap.skeleton_filter) {
+ dispatch(skeletonFilterConfigReplaced(settings.mocap.skeleton_filter as any));
+ }
+ dispatch(updateMocapConfigOnServer());
+ }
+
// VMC (patched via WebSocket) - currently disabled
// if (settings.vmc && isConnected) {
// send({
@@ -205,336 +189,336 @@ function useApplySettings() {
// },
// },
// });
- // }
- }, [dispatch, send, isConnected]);
-}
-
-// ── Format toggle button ──
-
-function FormatButton({
- format,
- active,
- onClick,
-}: {
- format: SerializationFormat;
- active: boolean;
- onClick: () => void;
-}) {
- return (
- <Button
- size="small"
- variant={active ? 'contained' : 'outlined'}
- onClick={onClick}
- sx={{
- textTransform: 'uppercase',
- fontWeight: 700,
- fontSize: '0.7rem',
- minWidth: 56,
- letterSpacing: 0.8,
- }}
- >
- {format}
- </Button>
- );
-}
-
-// ── Main editor component ──
-
-export const SettingsEditor: React.FC = () => {
- const theme = useTheme();
- const aggregated = useAggregatedSettings();
- const applySettings = useApplySettings();
-
- const [format, setFormat] = useState<SerializationFormat>('json');
- const [editorContent, setEditorContent] = useState<string>('');
- const [hasEdits, setHasEdits] = useState(false);
- const [error, setError] = useState<string | null>(null);
- const [snackbar, setSnackbar] = useState<{ message: string; severity: 'success' | 'error' } | null>(null);
-
- const editorRef = useRef<any>(null);
- const fileInputRef = useRef<HTMLInputElement>(null);
-
- // Serialize current settings whenever aggregated state or format changes (only if no pending edits)
- const serializedFromStore = useMemo(
- () => serialize(aggregated as unknown as Record<string, unknown>, format),
- [aggregated, format],
- );
-
- // Sync editor content from store when there are no pending edits
- useEffect(() => {
- if (!hasEdits) {
- setEditorContent(serializedFromStore);
- }
- }, [serializedFromStore, hasEdits]);
-
- // Initialize editor on first mount
- useEffect(() => {
- setEditorContent(serialize(aggregated as unknown as Record<string, unknown>, format));
- // Only run on mount
- // eslint-disable-next-line react-hooks/exhaustive-deps
- }, []);
-
- const handleEditorMount: OnMount = useCallback((editor) => {
- editorRef.current = editor;
- }, []);
-
- const handleEditorChange = useCallback((value: string | undefined) => {
- if (value === undefined) return;
- setEditorContent(value);
- setHasEdits(true);
- setError(null);
- }, []);
-
- // Format switching β€” convert current content to new format
- const handleFormatChange = useCallback((newFormat: SerializationFormat) => {
- if (newFormat === format) return;
- try {
- const converted = convertFormat(editorContent, format, newFormat);
- setEditorContent(converted);
- setFormat(newFormat);
- setError(null);
- } catch (err) {
- setError(`Cannot convert to ${newFormat.toUpperCase()}: ${err instanceof Error ? err.message : String(err)}`);
- }
- }, [editorContent, format]);
-
- // Reset editor to current store state
- const handleReset = useCallback(() => {
- const fresh = serialize(aggregated as unknown as Record<string, unknown>, format);
- setEditorContent(fresh);
- setHasEdits(false);
- setError(null);
- }, [aggregated, format]);
-
- // Apply edits to store
- const handleApply = useCallback(() => {
- try {
- const parsed = deserialize(editorContent, format);
- applySettings(parsed);
- setHasEdits(false);
- setError(null);
- setSnackbar({ message: 'Settings applied successfully', severity: 'success' });
- } catch (err) {
- const message = err instanceof Error ? err.message : String(err);
- setError(`Failed to apply: ${message}`);
- setSnackbar({ message: `Failed to apply settings: ${message}`, severity: 'error' });
- }
- }, [editorContent, format, applySettings]);
-
- // Copy to clipboard
- const handleCopy = useCallback(async () => {
- try {
- await navigator.clipboard.writeText(editorContent);
- setSnackbar({ message: 'Copied to clipboard', severity: 'success' });
- } catch {
- setSnackbar({ message: 'Failed to copy to clipboard', severity: 'error' });
- }
- }, [editorContent]);
-
- // Download as file
- const handleDownload = useCallback(() => {
- const blob = new Blob([editorContent], { type: FORMAT_MIME_TYPES[format] });
- const url = URL.createObjectURL(blob);
- const a = document.createElement('a');
- a.href = url;
- a.download = `freemocap-settings${FORMAT_EXTENSIONS[format]}`;
- a.click();
- URL.revokeObjectURL(url);
- }, [editorContent, format]);
-
- // Upload from file
- const handleUploadClick = useCallback(() => {
- fileInputRef.current?.click();
- }, []);
-
- const handleFileSelected = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
- const file = e.target.files?.[0];
- if (!file) return;
-
- // Detect format from file extension
- const ext = file.name.split('.').pop()?.toLowerCase();
- let detectedFormat: SerializationFormat = format;
- if (ext === 'json') detectedFormat = 'json';
- else if (ext === 'yaml' || ext === 'yml') detectedFormat = 'yaml';
- else if (ext === 'toml') detectedFormat = 'toml';
-
- const reader = new FileReader();
- reader.onload = (event) => {
- const text = event.target?.result;
- if (typeof text !== 'string') {
- setError('Failed to read file');
- return;
- }
- try {
- // Validate by parsing
- deserialize(text, detectedFormat);
- setFormat(detectedFormat);
- setEditorContent(text);
- setHasEdits(true);
- setError(null);
- setSnackbar({ message: `Loaded ${file.name} (${detectedFormat.toUpperCase()})`, severity: 'success' });
- } catch (err) {
- setError(`Invalid ${detectedFormat.toUpperCase()} in ${file.name}: ${err instanceof Error ? err.message : String(err)}`);
- }
- };
- reader.onerror = () => {
- setError(`Failed to read file: ${file.name}`);
- };
- reader.readAsText(file);
-
- // Reset the input so the same file can be re-selected
- e.target.value = '';
- }, [format]);
-
- const isDark = theme.palette.mode === 'dark';
-
- return (
- <Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', gap: 1.5 }}>
- {/* Toolbar */}
- <Box
- sx={{
- display: 'flex',
- alignItems: 'center',
- justifyContent: 'space-between',
- flexWrap: 'wrap',
- gap: 1,
- }}
- >
- {/* Format selector */}
- <ButtonGroup size="small" variant="outlined">
- <FormatButton format="json" active={format === 'json'} onClick={() => handleFormatChange('json')} />
- <FormatButton format="yaml" active={format === 'yaml'} onClick={() => handleFormatChange('yaml')} />
- <FormatButton format="toml" active={format === 'toml'} onClick={() => handleFormatChange('toml')} />
- </ButtonGroup>
-
- {/* Action buttons */}
- <Box sx={{ display: 'flex', gap: 0.75 }}>
- <Tooltip title="Copy to clipboard">
- <Button size="small" variant="outlined" onClick={handleCopy} sx={{ minWidth: 0, px: 1 }}>
- <ContentCopyIcon sx={{ fontSize: 16 }} />
- </Button>
- </Tooltip>
- <Tooltip title="Upload settings file (.json, .yaml, .toml)">
- <Button size="small" variant="outlined" onClick={handleUploadClick} startIcon={<UploadFileIcon sx={{ fontSize: 16 }} />}>
- Upload
- </Button>
- </Tooltip>
- <Tooltip title={`Download as ${format.toUpperCase()}`}>
- <Button size="small" variant="outlined" onClick={handleDownload} startIcon={<DownloadIcon sx={{ fontSize: 16 }} />}>
- Download
- </Button>
- </Tooltip>
-
- <Divider orientation="vertical" flexItem sx={{ mx: 0.5 }} />
-
- <Tooltip title="Reset to current app state">
- <span>
- <Button
- size="small"
- variant="outlined"
- onClick={handleReset}
- disabled={!hasEdits}
- startIcon={<RestoreIcon sx={{ fontSize: 16 }} />}
- >
- Reset
- </Button>
- </span>
- </Tooltip>
- <Tooltip title="Apply edits to app">
- <span>
- <Button
- size="small"
- variant="contained"
- color="success"
- onClick={handleApply}
- disabled={!hasEdits}
- startIcon={<CheckIcon sx={{ fontSize: 16 }} />}
- >
- Apply
- </Button>
- </span>
- </Tooltip>
- </Box>
- </Box>
-
- {/* Status bar */}
- {hasEdits && (
- <Alert severity="info" sx={{ py: 0, fontSize: '0.75rem' }}>
- You have unsaved edits. Click <strong>Apply</strong> to push changes to the app, or <strong>Reset</strong> to discard.
- </Alert>
- )}
- {error && (
- <Alert severity="error" sx={{ py: 0, fontSize: '0.75rem' }}>
- {error}
- </Alert>
- )}
-
- {/* Monaco Editor */}
- <Box
- sx={{
- flex: 1,
- minHeight: 400,
- border: `1px solid ${theme.palette.divider}`,
- borderRadius: 1,
- overflow: 'hidden',
- }}
- >
- <Editor
- height="100%"
- language={FORMAT_MONACO_LANGUAGES[format]}
- value={editorContent}
- theme={isDark ? 'vs-dark' : 'light'}
- onChange={handleEditorChange}
- onMount={handleEditorMount}
- loading={
- <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%' }}>
- <CircularProgress size={32} />
- </Box>
- }
- options={{
- minimap: { enabled: false },
- fontSize: 13,
- fontFamily: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace",
- lineNumbers: 'on',
- scrollBeyondLastLine: false,
- wordWrap: 'on',
- tabSize: 2,
- automaticLayout: true,
- renderWhitespace: 'selection',
- bracketPairColorization: { enabled: true },
- folding: true,
- formatOnPaste: true,
- }}
- />
- </Box>
-
- {/* Hidden file input for upload */}
- <input
- ref={fileInputRef}
- type="file"
- accept=".json,.yaml,.yml,.toml"
- style={{ display: 'none' }}
- onChange={handleFileSelected}
- />
-
- {/* Snackbar for feedback */}
- <Snackbar
- open={snackbar !== null}
- autoHideDuration={3000}
- onClose={() => setSnackbar(null)}
- anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
- >
- {snackbar ? (
- <Alert
- onClose={() => setSnackbar(null)}
- severity={snackbar.severity}
- variant="filled"
- sx={{ width: '100%' }}
- >
- {snackbar.message}
- </Alert>
- ) : undefined}
- </Snackbar>
- </Box>
- );
-};
\ No newline at end of file
+ // }
+ }, [dispatch, sendWebsocketMessage, isConnected]);
+}
+
+// ── Format toggle button ──
+
+function FormatButton({
+ format,
+ active,
+ onClick,
+}: {
+ format: SerializationFormat;
+ active: boolean;
+ onClick: () => void;
+}) {
+ return (
+ <Button
+ size="small"
+ variant={active ? 'contained' : 'outlined'}
+ onClick={onClick}
+ sx={{
+ textTransform: 'uppercase',
+ fontWeight: 700,
+ fontSize: '0.7rem',
+ minWidth: 56,
+ letterSpacing: 0.8,
+ }}
+ >
+ {format}
+ </Button>
+ );
+}
+
+// ── Main editor component ──
+
+export const SettingsEditor: React.FC = () => {
+ const theme = useTheme();
+ const aggregated = useAggregatedSettings();
+ const applySettings = useApplySettings();
+
+ const [format, setFormat] = useState<SerializationFormat>('json');
+ const [editorContent, setEditorContent] = useState<string>('');
+ const [hasEdits, setHasEdits] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const [snackbar, setSnackbar] = useState<{ message: string; severity: 'success' | 'error' } | null>(null);
+
+ const editorRef = useRef<any>(null);
+ const fileInputRef = useRef<HTMLInputElement>(null);
+
+ // Serialize current settings whenever aggregated state or format changes (only if no pending edits)
+ const serializedFromStore = useMemo(
+ () => serialize(aggregated as unknown as Record<string, unknown>, format),
+ [aggregated, format],
+ );
+
+ // Sync editor content from store when there are no pending edits
+ useEffect(() => {
+ if (!hasEdits) {
+ setEditorContent(serializedFromStore);
+ }
+ }, [serializedFromStore, hasEdits]);
+
+ // Initialize editor on first mount
+ useEffect(() => {
+ setEditorContent(serialize(aggregated as unknown as Record<string, unknown>, format));
+ // Only run on mount
+ // eslint-disable-next-line react-hooks/exhaustive-deps
+ }, []);
+
+ const handleEditorMount: OnMount = useCallback((editor) => {
+ editorRef.current = editor;
+ }, []);
+
+ const handleEditorChange = useCallback((value: string | undefined) => {
+ if (value === undefined) return;
+ setEditorContent(value);
+ setHasEdits(true);
+ setError(null);
+ }, []);
+
+ // Format switching β€” convert current content to new format
+ const handleFormatChange = useCallback((newFormat: SerializationFormat) => {
+ if (newFormat === format) return;
+ try {
+ const converted = convertFormat(editorContent, format, newFormat);
+ setEditorContent(converted);
+ setFormat(newFormat);
+ setError(null);
+ } catch (err) {
+ setError(`Cannot convert to ${newFormat.toUpperCase()}: ${err instanceof Error ? err.message : String(err)}`);
+ }
+ }, [editorContent, format]);
+
+ // Reset editor to current store state
+ const handleReset = useCallback(() => {
+ const fresh = serialize(aggregated as unknown as Record<string, unknown>, format);
+ setEditorContent(fresh);
+ setHasEdits(false);
+ setError(null);
+ }, [aggregated, format]);
+
+ // Apply edits to store
+ const handleApply = useCallback(() => {
+ try {
+ const parsed = deserialize(editorContent, format);
+ applySettings(parsed);
+ setHasEdits(false);
+ setError(null);
+ setSnackbar({ message: 'Settings applied successfully', severity: 'success' });
+ } catch (err) {
+ const message = err instanceof Error ? err.message : String(err);
+ setError(`Failed to apply: ${message}`);
+ setSnackbar({ message: `Failed to apply settings: ${message}`, severity: 'error' });
+ }
+ }, [editorContent, format, applySettings]);
+
+ // Copy to clipboard
+ const handleCopy = useCallback(async () => {
+ try {
+ await navigator.clipboard.writeText(editorContent);
+ setSnackbar({ message: 'Copied to clipboard', severity: 'success' });
+ } catch {
+ setSnackbar({ message: 'Failed to copy to clipboard', severity: 'error' });
+ }
+ }, [editorContent]);
+
+ // Download as file
+ const handleDownload = useCallback(() => {
+ const blob = new Blob([editorContent], { type: FORMAT_MIME_TYPES[format] });
+ const url = URL.createObjectURL(blob);
+ const a = document.createElement('a');
+ a.href = url;
+ a.download = `freemocap-settings${FORMAT_EXTENSIONS[format]}`;
+ a.click();
+ URL.revokeObjectURL(url);
+ }, [editorContent, format]);
+
+ // Upload from file
+ const handleUploadClick = useCallback(() => {
+ fileInputRef.current?.click();
+ }, []);
+
+ const handleFileSelected = useCallback((e: React.ChangeEvent<HTMLInputElement>) => {
+ const file = e.target.files?.[0];
+ if (!file) return;
+
+ // Detect format from file extension
+ const ext = file.name.split('.').pop()?.toLowerCase();
+ let detectedFormat: SerializationFormat = format;
+ if (ext === 'json') detectedFormat = 'json';
+ else if (ext === 'yaml' || ext === 'yml') detectedFormat = 'yaml';
+ else if (ext === 'toml') detectedFormat = 'toml';
+
+ const reader = new FileReader();
+ reader.onload = (event) => {
+ const text = event.target?.result;
+ if (typeof text !== 'string') {
+ setError('Failed to read file');
+ return;
+ }
+ try {
+ // Validate by parsing
+ deserialize(text, detectedFormat);
+ setFormat(detectedFormat);
+ setEditorContent(text);
+ setHasEdits(true);
+ setError(null);
+ setSnackbar({ message: `Loaded ${file.name} (${detectedFormat.toUpperCase()})`, severity: 'success' });
+ } catch (err) {
+ setError(`Invalid ${detectedFormat.toUpperCase()} in ${file.name}: ${err instanceof Error ? err.message : String(err)}`);
+ }
+ };
+ reader.onerror = () => {
+ setError(`Failed to read file: ${file.name}`);
+ };
+ reader.readAsText(file);
+
+ // Reset the input so the same file can be re-selected
+ e.target.value = '';
+ }, [format]);
+
+ const isDark = theme.palette.mode === 'dark';
+
+ return (
+ <Box sx={{ display: 'flex', flexDirection: 'column', height: '100%', gap: 1.5 }}>
+ {/* Toolbar */}
+ <Box
+ sx={{
+ display: 'flex',
+ alignItems: 'center',
+ justifyContent: 'space-between',
+ flexWrap: 'wrap',
+ gap: 1,
+ }}
+ >
+ {/* Format selector */}
+ <ButtonGroup size="small" variant="outlined">
+ <FormatButton format="json" active={format === 'json'} onClick={() => handleFormatChange('json')} />
+ <FormatButton format="yaml" active={format === 'yaml'} onClick={() => handleFormatChange('yaml')} />
+ <FormatButton format="toml" active={format === 'toml'} onClick={() => handleFormatChange('toml')} />
+ </ButtonGroup>
+
+ {/* Action buttons */}
+ <Box sx={{ display: 'flex', gap: 0.75 }}>
+ <Tooltip title="Copy to clipboard">
+ <Button size="small" variant="outlined" onClick={handleCopy} sx={{ minWidth: 0, px: 1 }}>
+ <ContentCopyIcon sx={{ fontSize: 16 }} />
+ </Button>
+ </Tooltip>
+ <Tooltip title="Upload settings file (.json, .yaml, .toml)">
+ <Button size="small" variant="outlined" onClick={handleUploadClick} startIcon={<UploadFileIcon sx={{ fontSize: 16 }} />}>
+ Upload
+ </Button>
+ </Tooltip>
+ <Tooltip title={`Download as ${format.toUpperCase()}`}>
+ <Button size="small" variant="outlined" onClick={handleDownload} startIcon={<DownloadIcon sx={{ fontSize: 16 }} />}>
+ Download
+ </Button>
+ </Tooltip>
+
+ <Divider orientation="vertical" flexItem sx={{ mx: 0.5 }} />
+
+ <Tooltip title="Reset to current app state">
+ <span>
+ <Button
+ size="small"
+ variant="outlined"
+ onClick={handleReset}
+ disabled={!hasEdits}
+ startIcon={<RestoreIcon sx={{ fontSize: 16 }} />}
+ >
+ Reset
+ </Button>
+ </span>
+ </Tooltip>
+ <Tooltip title="Apply edits to app">
+ <span>
+ <Button
+ size="small"
+ variant="contained"
+ color="success"
+ onClick={handleApply}
+ disabled={!hasEdits}
+ startIcon={<CheckIcon sx={{ fontSize: 16 }} />}
+ >
+ Apply
+ </Button>
+ </span>
+ </Tooltip>
+ </Box>
+ </Box>
+
+ {/* Status bar */}
+ {hasEdits && (
+ <Alert severity="info" sx={{ py: 0, fontSize: '0.75rem' }}>
+ You have unsaved edits. Click <strong>Apply</strong> to push changes to the app, or <strong>Reset</strong> to discard.
+ </Alert>
+ )}
+ {error && (
+ <Alert severity="error" sx={{ py: 0, fontSize: '0.75rem' }}>
+ {error}
+ </Alert>
+ )}
+
+ {/* Monaco Editor */}
+ <Box
+ sx={{
+ flex: 1,
+ minHeight: 400,
+ border: `1px solid ${theme.palette.divider}`,
+ borderRadius: 1,
+ overflow: 'hidden',
+ }}
+ >
+ <Editor
+ height="100%"
+ language={FORMAT_MONACO_LANGUAGES[format]}
+ value={editorContent}
+ theme={isDark ? 'vs-dark' : 'light'}
+ onChange={handleEditorChange}
+ onMount={handleEditorMount}
+ loading={
+ <Box sx={{ display: 'flex', alignItems: 'center', justifyContent: 'center', height: '100%' }}>
+ <CircularProgress size={32} />
+ </Box>
+ }
+ options={{
+ minimap: { enabled: false },
+ fontSize: 13,
+ fontFamily: "'JetBrains Mono', 'Fira Code', 'Cascadia Code', Consolas, monospace",
+ lineNumbers: 'on',
+ scrollBeyondLastLine: false,
+ wordWrap: 'on',
+ tabSize: 2,
+ automaticLayout: true,
+ renderWhitespace: 'selection',
+ bracketPairColorization: { enabled: true },
+ folding: true,
+ formatOnPaste: true,
+ }}
+ />
+ </Box>
+
+ {/* Hidden file input for upload */}
+ <input
+ ref={fileInputRef}
+ type="file"
+ accept=".json,.yaml,.yml,.toml"
+ style={{ display: 'none' }}
+ onChange={handleFileSelected}
+ />
+
+ {/* Snackbar for feedback */}
+ <Snackbar
+ open={snackbar !== null}
+ autoHideDuration={3000}
+ onClose={() => setSnackbar(null)}
+ anchorOrigin={{ vertical: 'bottom', horizontal: 'center' }}
+ >
+ {snackbar ? (
+ <Alert
+ onClose={() => setSnackbar(null)}
+ severity={snackbar.severity}
+ variant="filled"
+ sx={{ width: '100%' }}
+ >
+ {snackbar.message}
+ </Alert>
+ ) : undefined}
+ </Snackbar>
+ </Box>
+ );
+};
diff --git a/freemocap-ui/src/components/ui-components/LeftSidePanelContent.tsx b/freemocap-ui/src/components/ui-components/SidePanelContent.tsx
similarity index 77%
rename from freemocap-ui/src/components/ui-components/LeftSidePanelContent.tsx
rename to freemocap-ui/src/components/ui-components/SidePanelContent.tsx
index 4ac6ad9e..f2eb7979 100644
--- a/freemocap-ui/src/components/ui-components/LeftSidePanelContent.tsx
+++ b/freemocap-ui/src/components/ui-components/SidePanelContent.tsx
@@ -1,6 +1,6 @@
-import React, { useCallback, useMemo, useState } from 'react';
+import React, {useCallback, useMemo, useState} from 'react';
import Box from '@mui/material/Box';
-import { IconButton, List, ListItem, Tooltip, useTheme } from '@mui/material';
+import {IconButton, List, ListItem, useTheme} from '@mui/material';
import {
closestCenter,
DndContext,
@@ -10,26 +10,21 @@ import {
useSensor,
useSensors,
} from '@dnd-kit/core';
-import {
- arrayMove,
- SortableContext,
- sortableKeyboardCoordinates,
- verticalListSortingStrategy,
-} from '@dnd-kit/sortable';
-import { restrictToVerticalAxis, restrictToParentElement } from '@dnd-kit/modifiers';
+import {arrayMove, SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy,} from '@dnd-kit/sortable';
+import {restrictToParentElement, restrictToVerticalAxis} from '@dnd-kit/modifiers';
import ThemeToggle from '@/components/ui-components/ThemeToggle';
import HomeIcon from '@mui/icons-material/Home';
-import { useLocation, useNavigate } from 'react-router-dom';
-import VideocamIcon from '@mui/icons-material/Videocam';
+import {useLocation, useNavigate} from 'react-router-dom';
import DirectionsRunIcon from '@mui/icons-material/DirectionsRun';
-import TuneIcon from '@mui/icons-material/Tune';
-import { VideoFolderPanel } from '@/components/video-folder-panel/VideoFolderPanel';
-import { SortableSectionWrapper } from '@/components/common/SortableSectionWrapper';
-import { ServerConnectionStatus } from '@/components/ServerConnectionStatus';
-import { ProcessingPipelinePanel } from '@/components/processing-pipeline-panel/ProcessingPipelinePanel';
-import { CameraConfigTreeView } from '@/components/camera-config-tree-view/CameraConfigTreeView';
-import { PostProcessingPanel } from '@/components/post-processing-panel/PostProcessingPanel';
-import {RecordingInfoPanel} from "@/components/recording-info-panel/RecordingInfoPanel";
+
+import {SortableSectionWrapper} from '@/components/common/SortableSectionWrapper';
+import {ServerConnectionStatus} from '@/components/ServerConnectionStatus';
+import {
+ CameraConfigTreeView
+} from '@/components/control-panels/camera-config-panel/camera-config-tree-view/CameraConfigTreeView';
+import {RecordingInfoPanel} from "@/components/control-panels/recording-info-panel/RecordingInfoPanel";
+import {PostProcessingPanel} from "@/components/control-panels/post-processing-panel/PostProcessingPanel";
+import {RealtimePipelinePanel} from "@/components/control-panels/realtime-panel/RealtimePipelinePanel";
const STORAGE_KEY = 'freemocap-sidebar-section-order';
@@ -37,7 +32,7 @@ const DEFAULT_SECTION_ORDER = [
'connection',
'cameras',
'recording',
- 'pipeline',
+ 'realtime',
'postprocessing',
] as const;
@@ -45,10 +40,10 @@ type SectionId = (typeof DEFAULT_SECTION_ORDER)[number];
const SECTION_COMPONENTS: Record<SectionId, React.FC> = {
connection: ServerConnectionStatus,
- pipeline: ProcessingPipelinePanel,
+ realtime: RealtimePipelinePanel,
cameras: CameraConfigTreeView,
recording: RecordingInfoPanel,
- postprocessing: PostProcessingPanel,
+ postprocessing: PostProcessingPanel
};
function loadSectionOrder(): SectionId[] {
@@ -107,7 +102,7 @@ const scrollbarStyles = {
: 'rgba(0, 0, 0, 0.2) transparent',
};
-export const LeftSidePanelContent = () => {
+export const SidePanelContent = () => {
const theme = useTheme();
const navigate = useNavigate();
const location = useLocation();
@@ -202,24 +197,24 @@ export const LeftSidePanelContent = () => {
</IconButton>
<IconButton
color="inherit"
- onClick={() => navigate('/viewport3d')}
+ onClick={() => navigate('/viewport')}
>
<DirectionsRunIcon />
</IconButton>
- <IconButton
- size="small"
- onClick={() => navigate('/cameras')}
- sx={{
- padding: '4px',
- color:
- location.pathname === '/cameras'
- ? theme.palette.success.main
- : theme.palette.text.secondary,
- }}
- >
- <VideocamIcon sx={{ fontSize: 18 }} />
- </IconButton>
+ {/*<IconButton*/}
+ {/* size="small"*/}
+ {/* onClick={() => navigate('/cameras')}*/}
+ {/* sx={{*/}
+ {/* padding: '4px',*/}
+ {/* color:*/}
+ {/* location.pathname === '/cameras'*/}
+ {/* ? theme.palette.success.main*/}
+ {/* : theme.palette.text.secondary,*/}
+ {/* }}*/}
+ {/*>*/}
+ {/* <VideocamIcon sx={{ fontSize: 18 }} />*/}
+ {/*</IconButton>*/}
{/*<Tooltip title="Settings">*/}
{/* <IconButton*/}
@@ -242,18 +237,6 @@ export const LeftSidePanelContent = () => {
</ListItem>
</List>
- {/* Video Panel for Videos Page */}
- {location.pathname === '/videos' && (
- <Box
- sx={{
- borderTop: '1px solid',
- borderColor: theme.palette.divider,
- }}
- >
- <VideoFolderPanel />
- </Box>
- )}
-
{/* Sidebar Sections β€” drag-reorderable */}
<DndContext
sensors={sensors}
diff --git a/freemocap-ui/src/components/ui-components/ThemeToggle.tsx b/freemocap-ui/src/components/ui-components/ThemeToggle.tsx
index e0b1f752..1405a07d 100644
--- a/freemocap-ui/src/components/ui-components/ThemeToggle.tsx
+++ b/freemocap-ui/src/components/ui-components/ThemeToggle.tsx
@@ -1,10 +1,10 @@
import React from 'react';
-import { IconButton, Tooltip, useTheme } from '@mui/material';
+import {IconButton, Tooltip, useTheme} from '@mui/material';
import Brightness4Icon from '@mui/icons-material/Brightness4'; // Dark mode icon
import Brightness7Icon from '@mui/icons-material/Brightness7'; // Light mode icon
-import { useAppDispatch, useAppSelector } from '@/store';
-import { themeModeToggled } from '@/store/slices/theme';
-import { useTranslation } from 'react-i18next';
+import {useAppDispatch, useAppSelector} from '@/store';
+import {themeModeToggled} from '@/store/slices/theme';
+import {useTranslation} from 'react-i18next';
export const ThemeToggle: React.FC = () => {
const dispatch = useAppDispatch();
diff --git a/freemocap-ui/src/components/ui-components/UpdateBanner.tsx b/freemocap-ui/src/components/ui-components/UpdateBanner.tsx
index 713dfba3..4959de01 100644
--- a/freemocap-ui/src/components/ui-components/UpdateBanner.tsx
+++ b/freemocap-ui/src/components/ui-components/UpdateBanner.tsx
@@ -1,7 +1,7 @@
import React from 'react';
-import { Alert, Box, Button, LinearProgress, Typography } from '@mui/material';
-import { useTranslation } from 'react-i18next';
-import { useAutoUpdate } from '@/hooks/useAutoUpdate';
+import {Alert, Box, Button, LinearProgress, Typography} from '@mui/material';
+import {useTranslation} from 'react-i18next';
+import {useAutoUpdate} from '@/hooks/useAutoUpdate';
export const UpdateBanner: React.FC = () => {
const { t } = useTranslation();
diff --git a/freemocap-ui/src/components/ui-components/VersionChip.tsx b/freemocap-ui/src/components/ui-components/VersionChip.tsx
index 76f39b76..39a9d90b 100644
--- a/freemocap-ui/src/components/ui-components/VersionChip.tsx
+++ b/freemocap-ui/src/components/ui-components/VersionChip.tsx
@@ -1,13 +1,13 @@
-import React, { useEffect, useRef, useState } from 'react';
-import { Alert, Box, Chip, CircularProgress, IconButton, Snackbar, Tooltip } from '@mui/material';
-import type { AlertColor } from '@mui/material';
+import React, {useEffect, useRef, useState} from 'react';
+import type {AlertColor} from '@mui/material';
+import {Alert, Box, Chip, CircularProgress, IconButton, Snackbar, Tooltip} from '@mui/material';
import OpenInNewIcon from '@mui/icons-material/OpenInNew';
import UpdateIcon from '@mui/icons-material/Update';
import CheckCircleIcon from '@mui/icons-material/CheckCircle';
-import { useTranslation } from 'react-i18next';
-import { useAppVersion } from '@/hooks/useAppVersion';
-import { useAutoUpdate } from '@/hooks/useAutoUpdate';
-import { EXTERNAL_URLS } from '@/constants/external-urls';
+import {useTranslation} from 'react-i18next';
+import {useAppVersion} from '@/hooks/useAppVersion';
+import {useAutoUpdate} from '@/hooks/useAutoUpdate';
+import {EXTERNAL_URLS} from '@/constants/external-urls';
interface VersionChipProps {
/** compact = small inline style for footers; full = larger for settings */
diff --git a/freemocap-ui/src/components/video-folder-panel/VideoFolderPanel.tsx b/freemocap-ui/src/components/video-folder-panel/VideoFolderPanel.tsx
deleted file mode 100644
index 7159f008..00000000
--- a/freemocap-ui/src/components/video-folder-panel/VideoFolderPanel.tsx
+++ /dev/null
@@ -1,304 +0,0 @@
-// freemocap-ui/src/components/video-folder-panel/VideoFolderPanel.tsx
-import React, {useState} from 'react';
-import {
- Accordion,
- AccordionDetails,
- AccordionSummary,
- alpha,
- Box,
- Button,
- Checkbox,
- FormControlLabel,
- IconButton,
- List,
- ListItem,
- ListItemButton,
- ListItemIcon,
- ListItemText,
- Paper,
- Stack,
- TextField,
- Tooltip,
- Typography,
- useTheme
-} from '@mui/material';
-import SettingsIcon from '@mui/icons-material/Settings';
-import VideoLibraryIcon from '@mui/icons-material/VideoLibrary';
-import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
-import FolderOpenIcon from '@mui/icons-material/FolderOpen';
-import PlayArrowIcon from '@mui/icons-material/PlayArrow';
-import VideoFileIcon from '@mui/icons-material/VideoFile';
-import {useAppDispatch, useAppSelector} from "@/store";
-// Updated imports - using the videos thunks and selectors from the store barrel export
-import {loadVideos, openVideoFile, selectVideoLoadFolder} from "@/store";
-import { useTranslation } from 'react-i18next';
-
-export const VideoFolderPanel: React.FC = () => {
- const theme = useTheme();
- const { t } = useTranslation();
- const dispatch = useAppDispatch();
-
- // Updated selectors to match the store structure
- const videoFolder = useAppSelector(state => state.videos.folder);
- const videoFiles = useAppSelector(state => state.videos.files);
- const isLoading = useAppSelector(state => state.videos.isLoading);
- const error = useAppSelector(state => state.videos.error);
-
- const [showSettings, setShowSettings] = useState(false);
- const [selectedVideos, setSelectedVideos] = useState<string[]>([]);
- const [filterText, setFilterText] = useState('');
-
- const handleSelectFolder = async () => {
- dispatch(selectVideoLoadFolder());
- setSelectedVideos([]);
- };
-
- const handleLoadVideos = () => {
- if (videoFiles.length === 0) return;
-
- const filesToLoad = selectedVideos.length > 0
- ? videoFiles.filter(file => selectedVideos.includes(file.path))
- : videoFiles;
- dispatch(loadVideos({folder: videoFolder, files: filesToLoad}));
- };
-
- const handleVideoSelect = (path: string) => {
- setSelectedVideos(prev => prev.includes(path) ? prev.filter(p => p !== path) : [...prev, path]);
- };
-
- const handleSelectAll = () => {
- setSelectedVideos(prev => prev.length === filteredVideos.length ? [] : filteredVideos.map(file => file.path));
- };
-
- const handleOpenVideo = (path: string) => {
- dispatch(openVideoFile(path));
- };
-
- const filteredVideos = videoFiles.filter(file =>
- file.name.toLowerCase().includes(filterText.toLowerCase())
- );
-
- return (
- <Accordion
- defaultExpanded
- sx={{
- borderRadius: 2,
- '&:before': {display: 'none'},
- boxShadow: theme.shadows[3]
- }}
- >
- <Box sx={{
- display: 'flex',
- alignItems: 'center',
- backgroundColor: theme.palette.primary.dark,
- borderTopLeftRadius: 8,
- borderTopRightRadius: 8,
- }}>
- <AccordionSummary
- expandIcon={<ExpandMoreIcon sx={{color: theme.palette.primary.contrastText}}/>}
- sx={{
- flex: 1,
- color: theme.palette.primary.contrastText,
- '&:hover': {
- backgroundColor: theme.palette.primary.light,
- }
- }}
- >
- <Stack direction="row" alignItems="center" spacing={1}>
- <VideoLibraryIcon/>
- <Typography variant="subtitle1" fontWeight="medium">
- Video Folder Selection
- </Typography>
- </Stack>
- </AccordionSummary>
-
- <Box sx={{pr: 2}}>
- <Button
- variant="contained"
- color="secondary"
- disabled={videoFiles.length === 0 || isLoading || (selectedVideos.length === 0 && videoFiles.length > 0)}
- onClick={handleLoadVideos}
- startIcon={<PlayArrowIcon/>}
- sx={{minWidth: '120px'}}
- >
- Load Videos
- </Button>
- </Box>
-
- <Box sx={{pr: 2}}>
- <IconButton
- onClick={() => setShowSettings(!showSettings)}
- sx={{
- color: showSettings
- ? theme.palette.primary.contrastText
- : alpha(theme.palette.primary.contrastText, 0.7)
- }}
- >
- <SettingsIcon/>
- </IconButton>
- </Box>
- </Box>
-
- <AccordionDetails sx={{p: 2, bgcolor: 'background.default'}}>
- <Paper
- elevation={0}
- sx={{
- bgcolor: 'background.paper',
- borderRadius: 2,
- overflow: 'hidden',
- p: 2
- }}
- >
- <Stack spacing={2}>
- <Box sx={{display: 'flex', alignItems: 'center', gap: 1}}>
- <TextField
- fullWidth
- label={t("videoFolderPath")}
- variant="outlined"
- value={videoFolder}
- InputProps={{
- readOnly: true,
- }}
- disabled={isLoading}
- />
- <Button
- variant="outlined"
- startIcon={<FolderOpenIcon/>}
- onClick={handleSelectFolder}
- disabled={isLoading}
- >
- Browse
- </Button>
- </Box>
-
- {error && (
- <Typography color="error" variant="body2">
- Error: {error}
- </Typography>
- )}
-
- {videoFiles.length > 0 && (
- <Box>
- <Box sx={{
- display: 'flex',
- justifyContent: 'space-between',
- alignItems: 'center',
- mb: 1
- }}>
- <Typography variant="subtitle2">
- Found {videoFiles.length} video files
- {filterText && ` (${filteredVideos.length} shown)`}:
- </Typography>
-
- <Box sx={{display: 'flex', alignItems: 'center', gap: 1}}>
- <TextField
- size="small"
- placeholder={t("filterVideos")}
- value={filterText}
- onChange={(e) => setFilterText(e.target.value)}
- sx={{width: '200px'}}
- />
- <FormControlLabel
- control={
- <Checkbox
- checked={selectedVideos.length === filteredVideos.length && filteredVideos.length > 0}
- indeterminate={selectedVideos.length > 0 && selectedVideos.length < filteredVideos.length}
- onChange={handleSelectAll}
- disabled={filteredVideos.length === 0}
- />
- }
- label={t("selectAll")}
- />
- </Box>
- </Box>
-
- <Paper
- variant="outlined"
- sx={{
- maxHeight: '200px',
- overflow: 'auto',
- p: 0,
- }}
- >
- <List dense disablePadding>
- {filteredVideos.map((file) => (
- <ListItem
- key={file.path}
- disablePadding
- secondaryAction={
- <Tooltip title={t("openVideo")}>
- <IconButton
- edge="end"
- size="small"
- onClick={() => handleOpenVideo(file.path)}
- >
- <PlayArrowIcon/>
- </IconButton>
- </Tooltip>
- }
- >
- <ListItemButton
- dense
- onClick={() => handleVideoSelect(file.path)}
- selected={selectedVideos.includes(file.path)}
- >
- <ListItemIcon sx={{minWidth: 36}}>
- <Checkbox
- edge="start"
- checked={selectedVideos.includes(file.path)}
- tabIndex={-1}
- disableRipple
- />
- </ListItemIcon>
- <ListItemIcon sx={{minWidth: 36}}>
- <VideoFileIcon fontSize="small"/>
- </ListItemIcon>
- <ListItemText
- primary={file.name}
- primaryTypographyProps={{
- variant: 'body2',
- sx: {fontFamily: 'monospace'}
- }}
- />
- </ListItemButton>
- </ListItem>
- ))}
- </List>
- </Paper>
- </Box>
- )}
-
- {showSettings && (
- <Paper
- variant="outlined"
- sx={{p: 2}}
- >
- <Typography variant="subtitle2" gutterBottom>
- Video Loading Settings
- </Typography>
- <Typography variant="body2" color="text.secondary" gutterBottom>
- Configure how videos are loaded and processed.
- </Typography>
-
- <Stack spacing={1} sx={{mt: 1}}>
- <FormControlLabel
- control={<Checkbox defaultChecked/>}
- label={t("automaticallySynchronizeVideos")}
- />
- <FormControlLabel
- control={<Checkbox/>}
- label={t("extractFramesOnLoad")}
- />
- <FormControlLabel
- control={<Checkbox/>}
- label={t("generateThumbnails")}
- />
- </Stack>
- </Paper>
- )}
- </Stack>
- </Paper>
- </AccordionDetails>
- </Accordion>
- );
-};
diff --git a/freemocap-ui/src/components/viewport3d/RigidBodyRenderer.tsx b/freemocap-ui/src/components/viewport3d/RigidBodyRenderer.tsx
index 44799d6d..d5f4a99f 100644
--- a/freemocap-ui/src/components/viewport3d/RigidBodyRenderer.tsx
+++ b/freemocap-ui/src/components/viewport3d/RigidBodyRenderer.tsx
@@ -1,17 +1,10 @@
-import { useEffect, useMemo, useRef } from "react";
-import {
- InstancedMesh,
- MeshStandardMaterial,
- CylinderGeometry,
- Object3D,
- Vector3,
- Color,
-} from "three";
-import { useFrame } from "@react-three/fiber";
-import { useServer } from "@/services";
-import { RigidBodyPose } from "@/components/viewport3d/viewport3d-types";
-import { Z_OFFSET } from "@/components/viewport3d/skeleton-config";
-import { SKELETON_COLORS } from "@/components/viewport3d/skeleton-colors";
+import {useEffect, useMemo, useRef} from "react";
+import {Color, CylinderGeometry, InstancedMesh, MeshStandardMaterial, Object3D, Vector3,} from "three";
+import {useFrame} from "@react-three/fiber";
+import {useServer} from "@/services";
+import {RigidBodyPose} from "@/components/viewport3d/viewport3d-types";
+import {Z_OFFSET} from "@/components/viewport3d/skeleton-config";
+import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
/** Maximum bone segments the instanced mesh can hold. */
const MAX_RIGID_BODIES = 64;
diff --git a/freemocap-ui/src/components/viewport3d/SceneEnvironment.tsx b/freemocap-ui/src/components/viewport3d/SceneEnvironment.tsx
index 7a234179..58fbb64c 100644
--- a/freemocap-ui/src/components/viewport3d/SceneEnvironment.tsx
+++ b/freemocap-ui/src/components/viewport3d/SceneEnvironment.tsx
@@ -1,4 +1,4 @@
-import { Grid } from "@react-three/drei";
+import {Grid} from "@react-three/drei";
/** Static scene environment: lighting, ground grid, and axes indicator. */
export function SceneEnvironment() {
diff --git a/freemocap-ui/src/components/viewport3d/SkeletonRenderer.tsx b/freemocap-ui/src/components/viewport3d/SkeletonRenderer.tsx
index 58c6c611..59257a26 100644
--- a/freemocap-ui/src/components/viewport3d/SkeletonRenderer.tsx
+++ b/freemocap-ui/src/components/viewport3d/SkeletonRenderer.tsx
@@ -1,27 +1,27 @@
-import { useEffect, useMemo, useRef } from "react";
+import {useEffect, useMemo, useRef} from "react";
import {
+ BufferAttribute,
+ BufferGeometry,
InstancedMesh,
+ LineBasicMaterial,
+ LineSegments,
MeshStandardMaterial,
- SphereGeometry,
Object3D,
+ SphereGeometry,
Vector3,
- BufferGeometry,
- BufferAttribute,
- LineBasicMaterial,
- LineSegments,
} from "three";
-import { useFrame } from "@react-three/fiber";
-import { useServer } from "@/services";
-import { Point3d, PointStyle } from "@/components/viewport3d/viewport3d-types";
+import {useFrame} from "@react-three/fiber";
+import {useServer} from "@/services";
+import {Point3d, PointStyle} from "@/components/viewport3d/viewport3d-types";
import {
+ getPointStyle,
MAX_POINTS,
MAX_SEGMENTS,
- Z_OFFSET,
- SEGMENT_DEFINITIONS,
SEGMENT_COLORS,
- getPointStyle,
+ SEGMENT_DEFINITIONS,
+ Z_OFFSET,
} from "@/components/viewport3d/skeleton-config";
-import { resolvePoint } from "@/components/viewport3d/virtual-points";
+import {resolvePoint} from "@/components/viewport3d/virtual-points";
import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
const DUMMY = new Object3D();
diff --git a/freemocap-ui/src/components/viewport3d/ThreeJsCanvas.tsx b/freemocap-ui/src/components/viewport3d/ThreeJsCanvas.tsx
index 11b46356..e0c8ca56 100644
--- a/freemocap-ui/src/components/viewport3d/ThreeJsCanvas.tsx
+++ b/freemocap-ui/src/components/viewport3d/ThreeJsCanvas.tsx
@@ -1,12 +1,12 @@
-import { useCallback, useEffect, useRef } from "react";
-import { Canvas } from "@react-three/fiber";
-import { Box, IconButton, Tooltip, Typography } from "@mui/material";
+import {useCallback, useEffect, useRef} from "react";
+import {Canvas} from "@react-three/fiber";
+import {Box, IconButton, Tooltip, Typography} from "@mui/material";
import CenterFocusStrongIcon from "@mui/icons-material/CenterFocusStrong";
import HomeIcon from "@mui/icons-material/Home";
import type CameraControlsImpl from "camera-controls";
-import { ThreeJsScene } from "@/components/viewport3d/ThreeJsScene";
-import { fitCameraToSkeleton } from "@/components/viewport3d/fit-camera";
-import { useServer } from "@/services";
+import {ThreeJsScene} from "@/components/viewport3d/ThreeJsScene";
+import {fitCameraToSkeleton} from "@/components/viewport3d/fit-camera";
+import {useServer} from "@/services";
export function ThreeJsCanvas() {
const cameraControlsRef = useRef<CameraControlsImpl>(null!);
diff --git a/freemocap-ui/src/components/viewport3d/ThreeJsScene.tsx b/freemocap-ui/src/components/viewport3d/ThreeJsScene.tsx
index 3f9f79d6..73c45519 100644
--- a/freemocap-ui/src/components/viewport3d/ThreeJsScene.tsx
+++ b/freemocap-ui/src/components/viewport3d/ThreeJsScene.tsx
@@ -1,9 +1,9 @@
-import { RefObject } from "react";
-import { CameraControls } from "@react-three/drei";
+import {RefObject} from "react";
+import {CameraControls} from "@react-three/drei";
import type CameraControlsImpl from "camera-controls";
-import { SceneEnvironment } from "@/components/viewport3d/SceneEnvironment";
-import { SkeletonRenderer } from "@/components/viewport3d/SkeletonRenderer";
-import { RigidBodyRenderer } from "@/components/viewport3d/RigidBodyRenderer";
+import {SceneEnvironment} from "@/components/viewport3d/SceneEnvironment";
+import {SkeletonRenderer} from "@/components/viewport3d/SkeletonRenderer";
+import {RigidBodyRenderer} from "@/components/viewport3d/RigidBodyRenderer";
interface ThreeJsSceneProps {
cameraControlsRef: RefObject<CameraControlsImpl>;
diff --git a/freemocap-ui/src/components/viewport3d/VMCPanel.tsx b/freemocap-ui/src/components/viewport3d/VMCPanel.tsx
deleted file mode 100644
index 7c1c07fb..00000000
--- a/freemocap-ui/src/components/viewport3d/VMCPanel.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import React, { useCallback } from "react";
-import {
- Box,
- IconButton,
- Stack,
- Switch,
- TextField,
- Tooltip,
- Typography,
- useTheme,
-} from "@mui/material";
-import CastConnectedIcon from "@mui/icons-material/CastConnected";
-import { useAppSelector } from "@/store/hooks";
-import { selectServerSettings } from "@/store/slices/settings/settings-selectors";
-import { useServer } from "@/services";
-
-/**
- * Compact VMC output controls. Shows a toggle to enable/disable VMC
- * broadcasting and a port field. Patches are sent directly via the
- * WebSocket settings/patch protocol.
- */
-export const VMCPanel: React.FC = () => {
- const theme = useTheme();
- const { send, isConnected } = useServer();
- const settings = useAppSelector(selectServerSettings);
-
- const vmcEnabled = settings?.vmc?.enabled ?? false;
- const vmcHost = settings?.vmc?.host ?? "127.0.0.1";
- const vmcPort = settings?.vmc?.port ?? 39539;
-
- const patchVMC = useCallback(
- (patch: Record<string, unknown>) => {
- send({ message_type: "settings/patch", patch: { vmc: patch } });
- },
- [send],
- );
-
- const handleToggle = useCallback(() => {
- patchVMC({ enabled: !vmcEnabled });
- }, [patchVMC, vmcEnabled]);
-
- const handlePortChange = useCallback(
- (e: React.ChangeEvent<HTMLInputElement>) => {
- const val = parseInt(e.target.value, 10);
- if (!isNaN(val) && val > 0 && val <= 65535) {
- patchVMC({ port: val });
- }
- },
- [patchVMC],
- );
-
- const handleHostChange = useCallback(
- (e: React.ChangeEvent<HTMLInputElement>) => {
- const val = e.target.value.trim();
- if (val.length > 0) {
- patchVMC({ host: val });
- }
- },
- [patchVMC],
- );
-
- return (
- <Box
- sx={{
- position: "absolute",
- bottom: 16,
- right: 16,
- zIndex: 10,
- backgroundColor: theme.palette.background.paper,
- borderRadius: 2,
- px: 2,
- py: 1.5,
- boxShadow: 3,
- minWidth: 220,
- opacity: 0.92,
- }}
- >
- <Stack spacing={1}>
- <Stack direction="row" alignItems="center" spacing={1}>
- <CastConnectedIcon
- fontSize="small"
- sx={{ color: vmcEnabled ? theme.palette.success.main : theme.palette.text.disabled }}
- />
- <Typography variant="subtitle2" sx={{ flexGrow: 1, fontWeight: 600 }}>
- VMC Output
- </Typography>
- <Tooltip title={vmcEnabled ? "Disable VMC streaming" : "Enable VMC streaming"} arrow>
- <Switch
- size="small"
- checked={vmcEnabled}
- onChange={handleToggle}
- disabled={!isConnected}
- />
- </Tooltip>
- </Stack>
-
- {vmcEnabled && (
- <Stack direction="row" spacing={1}>
- <Tooltip title="Target host (IP address)" arrow placement="bottom">
- <TextField
- label="Host"
- size="small"
- value={vmcHost}
- onChange={handleHostChange}
- disabled={!isConnected}
- sx={{ flex: 2 }}
- inputProps={{ style: { fontSize: 12 } }}
- InputLabelProps={{ style: { fontSize: 12 } }}
- />
- </Tooltip>
- <Tooltip title="UDP port (default 39539)" arrow placement="bottom">
- <TextField
- label="Port"
- size="small"
- type="number"
- value={vmcPort}
- onChange={handlePortChange}
- disabled={!isConnected}
- sx={{ flex: 1 }}
- inputProps={{ min: 1, max: 65535, style: { fontSize: 12 } }}
- InputLabelProps={{ style: { fontSize: 12 } }}
- />
- </Tooltip>
- </Stack>
- )}
- </Stack>
- </Box>
- );
-};
diff --git a/freemocap-ui/src/components/viewport3d/face-contours.ts b/freemocap-ui/src/components/viewport3d/face-contours.ts
index abb43873..7c131301 100644
--- a/freemocap-ui/src/components/viewport3d/face-contours.ts
+++ b/freemocap-ui/src/components/viewport3d/face-contours.ts
@@ -1,4 +1,4 @@
-import { Color } from "three";
+import {Color} from "three";
import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
/**
diff --git a/freemocap-ui/src/components/viewport3d/fit-camera.ts b/freemocap-ui/src/components/viewport3d/fit-camera.ts
index 9d6e4fa3..880e69fb 100644
--- a/freemocap-ui/src/components/viewport3d/fit-camera.ts
+++ b/freemocap-ui/src/components/viewport3d/fit-camera.ts
@@ -1,7 +1,7 @@
-import { Box3, Vector3 } from "three";
+import {Box3, Vector3} from "three";
import type CameraControlsImpl from "camera-controls";
-import { Z_OFFSET } from "@/components/viewport3d/skeleton-config";
-import { Point3d } from "./viewport3d-types";
+import {Z_OFFSET} from "@/components/viewport3d/skeleton-config";
+import {Point3d} from "./viewport3d-types";
const PADDING = 0.5;
diff --git a/freemocap-ui/src/components/viewport3d/skeleton-colors.ts b/freemocap-ui/src/components/viewport3d/skeleton-colors.ts
index 06c29589..a2e5cf2e 100644
--- a/freemocap-ui/src/components/viewport3d/skeleton-colors.ts
+++ b/freemocap-ui/src/components/viewport3d/skeleton-colors.ts
@@ -1,4 +1,4 @@
-import { Color } from "three";
+import {Color} from "three";
export const SKELETON_COLORS = {
left: new Color('#4488FF'),
diff --git a/freemocap-ui/src/components/viewport3d/skeleton-config.ts b/freemocap-ui/src/components/viewport3d/skeleton-config.ts
index d69fb3f3..256e688f 100644
--- a/freemocap-ui/src/components/viewport3d/skeleton-config.ts
+++ b/freemocap-ui/src/components/viewport3d/skeleton-config.ts
@@ -1,6 +1,6 @@
-import { Color } from "three";
-import { PointStyle } from "@/components/viewport3d/viewport3d-types";
-import { buildFaceContourSegments, buildFaceContourColors } from "@/components/viewport3d/face-contours";
+import {Color} from "three";
+import {PointStyle} from "@/components/viewport3d/viewport3d-types";
+import {buildFaceContourColors, buildFaceContourSegments} from "@/components/viewport3d/face-contours";
import {SKELETON_COLORS} from "@/components/viewport3d/skeleton-colors";
// Maximum tracked points the instanced mesh can hold
@@ -165,4 +165,4 @@ export const SEGMENT_DEFINITIONS: Record<string, { proximal: string; distal: str
export const MAX_SEGMENTS = Object.keys(SEGMENT_DEFINITIONS).length;
// Colors in matching order: body+hand first, then face contours
-export const SEGMENT_COLORS: Color[] = [...BODY_HAND_COLORS, ...FACE_COLORS];
\ No newline at end of file
+export const SEGMENT_COLORS: Color[] = [...BODY_HAND_COLORS, ...FACE_COLORS];
diff --git a/freemocap-ui/src/components/viewport3d/viewport3d-types.ts b/freemocap-ui/src/components/viewport3d/viewport3d-types.ts
index 39252285..58923bbf 100644
--- a/freemocap-ui/src/components/viewport3d/viewport3d-types.ts
+++ b/freemocap-ui/src/components/viewport3d/viewport3d-types.ts
@@ -1,4 +1,4 @@
-import { Color } from "three";
+import {Color} from "three";
/** 3D point with x, y, z coordinates */
export interface Point3d {
diff --git a/freemocap-ui/src/components/viewport3d/virtual-points.ts b/freemocap-ui/src/components/viewport3d/virtual-points.ts
index 424cfb40..1daf859f 100644
--- a/freemocap-ui/src/components/viewport3d/virtual-points.ts
+++ b/freemocap-ui/src/components/viewport3d/virtual-points.ts
@@ -1,4 +1,4 @@
-import { Point3d } from "@/components/viewport3d/viewport3d-types";
+import {Point3d} from "@/components/viewport3d/viewport3d-types";
/**
* Resolve a point name to a 3D position. Handles both raw landmark names
diff --git a/freemocap-ui/src/hooks/AutoUpdateContext.tsx b/freemocap-ui/src/hooks/AutoUpdateContext.tsx
index 3d2f8fea..42bc8fad 100644
--- a/freemocap-ui/src/hooks/AutoUpdateContext.tsx
+++ b/freemocap-ui/src/hooks/AutoUpdateContext.tsx
@@ -1,5 +1,5 @@
-import React, { createContext, useCallback, useEffect, useState } from 'react';
-import { useElectronIPC } from '@/services';
+import React, {createContext, useCallback, useEffect, useState} from 'react';
+import {useElectronIPC} from '@/services';
export type UpdateStatus =
| 'idle'
diff --git a/freemocap-ui/src/hooks/useAppVersion.ts b/freemocap-ui/src/hooks/useAppVersion.ts
index b169911e..52cfef2d 100644
--- a/freemocap-ui/src/hooks/useAppVersion.ts
+++ b/freemocap-ui/src/hooks/useAppVersion.ts
@@ -1,5 +1,5 @@
-import { useEffect, useState } from 'react';
-import { useElectronIPC } from '@/services';
+import {useEffect, useState} from 'react';
+import {useElectronIPC} from '@/services';
export function useAppVersion(): string | null {
const [version, setVersion] = useState<string | null>(null);
diff --git a/freemocap-ui/src/hooks/useAutoUpdate.ts b/freemocap-ui/src/hooks/useAutoUpdate.ts
index b67ee065..f5003c38 100644
--- a/freemocap-ui/src/hooks/useAutoUpdate.ts
+++ b/freemocap-ui/src/hooks/useAutoUpdate.ts
@@ -1,5 +1,5 @@
-import { useContext } from 'react';
-import { AutoUpdateContext } from './AutoUpdateContext';
+import {useContext} from 'react';
+import {AutoUpdateContext} from './AutoUpdateContext';
export function useAutoUpdate() {
const ctx = useContext(AutoUpdateContext);
diff --git a/freemocap-ui/src/hooks/useKeyboardShortcuts.ts b/freemocap-ui/src/hooks/useKeyboardShortcuts.ts
index add08a3c..c3bcb9dd 100644
--- a/freemocap-ui/src/hooks/useKeyboardShortcuts.ts
+++ b/freemocap-ui/src/hooks/useKeyboardShortcuts.ts
@@ -1,8 +1,8 @@
// src/hooks/useKeyboardShortcuts.ts
-import { useEffect } from "react";
-import { useAppDispatch } from "@/store";
+import {useEffect} from "react";
+import {useAppDispatch} from "@/store";
// import { localeToggled } from "@/store/slices/settings";
-import { pauseUnpauseCameras } from "@/store/slices/cameras";
+import {pauseUnpauseCameras} from "@/store/slices/cameras";
/**
* Registers global keyboard shortcuts that should be active app-wide.
diff --git a/freemocap-ui/src/hooks/useMenuActions.ts b/freemocap-ui/src/hooks/useMenuActions.ts
index c4acf272..904d3e7e 100644
--- a/freemocap-ui/src/hooks/useMenuActions.ts
+++ b/freemocap-ui/src/hooks/useMenuActions.ts
@@ -1,18 +1,16 @@
// src/hooks/useMenuActions.ts
-import { useEffect } from 'react';
-import { useNavigate } from 'react-router-dom';
-import { useTranslation } from 'react-i18next';
-import { useAppDispatch, useAppSelector } from '@/store';
-import { themeModeToggled } from '@/store/slices/theme';
-import { detectCameras, camerasConnectOrUpdate, closeCameras, pauseUnpauseCameras } from '@/store/slices/cameras';
-import { stopRecording } from '@/store/slices/recording';
-import { selectVideoLoadFolder } from '@/store/slices/videos';
+import {useEffect} from 'react';
+import {useNavigate} from 'react-router-dom';
+import {useTranslation} from 'react-i18next';
+import {useAppDispatch, useAppSelector} from '@/store';
+import {themeModeToggled} from '@/store/slices/theme';
+import {camerasConnectOrUpdate, closeCameras, detectCameras, pauseUnpauseCameras} from '@/store/slices/cameras';
+import {stopRecording} from '@/store/slices/recording';
+import {selectVideoLoadFolder} from '@/store/slices/videos';
// import { localeChanged, selectLocale, localeToggled } from '@/store/slices/settings';
-import { isElectron } from '@/services/electron-ipc/electron-ipc';
-import { SUPPORTED_LOCALES } from '@/i18n';
-
-import type { SupportedLocale } from '@/i18n';
-import type { MenuAction } from '../../electron/main/services/menu-builder';
+import {isElectron} from '@/services/electron-ipc/electron-ipc';
+import {SUPPORTED_LOCALES} from '@/i18n';
+import type {MenuAction} from '../../electron/main/services/menu-builder';
// i18n keys that the menu builder needs for translated labels
const MENU_LABEL_KEYS = [
diff --git a/freemocap-ui/src/hooks/useMocap.ts b/freemocap-ui/src/hooks/useMocap.ts
index 2bc94723..06c18658 100644
--- a/freemocap-ui/src/hooks/useMocap.ts
+++ b/freemocap-ui/src/hooks/useMocap.ts
@@ -2,30 +2,30 @@ import {useCallback} from 'react';
import {useAppDispatch, useAppSelector} from '@/store/hooks';
import {useElectronIPC} from '@/services';
import {
+ calibrationTomlPathChanged,
+ calibrationTomlPathCleared,
+ manualMocapRecordingPathChanged,
+ manualMocapRecordingPathCleared,
MediapipeDetectorConfig,
- RealtimeFilterConfig,
mocapDetectorConfigReplaced,
mocapDetectorConfigUpdated,
- skeletonFilterConfigReplaced,
- skeletonFilterConfigUpdated,
mocapDirectoryInfoUpdated,
mocapErrorCleared,
- manualMocapRecordingPathChanged,
- manualMocapRecordingPathCleared,
- calibrationTomlPathChanged,
- calibrationTomlPathCleared,
+ processMocapRecording,
+ RealtimeFilterConfig,
+ selectCalibrationTomlPath,
+ selectCanProcessMocapRecording,
+ selectCanStartMocapRecording,
+ selectIsUsingManualMocapPath,
selectMocap,
selectMocapDetectorConfig,
- selectSkeletonFilterConfig,
selectMocapDirectoryInfo,
selectMocapRecordingPath,
- selectCanProcessMocapRecording,
- selectCanStartMocapRecording,
- selectIsUsingManualMocapPath,
- selectCalibrationTomlPath,
+ selectSkeletonFilterConfig,
+ skeletonFilterConfigReplaced,
+ skeletonFilterConfigUpdated,
startMocapRecording,
stopMocapRecording,
- processMocapRecording,
updateMocapConfigOnServer,
} from "@/store/slices/mocap";
diff --git a/freemocap-ui/src/i18n/i18n.ts b/freemocap-ui/src/i18n/i18n.ts
index fb47193a..2cd06a51 100644
--- a/freemocap-ui/src/i18n/i18n.ts
+++ b/freemocap-ui/src/i18n/i18n.ts
@@ -1,5 +1,5 @@
import i18n from "i18next";
-import { initReactI18next } from "react-i18next";
+import {initReactI18next} from "react-i18next";
import LanguageDetector from "i18next-browser-languagedetector";
// Only eagerly load the fallback locale β€” all others are lazy-loaded on demand
diff --git a/freemocap-ui/src/layout/BaseContentRouter.tsx b/freemocap-ui/src/layout/BaseContentRouter.tsx
index 16bc5d89..e8b46d5d 100644
--- a/freemocap-ui/src/layout/BaseContentRouter.tsx
+++ b/freemocap-ui/src/layout/BaseContentRouter.tsx
@@ -1,18 +1,15 @@
import React from 'react';
import {Navigate, Route, Routes} from 'react-router-dom';
-import {CamerasPage} from "@/pages/CamerasPage";
+import {ViewportPage} from "@/pages/ViewportPage";
import PlaybackPage from "@/pages/PlaybackPage";
import WelcomePage from "@/pages/WelcomePage";
-// import { SettingsPage } from "@/pages/SettingsPage";
-import {Viewport3dPage} from "@/pages/Viewport3dPage";
export const BaseContentRouter: React.FC = () => {
return (
<Routes>
<Route path="/" element={<WelcomePage />} />
- <Route path="/cameras" element={<CamerasPage/>}/>
<Route path="/playback" element={<PlaybackPage/>}/>
- <Route path="/viewport3d" element={<Viewport3dPage />} />
+ <Route path="/viewport" element={<ViewportPage />} />
{/*<Route path="/settings" element={<SettingsPage/>}/>*/}
<Route path="*" element={<Navigate to="/" replace/>}/>
</Routes>
diff --git a/freemocap-ui/src/layout/BasePanelLayout.tsx b/freemocap-ui/src/layout/BasePanelLayout.tsx
index 6e2a18e2..982c571d 100644
--- a/freemocap-ui/src/layout/BasePanelLayout.tsx
+++ b/freemocap-ui/src/layout/BasePanelLayout.tsx
@@ -1,7 +1,7 @@
// freemocap-ui/src/layout/BasePanelLayout.tsx
import React, {useCallback, useRef, useState} from "react";
import {ImperativePanelHandle, Panel, PanelGroup, PanelResizeHandle} from "react-resizable-panels";
-import {LeftSidePanelContent} from "@/components/ui-components/LeftSidePanelContent";
+import {SidePanelContent} from "@/components/ui-components/SidePanelContent";
import BottomPanelContent from "@/components/ui-components/BottomPanelContent";
import {useTheme} from "@mui/material/styles";
import {Box} from "@mui/material";
@@ -56,7 +56,7 @@ export const BasePanelLayout = ({children}: { children: React.ReactNode }) => {
onCollapse={handlePanelCollapse}
onExpand={handlePanelExpand}
>
- <LeftSidePanelContent
+ <SidePanelContent
// isCollapsed={isCollapsed}
// onToggleCollapse={handleToggleCollapse}
/>
diff --git a/freemocap-ui/src/pages/PlaybackPage.tsx b/freemocap-ui/src/pages/PlaybackPage.tsx
index 91aec17e..98f221df 100644
--- a/freemocap-ui/src/pages/PlaybackPage.tsx
+++ b/freemocap-ui/src/pages/PlaybackPage.tsx
@@ -1,19 +1,21 @@
-import React, { useCallback, useEffect, useState } from 'react';
-import { Box, Chip, IconButton, Tooltip, Typography, useTheme } from '@mui/material';
+import React, {useCallback, useEffect, useState} from 'react';
+import {Box, Chip, IconButton, Tooltip, Typography, useTheme} from '@mui/material';
import ArrowBackIcon from '@mui/icons-material/ArrowBack';
import VideocamIcon from '@mui/icons-material/Videocam';
import StorageIcon from '@mui/icons-material/Storage';
import FolderOpenIcon from '@mui/icons-material/FolderOpen';
-import { Footer } from '@/components/ui-components/Footer';
+import {Footer} from '@/components/ui-components/Footer';
import ErrorBoundary from '@/components/common/ErrorBoundary';
-import { RecordingBrowser, LoadedVideo } from '@/components/playback/RecordingBrowser';
-import { SyncedVideoPlayer } from '@/components/playback/SyncedVideoPlayer';
-import { CamerasViewSettingsOverlay } from '@/components/camera-view-settings-overlay/CamerasViewSettingsOverlay';
-import { useElectronIPC } from '@/services';
-import { serverUrls } from '@/services/server/server-helpers/server-urls';
-import { useTranslation } from 'react-i18next';
-import { useLocation } from 'react-router-dom';
-import type { CameraSettings } from '@/pages/CamerasPage';
+import {LoadedVideo, RecordingBrowser} from '@/components/playback/RecordingBrowser';
+import {SyncedVideoPlayer} from '@/components/playback/SyncedVideoPlayer';
+import {useElectronIPC} from '@/services';
+import {serverUrls} from '@/services/server/server-helpers/server-urls';
+import {useTranslation} from 'react-i18next';
+import {useLocation} from 'react-router-dom';
+import type {CameraSettings} from '@/pages/ViewportPage';
+import {
+ CamerasViewSettingsOverlay
+} from "@/components/camera-views/camera-view-settings-overlay/CamerasViewSettingsOverlay";
// Module-level cache so playback state survives tab switches
let cachedPlaybackState: {
diff --git a/freemocap-ui/src/pages/Viewport3dPage.tsx b/freemocap-ui/src/pages/Viewport3dPage.tsx
deleted file mode 100644
index 860dd0a0..00000000
--- a/freemocap-ui/src/pages/Viewport3dPage.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import {Box} from "@mui/material";
-import React from "react";
-import {ThreeJsCanvas} from "@/components/viewport3d/ThreeJsCanvas";
-
-export const Viewport3dPage = () => {
- return (
- <Box sx={{width: '100%',
- height: '100%',
- }}>
- <ThreeJsCanvas/>
- </Box>
- );
-}
diff --git a/freemocap-ui/src/pages/CamerasPage.tsx b/freemocap-ui/src/pages/ViewportPage.tsx
similarity index 94%
rename from freemocap-ui/src/pages/CamerasPage.tsx
rename to freemocap-ui/src/pages/ViewportPage.tsx
index 12b68723..1b943e14 100644
--- a/freemocap-ui/src/pages/CamerasPage.tsx
+++ b/freemocap-ui/src/pages/ViewportPage.tsx
@@ -1,12 +1,14 @@
-import React, {useState, useCallback} from 'react';
+import React, {useCallback, useState} from 'react';
import Box from "@mui/material/Box";
import ErrorBoundary from "@/components/common/ErrorBoundary";
import {Footer} from "@/components/ui-components/Footer";
import {useTheme} from "@mui/material/styles";
import {CameraViewsGrid} from "@/components/camera-views/CameraViewsGrid";
-import {CamerasViewSettingsOverlay} from "@/components/camera-view-settings-overlay/CamerasViewSettingsOverlay";
import {Panel, PanelGroup, PanelResizeHandle} from "react-resizable-panels";
import {ThreeJsCanvas} from "@/components/viewport3d/ThreeJsCanvas";
+import {
+ CamerasViewSettingsOverlay
+} from "@/components/camera-views/camera-view-settings-overlay/CamerasViewSettingsOverlay";
export type LayoutDirection = 'vertical' | 'horizontal';
@@ -16,7 +18,7 @@ export interface CameraSettings {
layoutDirection: LayoutDirection;
}
-export const CamerasPage = () => {
+export const ViewportPage = () => {
const theme = useTheme();
const [resetKey, setResetKey] = useState<number>(0);
const [settings, setSettings] = useState<CameraSettings>({
@@ -64,7 +66,7 @@ export const CamerasPage = () => {
direction={settings.layoutDirection}
>
{/* Camera Grid View Panel */}
- <Panel defaultSize={75} minSize={20}>
+ <Panel defaultSize={60} minSize={20}>
<Box sx={{height: '100%', overflow: 'auto'}}>
<ErrorBoundary>
<CameraViewsGrid manualColumns={settings.columns} resetKey={resetKey}/>
@@ -112,7 +114,7 @@ export const CamerasPage = () => {
</PanelResizeHandle>
{/* 3D View Panel */}
- <Panel defaultSize={25} minSize={10}>
+ <Panel defaultSize={40} minSize={10}>
<Box sx={{height: '100%'}}>
<ThreeJsCanvas/>
</Box>
diff --git a/freemocap-ui/src/pages/WelcomePage.tsx b/freemocap-ui/src/pages/WelcomePage.tsx
index 0e25aa3d..f65b3d70 100644
--- a/freemocap-ui/src/pages/WelcomePage.tsx
+++ b/freemocap-ui/src/pages/WelcomePage.tsx
@@ -1,7 +1,19 @@
-import React, {useEffect, useState, useRef, useCallback} from 'react';
+import React, {useCallback, useEffect, useRef, useState} from 'react';
import {
- Box, Button, Checkbox, CircularProgress, Container,
- darken, Divider, Fade, FormControlLabel, Grow, Paper, Stack, Typography, Link as MuiLink
+ Box,
+ Button,
+ Checkbox,
+ CircularProgress,
+ Container,
+ darken,
+ Divider,
+ Fade,
+ FormControlLabel,
+ Grow,
+ Link as MuiLink,
+ Paper,
+ Stack,
+ Typography
} from '@mui/material';
import {useNavigate} from 'react-router-dom';
import {useTheme} from '@mui/material/styles';
diff --git a/freemocap-ui/src/services/electron-ipc/electron-ipc-client.ts b/freemocap-ui/src/services/electron-ipc/electron-ipc-client.ts
index 3db9eb23..250fc9fe 100644
--- a/freemocap-ui/src/services/electron-ipc/electron-ipc-client.ts
+++ b/freemocap-ui/src/services/electron-ipc/electron-ipc-client.ts
@@ -1,7 +1,7 @@
// src/hooks/electron-service/electron-ipc-client.ts
-import { createTRPCProxyClient } from '@trpc/client';
+import {createTRPCProxyClient} from '@trpc/client';
import superjson from 'superjson';
-import type { AppAPI } from '../../../electron/main/api';
+import type {AppAPI} from '../../../electron/main/api';
// Type for the electron API exposed via preload
interface ElectronAPI {
@@ -102,4 +102,3 @@ const createElectronLink = () => {
export const electronIpcClient = createTRPCProxyClient<AppAPI>({
links: [createElectronLink()],
});
-
diff --git a/freemocap-ui/src/services/electron-ipc/electron-ipc.ts b/freemocap-ui/src/services/electron-ipc/electron-ipc.ts
index fe9f74b8..002d0a4a 100644
--- a/freemocap-ui/src/services/electron-ipc/electron-ipc.ts
+++ b/freemocap-ui/src/services/electron-ipc/electron-ipc.ts
@@ -1,6 +1,7 @@
-
// Check if running in Electron
import {electronIpcClient} from "@/services/electron-ipc/electron-ipc-client";
+// Type-safe wrapper hook for React components
+import {useMemo} from 'react';
export const isElectron = (): boolean => {
return typeof window !== 'undefined' && !!window.electronAPI;
@@ -9,9 +10,6 @@ export const isElectron = (): boolean => {
// Export the API client or null if not in Electron
export const electronIpc = isElectron() ? electronIpcClient : null;
-// Type-safe wrapper hook for React components
-import { useMemo } from 'react';
-
export function useElectronIPC() {
const api = useMemo(() => {
if (!isElectron()) return null;
diff --git a/freemocap-ui/src/services/server/ServerContextProvider.tsx b/freemocap-ui/src/services/server/ServerContextProvider.tsx
index c4597b7d..015fa206 100644
--- a/freemocap-ui/src/services/server/ServerContextProvider.tsx
+++ b/freemocap-ui/src/services/server/ServerContextProvider.tsx
@@ -1,16 +1,16 @@
// ServerContextProvider.tsx
-import React, { createContext, ReactNode, useContext, useEffect, useRef, useState, useCallback, useMemo } from 'react';
+import React, {createContext, ReactNode, useCallback, useContext, useEffect, useMemo, useRef, useState} from 'react';
-import { ConnectionState, WebSocketConnection } from "@/services/server/server-helpers/websocket-connection";
-import { FrameProcessor } from "@/services/server/server-helpers/frame-processor/frame-processor";
-import { CanvasManager } from "@/services/server/server-helpers/canvas-manager";
-import { serverUrls } from "@/services";
+import {ConnectionState, WebSocketConnection} from "@/services/server/server-helpers/websocket-connection";
+import {FrameProcessor} from "@/services/server/server-helpers/frame-processor/frame-processor";
+import {CanvasManager} from "@/services/server/server-helpers/canvas-manager";
+import {serverUrls} from "@/services";
import {DetailedFramerate, FramerateStore} from "@/services/server/server-helpers/framerate-store";
-import {LogStore, LogRecord} from "@/services/server/server-helpers/log-store";
-import { Point3d, RigidBodyPose } from "@/components/viewport3d/viewport3d-types";
-import { OverlayManager } from "@/services/server/server-helpers/image-overlay/overlay-renderer-factory";
-import { CharucoObservation } from "@/services/server/server-helpers/image-overlay/charuco-types";
-import { MediapipeObservation } from "@/services/server/server-helpers/image-overlay/mediapipe-types";
+import {LogRecord, LogStore} from "@/services/server/server-helpers/log-store";
+import {Point3d, RigidBodyPose} from "@/components/viewport3d/viewport3d-types";
+import {OverlayManager} from "@/services/server/server-helpers/image-overlay/overlay-renderer-factory";
+import {CharucoObservation} from "@/services/server/server-helpers/image-overlay/charuco-types";
+import {MediapipeObservation} from "@/services/server/server-helpers/image-overlay/mediapipe-types";
import {
isCharucoOverlayDataMessage,
isMediapipeOverlayDataMessage
@@ -20,7 +20,7 @@ interface ServerContextValue {
isConnected: boolean;
connect: () => void;
disconnect: () => void;
- send: (data: string | object) => void;
+ sendWebsocketMessage: (data: string | object) => void;
setCanvasForCamera: (cameraId: string, canvas: HTMLCanvasElement) => void;
getFps: (cameraId: string) => number | null;
getServerFps: () => number | null;
@@ -354,7 +354,7 @@ export const ServerContextProvider: React.FC<{ children: ReactNode }> = ({ child
wsConnectionRef.current?.disconnect();
}, []);
- const send = useCallback((data: string | object): void => {
+ const sendWebsocketMessage = useCallback((data: string | object): void => {
wsConnectionRef.current?.send(data);
}, []);
@@ -410,7 +410,7 @@ export const ServerContextProvider: React.FC<{ children: ReactNode }> = ({ child
isConnected,
connect,
disconnect,
- send,
+ sendWebsocketMessage,
setCanvasForCamera,
getFps,
getServerFps,
@@ -421,7 +421,7 @@ export const ServerContextProvider: React.FC<{ children: ReactNode }> = ({ child
subscribeToTrackedPoints,
subscribeToRigidBodies,
getLatestTrackedPoints,
- }), [isConnected, connectedCameraIds, connect, disconnect, send, setCanvasForCamera, getFps, getServerFps, getFramerateStore, getLogStore, updateServerConnection, subscribeToTrackedPoints, subscribeToRigidBodies, getLatestTrackedPoints]);
+ }), [isConnected, connectedCameraIds, connect, disconnect, sendWebsocketMessage, setCanvasForCamera, getFps, getServerFps, getFramerateStore, getLogStore, updateServerConnection, subscribeToTrackedPoints, subscribeToRigidBodies, getLatestTrackedPoints]);
return (
<ServerContext.Provider value={contextValue}>
diff --git a/freemocap-ui/src/services/server/server-helpers/canvas-manager.ts b/freemocap-ui/src/services/server/server-helpers/canvas-manager.ts
index a3da72c9..98383b3d 100644
--- a/freemocap-ui/src/services/server/server-helpers/canvas-manager.ts
+++ b/freemocap-ui/src/services/server/server-helpers/canvas-manager.ts
@@ -1,4 +1,4 @@
-import { workerCode } from "@/services/server/server-helpers/offscreen-renderer.worker";
+import {workerCode} from "@/services/server/server-helpers/offscreen-renderer.worker";
export interface CanvasWorker {
worker: Worker;
diff --git a/freemocap-ui/src/services/server/server-helpers/frame-processor/binary-frame-parser.ts b/freemocap-ui/src/services/server/server-helpers/frame-processor/binary-frame-parser.ts
index 3f8c6a6c..efe80369 100644
--- a/freemocap-ui/src/services/server/server-helpers/frame-processor/binary-frame-parser.ts
+++ b/freemocap-ui/src/services/server/server-helpers/frame-processor/binary-frame-parser.ts
@@ -1,12 +1,12 @@
// binary-frame-parser.ts
import {
- MESSAGE_TYPE,
- PAYLOAD_HEADER_FIELDS,
- PAYLOAD_HEADER_SIZE,
FRAME_HEADER_FIELDS,
FRAME_HEADER_SIZE,
+ MESSAGE_TYPE,
PAYLOAD_FOOTER_FIELDS,
PAYLOAD_FOOTER_SIZE,
+ PAYLOAD_HEADER_FIELDS,
+ PAYLOAD_HEADER_SIZE,
} from './binary-protocol';
export interface ParsedFrame {
diff --git a/freemocap-ui/src/services/server/server-helpers/frame-processor/frame-processor.ts b/freemocap-ui/src/services/server/server-helpers/frame-processor/frame-processor.ts
index 36cabe97..54df6473 100644
--- a/freemocap-ui/src/services/server/server-helpers/frame-processor/frame-processor.ts
+++ b/freemocap-ui/src/services/server/server-helpers/frame-processor/frame-processor.ts
@@ -4,7 +4,7 @@
// dedicated Web Worker so that all Blob allocations and createImageBitmap
// async work happen off the main thread.
-import { frameDecodeWorkerCode } from "@/services/server/server-helpers/frame-processor/frame-decode.worker";
+import {frameDecodeWorkerCode} from "@/services/server/server-helpers/frame-processor/frame-decode.worker";
export interface FrameData {
cameraId: string;
diff --git a/freemocap-ui/src/services/server/server-helpers/image-overlay/image-overlay-system.ts b/freemocap-ui/src/services/server/server-helpers/image-overlay/image-overlay-system.ts
index f0fe2b21..f574ac73 100644
--- a/freemocap-ui/src/services/server/server-helpers/image-overlay/image-overlay-system.ts
+++ b/freemocap-ui/src/services/server/server-helpers/image-overlay/image-overlay-system.ts
@@ -1,5 +1,4 @@
// base-overlay-renderer.ts
-import { z } from 'zod';
// Generic types for any observation
export interface Point2D {
@@ -300,4 +299,4 @@ export abstract class BaseOverlayRenderer {
public destroy(): void {
// Cleanup if needed
}
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts b/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts
index 060463b3..0dbb8528 100644
--- a/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts
+++ b/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-renderer-factory.ts
@@ -1,6 +1,6 @@
// overlay-renderer-factory.ts
-import { CharucoOverlayRenderer } from './charuco-overlay-renderer';
-import { MediapipeOverlayRenderer, MediapipeObservation } from './mediapipe-overlay-renderer';
+import {CharucoOverlayRenderer} from './charuco-overlay-renderer';
+import {MediapipeObservation, MediapipeOverlayRenderer} from './mediapipe-overlay-renderer';
import {BaseOverlayRenderer, ModelInfo} from "@/services/server/server-helpers/image-overlay/image-overlay-system";
import {CharucoObservation} from "@/services/server/server-helpers/image-overlay/charuco-types";
@@ -142,4 +142,4 @@ export class OverlayManager {
this.charucoRenderer = new CharucoOverlayRenderer();
this.mediapipeRenderer = new MediapipeOverlayRenderer();
}
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-types.ts b/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-types.ts
index 7bf5c2e5..4bdddee8 100644
--- a/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-types.ts
+++ b/freemocap-ui/src/services/server/server-helpers/image-overlay/overlay-types.ts
@@ -1,5 +1,11 @@
-import {CharucoObservation, CharucoOverlayDataMessage} from "@/services/server/server-helpers/image-overlay/charuco-types";
-import {MediapipeObservation, MediapipeOverlayDataMessage} from "@/services/server/server-helpers/image-overlay/mediapipe-types";
+import {
+ CharucoObservation,
+ CharucoOverlayDataMessage
+} from "@/services/server/server-helpers/image-overlay/charuco-types";
+import {
+ MediapipeObservation,
+ MediapipeOverlayDataMessage
+} from "@/services/server/server-helpers/image-overlay/mediapipe-types";
// Union type for all observation data messages
export type ObservationDataMessage = CharucoOverlayDataMessage | MediapipeOverlayDataMessage;
@@ -14,4 +20,4 @@ export function isCharucoObservation(obs: Observation): obs is CharucoObservatio
export function isMediapipeObservation(obs: Observation): obs is MediapipeObservation {
return obs.message_type === 'mediapipe_overlay';
-}
\ No newline at end of file
+}
diff --git a/freemocap-ui/src/services/server/server-helpers/log-store.ts b/freemocap-ui/src/services/server/server-helpers/log-store.ts
index 7dad53a6..d0cf1f27 100644
--- a/freemocap-ui/src/services/server/server-helpers/log-store.ts
+++ b/freemocap-ui/src/services/server/server-helpers/log-store.ts
@@ -1,6 +1,6 @@
// src/services/server/server-helpers/log-store.ts
-import { z } from 'zod';
+import {z} from 'zod';
export const LogRecordSchema = z.object({
name: z.string(),
diff --git a/freemocap-ui/src/store/hooks.ts b/freemocap-ui/src/store/hooks.ts
index 7fb32806..fd5b5512 100644
--- a/freemocap-ui/src/store/hooks.ts
+++ b/freemocap-ui/src/store/hooks.ts
@@ -1,5 +1,5 @@
-import { TypedUseSelectorHook, useDispatch, useSelector } from 'react-redux';
-import type { RootState, AppDispatch } from './types';
+import {TypedUseSelectorHook, useDispatch, useSelector} from 'react-redux';
+import type {AppDispatch, RootState} from './types';
export const useAppDispatch = (): AppDispatch => useDispatch<AppDispatch>();
export const useAppSelector: TypedUseSelectorHook<RootState> = useSelector;
diff --git a/freemocap-ui/src/store/index.ts b/freemocap-ui/src/store/index.ts
index 83d75918..aa1eda8e 100644
--- a/freemocap-ui/src/store/index.ts
+++ b/freemocap-ui/src/store/index.ts
@@ -8,6 +8,6 @@ export * from './slices/cameras';
export * from './slices/recording';
export * from './slices/theme';
export * from './slices/videos';
-export * from './slices/pipeline';
+export * from './slices/realtime';
export * from './slices/mocap';
export * from './slices/settings';
diff --git a/freemocap-ui/src/store/slices/calibration/calibration-slice.ts b/freemocap-ui/src/store/slices/calibration/calibration-slice.ts
index b4036af2..a24e206a 100644
--- a/freemocap-ui/src/store/slices/calibration/calibration-slice.ts
+++ b/freemocap-ui/src/store/slices/calibration/calibration-slice.ts
@@ -12,7 +12,6 @@ import {
export type CalibrationSolverMethod = 'anipose' | 'pyceres';
export interface CalibrationConfig {
- liveTrackCharuco: boolean;
charucoBoardXSquares: number;
charucoBoardYSquares: number;
charucoSquareLength: number;
@@ -47,7 +46,6 @@ export interface CalibrationState {
const initialState: CalibrationState = {
config: {
- liveTrackCharuco: true,
charucoBoardXSquares: 5,
charucoBoardYSquares: 3,
charucoSquareLength: 54,
diff --git a/freemocap-ui/src/store/slices/cameras/camera-settings-storage.ts b/freemocap-ui/src/store/slices/cameras/camera-settings-storage.ts
index 6de530b6..984c4888 100644
--- a/freemocap-ui/src/store/slices/cameras/camera-settings-storage.ts
+++ b/freemocap-ui/src/store/slices/cameras/camera-settings-storage.ts
@@ -1,4 +1,4 @@
-import { CameraConfig, extractConfigSettings } from './cameras-types';
+import {CameraConfig, extractConfigSettings} from './cameras-types';
const STORAGE_KEY = 'freemocap-camera-settings';
diff --git a/freemocap-ui/src/store/slices/cameras/cameras-slice.ts b/freemocap-ui/src/store/slices/cameras/cameras-slice.ts
index e656fa51..2ba77650 100644
--- a/freemocap-ui/src/store/slices/cameras/cameras-slice.ts
+++ b/freemocap-ui/src/store/slices/cameras/cameras-slice.ts
@@ -1,20 +1,18 @@
// cameras-slice.ts
-import { createSlice, PayloadAction } from '@reduxjs/toolkit';
+import {createSlice, PayloadAction} from '@reduxjs/toolkit';
import {
+ areConfigsEqual,
+ CameraConfig,
CamerasState,
- CameraConfig, extractConfigSettings, areConfigsEqual, createDefaultCameraConfig,
+ createDefaultCameraConfig,
+ extractConfigSettings,
} from './cameras-types';
+import {camerasConnectOrUpdate, closeCameras, detectCameras, pauseUnpauseCameras,} from './cameras-thunks';
import {
- detectCameras,
- camerasConnectOrUpdate,
- closeCameras,
- pauseUnpauseCameras,
-} from './cameras-thunks';
-import {
- savePersistedCameraSettings,
- clearPersistedCameraSettings,
buildPersistedEntry,
+ clearPersistedCameraSettings,
PersistedCameraSettingsMap,
+ savePersistedCameraSettings,
} from './camera-settings-storage';
// Persist all current camera desired configs + selection to localStorage
diff --git a/freemocap-ui/src/store/slices/cameras/cameras-thunks.ts b/freemocap-ui/src/store/slices/cameras/cameras-thunks.ts
index ecdedd5d..1d40b39e 100644
--- a/freemocap-ui/src/store/slices/cameras/cameras-thunks.ts
+++ b/freemocap-ui/src/store/slices/cameras/cameras-thunks.ts
@@ -1,21 +1,21 @@
// cameras-thunks.ts
-import { createAsyncThunk } from '@reduxjs/toolkit';
-import { RootState } from '../../types';
-import { serverUrls } from '@/services';
+import {createAsyncThunk} from '@reduxjs/toolkit';
+import {RootState} from '../../types';
+import {serverUrls} from '@/services';
import {
Camera,
CameraConfig,
- DetectCamerasRequest,
- DetectCamerasResponse,
CamerasConnectOrUpdateRequest,
ConnectCamerasResponse,
createDefaultCameraConfig,
+ DetectCamerasRequest,
+ DetectCamerasResponse,
} from './cameras-types';
-import { selectSelectedCameraConfigs } from './cameras-selectors';
+import {selectSelectedCameraConfigs} from './cameras-selectors';
import {
loadPersistedCameraSettings,
- savePersistedCameraSettings,
PersistedCameraSettingsMap,
+ savePersistedCameraSettings,
} from './camera-settings-storage';
export const detectCameras = createAsyncThunk<
diff --git a/freemocap-ui/src/store/slices/cameras/cameras-types.ts b/freemocap-ui/src/store/slices/cameras/cameras-types.ts
index 158caddd..640ac3e4 100644
--- a/freemocap-ui/src/store/slices/cameras/cameras-types.ts
+++ b/freemocap-ui/src/store/slices/cameras/cameras-types.ts
@@ -1,5 +1,5 @@
// cameras-types.ts
-import { z } from 'zod';
+import {z} from 'zod';
// ==================== Constants ====================
export const PIXEL_FORMATS = ['RGB', 'BGR', 'GRAY'] as const;
diff --git a/freemocap-ui/src/store/slices/locale/locale-selectors.ts b/freemocap-ui/src/store/slices/locale/locale-selectors.ts
index cdff72ab..1d861725 100644
--- a/freemocap-ui/src/store/slices/locale/locale-selectors.ts
+++ b/freemocap-ui/src/store/slices/locale/locale-selectors.ts
@@ -1,4 +1,4 @@
-import { RootState } from "../../types";
+import {RootState} from "../../types";
export const selectLocale = (state: RootState) => state.locale.locale;
export const selectPreviousLocale = (state: RootState) =>
diff --git a/freemocap-ui/src/store/slices/locale/locale-slice.ts b/freemocap-ui/src/store/slices/locale/locale-slice.ts
index 3e758efc..c80a9dbe 100644
--- a/freemocap-ui/src/store/slices/locale/locale-slice.ts
+++ b/freemocap-ui/src/store/slices/locale/locale-slice.ts
@@ -1,7 +1,7 @@
- import { createSlice, PayloadAction } from "@reduxjs/toolkit";
-import type { LocaleState } from "./locale-types";
-import type { SupportedLocale } from "@/i18n";
-import { FALLBACK_LOCALE, getLocaleDirection } from "@/i18n";
+import {createSlice, PayloadAction} from "@reduxjs/toolkit";
+import type {LocaleState} from "./locale-types";
+import type {SupportedLocale} from "@/i18n";
+import {FALLBACK_LOCALE, getLocaleDirection} from "@/i18n";
import i18n from "@/i18n/i18n";
const STORAGE_KEYS = {
diff --git a/freemocap-ui/src/store/slices/locale/locale-types.ts b/freemocap-ui/src/store/slices/locale/locale-types.ts
index bc885e6e..77ef5174 100644
--- a/freemocap-ui/src/store/slices/locale/locale-types.ts
+++ b/freemocap-ui/src/store/slices/locale/locale-types.ts
@@ -1,4 +1,4 @@
-import type { SupportedLocale } from "@/i18n";
+import type {SupportedLocale} from "@/i18n";
export interface LocaleState {
locale: SupportedLocale;
diff --git a/freemocap-ui/src/store/slices/pipeline/index.ts b/freemocap-ui/src/store/slices/pipeline/index.ts
deleted file mode 100644
index 09453243..00000000
--- a/freemocap-ui/src/store/slices/pipeline/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from './pipeline-slice';
-export * from './pipeline-selectors';
-export * from './pipeline-thunks';
-export * from './pipeline-types';
diff --git a/freemocap-ui/src/store/slices/realtime/index.ts b/freemocap-ui/src/store/slices/realtime/index.ts
new file mode 100644
index 00000000..84354182
--- /dev/null
+++ b/freemocap-ui/src/store/slices/realtime/index.ts
@@ -0,0 +1,4 @@
+export * from './realtime-slice';
+export * from './realtime-selectors';
+export * from './realtime-thunks';
+export * from './realtime-types';
diff --git a/freemocap-ui/src/store/slices/pipeline/pipeline-selectors.ts b/freemocap-ui/src/store/slices/realtime/realtime-selectors.ts
similarity index 73%
rename from freemocap-ui/src/store/slices/pipeline/pipeline-selectors.ts
rename to freemocap-ui/src/store/slices/realtime/realtime-selectors.ts
index 74365541..3bbf4839 100644
--- a/freemocap-ui/src/store/slices/pipeline/pipeline-selectors.ts
+++ b/freemocap-ui/src/store/slices/realtime/realtime-selectors.ts
@@ -2,12 +2,12 @@
import {RootState} from "@/store";
import {createSelector} from "@reduxjs/toolkit";
-export const selectPipelineState = (state: RootState) => state.pipeline;
-export const selectIsPipelineConnected = (state: RootState) => state.pipeline.isConnected;
-export const selectPipelineId = (state: RootState) => state.pipeline.pipelineId;
-export const selectCameraGroupId = (state: RootState) => state.pipeline.cameraGroupId;
-export const selectIsPipelineLoading = (state: RootState) => state.pipeline.isLoading;
-export const selectPipelineError = (state: RootState) => state.pipeline.error;
+export const selectPipelineState = (state: RootState) => state.realtime;
+export const selectIsPipelineConnected = (state: RootState) => state.realtime.isConnected;
+export const selectPipelineId = (state: RootState) => state.realtime.pipelineId;
+export const selectCameraGroupId = (state: RootState) => state.realtime.cameraGroupId;
+export const selectIsPipelineLoading = (state: RootState) => state.realtime.isLoading;
+export const selectPipelineError = (state: RootState) => state.realtime.error;
// derived selectors
export const selectPipelineInfo = createSelector(
@@ -31,4 +31,3 @@ export const selectCanDisconnectPipeline = createSelector(
[selectIsPipelineConnected, selectIsPipelineLoading],
(isConnected, isLoading) => isConnected && !isLoading
);
-
diff --git a/freemocap-ui/src/store/slices/pipeline/pipeline-slice.ts b/freemocap-ui/src/store/slices/realtime/realtime-slice.ts
similarity index 93%
rename from freemocap-ui/src/store/slices/pipeline/pipeline-slice.ts
rename to freemocap-ui/src/store/slices/realtime/realtime-slice.ts
index c8ab05c8..7cf6f1ba 100644
--- a/freemocap-ui/src/store/slices/pipeline/pipeline-slice.ts
+++ b/freemocap-ui/src/store/slices/realtime/realtime-slice.ts
@@ -1,6 +1,6 @@
import {createSlice} from "@reduxjs/toolkit";
-import {PipelineState} from "@/store/slices/pipeline/pipeline-types";
-import {closePipeline, connectRealtimePipeline} from "@/store/slices/pipeline/pipeline-thunks";
+import {PipelineState} from "@/store/slices/realtime/realtime-types";
+import {closePipeline, connectRealtimePipeline} from "@/store/slices/realtime/realtime-thunks";
import {serverSettingsCleared, serverSettingsUpdated} from "@/store/slices/settings/settings-slice";
const initialState: PipelineState = {
@@ -11,7 +11,7 @@ const initialState: PipelineState = {
error: null,
}
-export const pipelineSlice = createSlice({
+export const realtimeSlice = createSlice({
name: 'pipeline',
initialState,
reducers: {
@@ -79,4 +79,4 @@ export const pipelineSlice = createSlice({
},
});
-export const {pipelineStateReset} = pipelineSlice.actions;
+export const {pipelineStateReset} = realtimeSlice.actions;
diff --git a/freemocap-ui/src/store/slices/pipeline/pipeline-thunks.ts b/freemocap-ui/src/store/slices/realtime/realtime-thunks.ts
similarity index 97%
rename from freemocap-ui/src/store/slices/pipeline/pipeline-thunks.ts
rename to freemocap-ui/src/store/slices/realtime/realtime-thunks.ts
index 1815b84c..b32c99a9 100644
--- a/freemocap-ui/src/store/slices/pipeline/pipeline-thunks.ts
+++ b/freemocap-ui/src/store/slices/realtime/realtime-thunks.ts
@@ -1,7 +1,7 @@
import {createAsyncThunk} from "@reduxjs/toolkit";
import {RootState, selectSelectedCameraConfigs} from "@/store";
import {serverUrls} from "@/services";
-import {PipelineConnectRequest, PipelineConnectResponse,} from "@/store/slices/pipeline/pipeline-types";
+import {PipelineConnectRequest, PipelineConnectResponse,} from "@/store/slices/realtime/realtime-types";
export const connectRealtimePipeline = createAsyncThunk<
PipelineConnectResponse,
diff --git a/freemocap-ui/src/store/slices/pipeline/pipeline-types.ts b/freemocap-ui/src/store/slices/realtime/realtime-types.ts
similarity index 84%
rename from freemocap-ui/src/store/slices/pipeline/pipeline-types.ts
rename to freemocap-ui/src/store/slices/realtime/realtime-types.ts
index 1444992c..52b3b119 100644
--- a/freemocap-ui/src/store/slices/pipeline/pipeline-types.ts
+++ b/freemocap-ui/src/store/slices/realtime/realtime-types.ts
@@ -22,18 +22,18 @@ export interface PipelineState {
}
-const ProcessingPipelineConfigSchema = z.object({
+const RealtimePipelineConfigSchema = z.object({
pipeline_id: z.string(),
parameters: z.record(z.string(), z.any()),
})
-export type ProcessingPipelineConfig = z.infer<typeof ProcessingPipelineConfigSchema>;
+export type RealtimePipelineConfig = z.infer<typeof RealtimePipelineConfigSchema>;
export interface ProcessingPipeline {
id: string;
name: string;
isActive: boolean;
- config: ProcessingPipelineConfig
+ config: RealtimePipelineConfig
}
export interface ProcessingPipelineState {
@@ -42,4 +42,3 @@ export interface ProcessingPipelineState {
isActive: boolean;
error: string | null;
}
-
diff --git a/freemocap-ui/src/store/slices/recording/recording-thunks.ts b/freemocap-ui/src/store/slices/recording/recording-thunks.ts
index 6e8b7c95..d737941b 100644
--- a/freemocap-ui/src/store/slices/recording/recording-thunks.ts
+++ b/freemocap-ui/src/store/slices/recording/recording-thunks.ts
@@ -1,8 +1,8 @@
-import { createAsyncThunk } from '@reduxjs/toolkit';
-import { z } from 'zod';
-import { RootState } from '@/store/types';
+import {createAsyncThunk} from '@reduxjs/toolkit';
+import {z} from 'zod';
+import {RootState} from '@/store/types';
import {serverUrls} from "@/services";
-import { RecordingCompletionData, StopRecordingResponseSchema } from './recording-types';
+import {RecordingCompletionData, StopRecordingResponseSchema} from './recording-types';
const RecordStartRequestSchema = z.object({
recording_name: z.string(),
diff --git a/freemocap-ui/src/store/slices/settings/settings-types.ts b/freemocap-ui/src/store/slices/settings/settings-types.ts
index f81ef937..69675a7f 100644
--- a/freemocap-ui/src/store/slices/settings/settings-types.ts
+++ b/freemocap-ui/src/store/slices/settings/settings-types.ts
@@ -119,15 +119,7 @@ export interface BackendPipelineSettings {
is_paused: boolean;
}
-// ---------------------------------------------------------------------------
-// VMC settings (mirrors VMCSettings)
-// ---------------------------------------------------------------------------
-export interface BackendVMCSettings {
- enabled: boolean;
- host: string;
- port: number;
-}
// ---------------------------------------------------------------------------
// Top-level settings blob
@@ -138,7 +130,6 @@ export interface FreeMoCapSettings {
pipeline: BackendPipelineSettings;
calibration: BackendCalibrationSettings;
mocap: BackendMocapSettings;
- vmc: BackendVMCSettings;
}
// ---------------------------------------------------------------------------
diff --git a/freemocap-ui/src/store/slices/theme/theme-selectors.ts b/freemocap-ui/src/store/slices/theme/theme-selectors.ts
index b7ed9db9..f9d12576 100644
--- a/freemocap-ui/src/store/slices/theme/theme-selectors.ts
+++ b/freemocap-ui/src/store/slices/theme/theme-selectors.ts
@@ -1,4 +1,4 @@
-import { RootState } from '../../types';
+import {RootState} from '../../types';
export const selectThemeMode = (state: RootState) => state.theme.mode;
export const selectSystemThemePreference = (state: RootState) =>
diff --git a/freemocap-ui/src/store/slices/theme/theme-slice.ts b/freemocap-ui/src/store/slices/theme/theme-slice.ts
index 8f6ab6e8..3cf18110 100644
--- a/freemocap-ui/src/store/slices/theme/theme-slice.ts
+++ b/freemocap-ui/src/store/slices/theme/theme-slice.ts
@@ -1,5 +1,5 @@
-import { createSlice, PayloadAction } from '@reduxjs/toolkit';
-import { ThemeMode } from './theme-types';
+import {createSlice, PayloadAction} from '@reduxjs/toolkit';
+import {ThemeMode} from './theme-types';
const getInitialTheme = (): ThemeMode => {
if (typeof window !== 'undefined') {
diff --git a/freemocap-ui/src/store/slices/videos/videos-selectors.ts b/freemocap-ui/src/store/slices/videos/videos-selectors.ts
index 21bca41f..558c7fda 100644
--- a/freemocap-ui/src/store/slices/videos/videos-selectors.ts
+++ b/freemocap-ui/src/store/slices/videos/videos-selectors.ts
@@ -1,5 +1,5 @@
-import { createSelector } from '@reduxjs/toolkit';
-import { RootState } from '../../types';
+import {createSelector} from '@reduxjs/toolkit';
+import {RootState} from '../../types';
export const selectVideoFolder = (state: RootState) => state.videos.folder;
export const selectVideoFiles = (state: RootState) => state.videos.files;
diff --git a/freemocap-ui/src/store/slices/videos/videos-slice.ts b/freemocap-ui/src/store/slices/videos/videos-slice.ts
index e24dd8d1..d5c74b44 100644
--- a/freemocap-ui/src/store/slices/videos/videos-slice.ts
+++ b/freemocap-ui/src/store/slices/videos/videos-slice.ts
@@ -1,10 +1,6 @@
-import { createSlice, PayloadAction } from '@reduxjs/toolkit';
-import { VideoFile, VideosState } from './videos-types';
-import {
- loadVideos,
- openVideoFile,
- selectVideoLoadFolder,
-} from './videos-thunks';
+import {createSlice, PayloadAction} from '@reduxjs/toolkit';
+import {VideoFile, VideosState} from './videos-types';
+import {loadVideos, openVideoFile, selectVideoLoadFolder,} from './videos-thunks';
const initialState: VideosState = {
diff --git a/freemocap-ui/src/store/slices/videos/videos-thunks.ts b/freemocap-ui/src/store/slices/videos/videos-thunks.ts
index 5bd73156..26e93e23 100644
--- a/freemocap-ui/src/store/slices/videos/videos-thunks.ts
+++ b/freemocap-ui/src/store/slices/videos/videos-thunks.ts
@@ -1,4 +1,4 @@
-import { createAsyncThunk } from '@reduxjs/toolkit';
+import {createAsyncThunk} from '@reduxjs/toolkit';
import {electronIpc} from "@/services/electron-ipc/electron-ipc";
import {VideoFile} from "@/store";
diff --git a/freemocap-ui/src/store/store.ts b/freemocap-ui/src/store/store.ts
index d5591d2b..1fb8649e 100644
--- a/freemocap-ui/src/store/store.ts
+++ b/freemocap-ui/src/store/store.ts
@@ -3,7 +3,7 @@ import {cameraSlice} from "@/store/slices/cameras";
import {recordingSlice} from "@/store/slices/recording";
import {themeSlice} from "@/store/slices/theme";
import {videosSlice} from "@/store/slices/videos";
-import {pipelineSlice} from "@/store/slices/pipeline";
+import {realtimeSlice} from "@/store/slices/realtime";
import {calibrationSlice} from "@/store/slices/calibration/calibration-slice";
import {mocapSlice} from "@/store/slices/mocap/mocap-slice";
import {settingsSlice} from "@/store/slices/settings/settings-slice";
@@ -15,7 +15,7 @@ export const store = configureStore({
recording: recordingSlice.reducer,
theme: themeSlice.reducer,
videos: videosSlice.reducer,
- pipeline: pipelineSlice.reducer,
+ realtime: realtimeSlice.reducer,
calibration: calibrationSlice.reducer,
mocap: mocapSlice.reducer,
settings: settingsSlice.reducer,
diff --git a/freemocap-ui/src/store/thunk-helpers.ts b/freemocap-ui/src/store/thunk-helpers.ts
deleted file mode 100644
index f6b9fc8a..00000000
--- a/freemocap-ui/src/store/thunk-helpers.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * Shared utilities for async thunks that call the backend HTTP API.
- */
-
-/**
- * Extract a detailed error message from a failed HTTP response.
- * Attempts to parse JSON first, falls back to text, builds a
- * comprehensive error string including status code and body.
- */
-export async function getDetailedErrorMessage(response: Response): Promise<string> {
- let errorDetails: unknown;
-
- try {
- errorDetails = await response.json();
- console.error('❌ Server returned validation/error details:', errorDetails);
- } catch {
- try {
- errorDetails = await response.text();
- console.error('❌ Server returned error text:', errorDetails);
- } catch {
- console.error('❌ Could not read error response body');
- }
- }
-
- const baseError = `HTTP ${response.status}: ${response.statusText}`;
-
- if (errorDetails) {
- const detailsStr = typeof errorDetails === 'string'
- ? errorDetails
- : JSON.stringify(errorDetails, null, 2);
- return `${baseError}\n\nValidation/Error Details:\n${detailsStr}`;
- }
-
- return baseError;
-}
diff --git a/freemocap-ui/src/store/types.ts b/freemocap-ui/src/store/types.ts
index 3931b2ce..be6112cd 100644
--- a/freemocap-ui/src/store/types.ts
+++ b/freemocap-ui/src/store/types.ts
@@ -1,5 +1,5 @@
-import { store } from './store';
-import { ThunkAction, Action } from '@reduxjs/toolkit';
+import {store} from './store';
+import {Action, ThunkAction} from '@reduxjs/toolkit';
export type RootState = ReturnType<typeof store.getState>;
export type AppDispatch = typeof store.dispatch;
diff --git a/freemocap/api/http/app/settings.py b/freemocap/api/http/app/settings.py
index cf74c824..49588e82 100644
--- a/freemocap/api/http/app/settings.py
+++ b/freemocap/api/http/app/settings.py
@@ -11,14 +11,12 @@ import logging
from enum import Enum
from pydantic import BaseModel, Field
-from skellycam.core.camera.config.camera_config import CameraConfig, CameraConfigs
+from skellycam.core.camera.config.camera_config import CameraConfig
from skellycam.core.types.type_overloads import CameraIdString
-from freemocap.core.pipeline.pipeline_configs import (
- CalibrationPipelineConfig,
- MocapPipelineConfig,
-)
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
+from freemocap.core.pipeline.realtime import RealtimePipelineConfig
+from freemocap.core.tasks.calibration.calibration_task_config import PosthocCalibrationPipelineConfig
+from freemocap.core.tasks.mocap.mocap_task_config import PosthocMocapPipelineConfig
logger = logging.getLogger(__name__)
@@ -51,7 +49,7 @@ class PipelineSettings(BaseModel):
class CalibrationSettings(BaseModel):
"""Calibration config + runtime status."""
- config: CalibrationPipelineConfig = Field(default_factory=CalibrationPipelineConfig)
+ config: PosthocCalibrationPipelineConfig = Field(default_factory=PosthocCalibrationPipelineConfig)
is_recording: bool = False
recording_progress: float = 0.0
last_recording_path: str | None = None
@@ -60,19 +58,12 @@ class CalibrationSettings(BaseModel):
class MocapSettings(BaseModel):
"""Motion capture config + runtime status."""
- config: MocapPipelineConfig = Field(default_factory=MocapPipelineConfig.default_realtime)
+ config: PosthocMocapPipelineConfig = Field(default_factory=PosthocMocapPipelineConfig.default_realtime)
is_recording: bool = False
recording_progress: float = 0.0
last_recording_path: str | None = None
-class VMCSettings(BaseModel):
- """VMC (Virtual Motion Capture) protocol output settings."""
- enabled: bool = False
- host: str = "127.0.0.1"
- port: int = 39539
-
-
# ---------------------------------------------------------------------------
# Top-level settings blob
# ---------------------------------------------------------------------------
@@ -89,7 +80,6 @@ class FreeMoCapSettings(BaseModel):
pipeline: PipelineSettings = Field(default_factory=PipelineSettings)
calibration: CalibrationSettings = Field(default_factory=CalibrationSettings)
mocap: MocapSettings = Field(default_factory=MocapSettings)
- vmc: VMCSettings = Field(default_factory=VMCSettings)
# ---------------------------------------------------------------------------
@@ -234,7 +224,6 @@ class SettingsManager:
pipeline=pipeline,
calibration=calibration,
mocap=mocap,
- vmc=self._settings.vmc,
)
self.notify_changed()
diff --git a/freemocap/api/http/blender/blender_router.py b/freemocap/api/http/blender/blender_router.py
index 445da34f..a91e3e3b 100644
--- a/freemocap/api/http/blender/blender_router.py
+++ b/freemocap/api/http/blender/blender_router.py
@@ -3,13 +3,13 @@ import logging
from pathlib import Path
from fastapi import APIRouter, HTTPException
-from freemocap.system.default_paths import FREEMOCAP_TEST_DATA_PATH
from pydantic import BaseModel, ConfigDict, Field
from freemocap.core.blender.export_to_blender import export_to_blender
from freemocap.core.blender.helpers.freemocap_blender_addon_helpers.install_addon.install_blender_addon import \
install_freemocap_blender_addon
from freemocap.core.blender.helpers.get_best_guess_of_blender_path import get_best_guess_of_blender_path
+from freemocap.system.default_paths import FREEMOCAP_TEST_DATA_PATH
logger = logging.getLogger(__name__)
diff --git a/freemocap/api/http/calibration/calibration_router.py b/freemocap/api/http/calibration/calibration_router.py
index 2856c1be..756b4cac 100644
--- a/freemocap/api/http/calibration/calibration_router.py
+++ b/freemocap/api/http/calibration/calibration_router.py
@@ -7,7 +7,7 @@ from pydantic import BaseModel, Field, ConfigDict
from skellycam.core.recorders.videos.recording_info import RecordingInfo
from freemocap.app.freemocap_application import get_freemocap_app
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationPipelineConfig
+from freemocap.core.tasks.calibration.calibration_task_config import PosthocCalibrationPipelineConfig
from freemocap.system.default_paths import FREEMOCAP_TEST_DATA_PATH
logger = logging.getLogger(__name__)
@@ -19,7 +19,7 @@ calibration_router = APIRouter(prefix="/calibration", tags=["Calibration"])
class CalibrationConfigRequest(BaseModel):
- config: CalibrationPipelineConfig
+ config: PosthocCalibrationPipelineConfig
class CalibrationConfigResponse(BaseModel):
@@ -35,9 +35,9 @@ class CalibrateRecordingRequest(BaseModel):
populate_by_name=True,
json_schema_extra=_calibrate_request_schema_extra,
)
- calibration_config: CalibrationPipelineConfig = Field(
+ calibration_config: PosthocCalibrationPipelineConfig = Field(
alias="calibrationTaskConfig",
- default_factory=CalibrationPipelineConfig,
+ default_factory=PosthocCalibrationPipelineConfig,
)
calibration_recording_directory: str | None = Field(
alias="calibrationRecordingDirectory",
@@ -55,7 +55,7 @@ class CalibrateRecordingRequest(BaseModel):
@classmethod
def create_test_data_request(cls) -> "CalibrateRecordingRequest":
- config = CalibrationPipelineConfig()
+ config = PosthocCalibrationPipelineConfig()
config.charuco_board_x_squares = 7
config.charuco_board_y_squares = 5
@@ -67,7 +67,7 @@ class CalibrateRecordingRequest(BaseModel):
class StopCalibrationRecordingRequest(BaseModel):
- calibration_config: CalibrationPipelineConfig = Field(alias="calibrationTaskConfig")
+ calibration_config: PosthocCalibrationPipelineConfig = Field(alias="calibrationTaskConfig")
diff --git a/freemocap/api/http/mocap/mocap_router.py b/freemocap/api/http/mocap/mocap_router.py
index a4907d01..25a76739 100644
--- a/freemocap/api/http/mocap/mocap_router.py
+++ b/freemocap/api/http/mocap/mocap_router.py
@@ -7,8 +7,8 @@ from pydantic import BaseModel, ConfigDict, Field
from skellycam.core.recorders.videos.recording_info import RecordingInfo
from freemocap.app.freemocap_application import get_freemocap_app
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationSource
-from freemocap.core.pipeline.pipeline_configs.mocap_task_config import MocapPipelineConfig
+from freemocap.core.tasks.calibration.calibration_task_config import CalibrationSource
+from freemocap.core.tasks.mocap.mocap_task_config import PosthocMocapPipelineConfig
from freemocap.system.default_paths import FREEMOCAP_TEST_DATA_PATH
logger = logging.getLogger(__name__)
@@ -20,7 +20,7 @@ mocap_router = APIRouter(prefix="/mocap", tags=["Mocap"])
class MocapConfigRequest(BaseModel):
- config: MocapPipelineConfig
+ config: PosthocMocapPipelineConfig
class MocapConfigResponse(BaseModel):
@@ -30,7 +30,7 @@ class MocapConfigResponse(BaseModel):
class StartMocapRecordingRequest(BaseModel):
mocap_recording_directory: str = Field(alias="mocapRecordingDirectory")
- mocap_config: MocapPipelineConfig = Field(alias="mocapTaskConfig")
+ mocap_config: PosthocMocapPipelineConfig = Field(alias="mocapTaskConfig")
def to_recording_info(self) -> RecordingInfo:
recording_dir = Path(self.mocap_recording_directory).expanduser()
@@ -45,7 +45,7 @@ class StartMocapRecordingRequest(BaseModel):
class StopMocapRecordingRequest(BaseModel):
- mocap_config: MocapPipelineConfig = Field(alias="mocapTaskConfig")
+ mocap_config: PosthocMocapPipelineConfig = Field(alias="mocapTaskConfig")
def _process_mocap_request_schema_extra(schema: dict) -> None:
@@ -55,11 +55,11 @@ def _process_mocap_request_schema_extra(schema: dict) -> None:
class ProcessMocapRecordingRequest(BaseModel):
model_config = ConfigDict(json_schema_extra=_process_mocap_request_schema_extra)
mocap_recording_directory: str = Field(default=FREEMOCAP_TEST_DATA_PATH)
- mocap_config: MocapPipelineConfig = Field(default_factory=MocapPipelineConfig)
+ mocap_config: PosthocMocapPipelineConfig = Field(default_factory=PosthocMocapPipelineConfig)
@classmethod
def create_test_data_request(cls) -> "ProcessMocapRecordingRequest":
- config = MocapPipelineConfig()
+ config = PosthocMocapPipelineConfig()
config.calibration_source = CalibrationSource.MOST_RECENT
return cls(
mocap_recording_directory=FREEMOCAP_TEST_DATA_PATH,
diff --git a/freemocap/api/http/pipelines/pipeline_router.py b/freemocap/api/http/pipelines/pipeline_router.py
index 75dfe52a..42859671 100644
--- a/freemocap/api/http/pipelines/pipeline_router.py
+++ b/freemocap/api/http/pipelines/pipeline_router.py
@@ -9,7 +9,7 @@ from skellycam.core.recorders.videos.recording_info import RecordingInfo
from skellycam.core.types.type_overloads import CameraGroupIdString, CameraIdString
from freemocap.app.freemocap_application import get_freemocap_app
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
+from freemocap.core.pipeline.realtime.realtime_aggregator_node import RealtimePipelineConfig
from freemocap.system.default_paths import default_recording_name, get_default_recording_folder_path
logger = logging.getLogger(__name__)
diff --git a/freemocap/api/udp/vmc_relay.py b/freemocap/api/udp/vmc_relay.py
deleted file mode 100644
index 4855ca8b..00000000
--- a/freemocap/api/udp/vmc_relay.py
+++ /dev/null
@@ -1,90 +0,0 @@
-"""
-VMC relay: app-level async task that broadcasts rigid body poses over UDP.
-
-Runs independently of any browser/WebSocket connection. Polls the
-application's frontend payload pipeline for new frames and sends
-bone transforms via the VMC protocol.
-
-The relay lazily creates and destroys its VMCSender based on the
-live VMCSettings β€” toggling VMC on/off in the UI takes effect
-within one poll cycle (~10ms).
-
-Started by the FastAPI app lifespan and cancelled on shutdown.
-"""
-import asyncio
-import logging
-
-from freemocap.app.freemocap_application import FreemocapApplication, get_freemocap_app
-from freemocap.app.settings import SettingsManager
-from freemocap.core.mocap.skeleton_dewiggler.vmc_sender import VMCSender
-from freemocap.core.viz.frontend_payload import FrontendPayload
-from freemocap.utilities.wait_functions import await_10ms
-
-logger = logging.getLogger(__name__)
-
-
-async def vmc_relay_task(
- *,
- app: FreemocapApplication,
-) -> None:
- """Poll for new frames and broadcast rigid body poses via VMC/UDP.
-
- This task mirrors the websocket relay's polling pattern but sends
- over UDP instead of WebSocket, and runs regardless of whether any
- browser is connected.
-
- Args:
- app: The FreemocapApplication singleton (owns pipelines + settings).
- """
- settings_manager: SettingsManager = app.settings_manager
- sender: VMCSender | None = None
- last_sent_frame: int = -1
-
- logger.info("VMC relay task started")
-
- try:
- while app.should_continue:
- await await_10ms()
-
- # Sync sender lifecycle with settings
- vmc_settings = settings_manager.settings.vmc
- if vmc_settings.enabled:
- if (
- sender is None
- or sender._host != vmc_settings.host
- or sender._port != vmc_settings.port
- ):
- if sender is not None:
- sender.close()
- sender = VMCSender(host=vmc_settings.host, port=vmc_settings.port)
- else:
- if sender is not None:
- sender.close()
- sender = None
- continue # Nothing to do when disabled
-
- # Poll for new frames
- try:
- frontend_payloads = app.get_latest_frontend_payloads(
- if_newer_than=last_sent_frame,
- )
- except IndexError:
- last_sent_frame = -1
- continue
-
- for _pipeline_id, (_payload_bytes, frontend_payload) in frontend_payloads.items():
- if not isinstance(frontend_payload, FrontendPayload):
- continue
- if frontend_payload.rigid_body_poses:
- sender.send(frontend_payload.rigid_body_poses)
- last_sent_frame = frontend_payload.frame_number
-
- except asyncio.CancelledError:
- logger.info("VMC relay task cancelled")
- except Exception as e:
- logger.error(f"VMC relay task error: {e}", exc_info=True)
- raise
- finally:
- if sender is not None:
- sender.close()
- logger.info("VMC relay task stopped")
diff --git a/freemocap/api/udp/vmc_test_receiver.py b/freemocap/api/udp/vmc_test_receiver.py
deleted file mode 100644
index 72f4cc52..00000000
--- a/freemocap/api/udp/vmc_test_receiver.py
+++ /dev/null
@@ -1,135 +0,0 @@
-#!/usr/bin/env python3
-"""
-VMC test receiver: prints incoming bone transforms to the terminal.
-
-Run this alongside freemocap with VMC enabled to verify data is flowing.
-No dependencies beyond Python stdlib.
-
-Usage:
- python vmc_test_receiver.py # listen on default port 39539
- python vmc_test_receiver.py 39540 # listen on custom port
-"""
-
-import socket
-import struct
-import sys
-
-
-def _read_osc_string(data: bytes, offset: int) -> tuple[str, int]:
- """Read a null-terminated, 4-byte-aligned OSC string."""
- end = data.index(b'\x00', offset)
- s = data[offset:end].decode('utf-8')
- # Advance past null + padding to 4-byte boundary
- padded_end = end + 1
- padded_end += (4 - padded_end % 4) % 4
- return s, padded_end
-
-
-def _read_osc_float(data: bytes, offset: int) -> tuple[float, int]:
- """Read a big-endian float32."""
- value = struct.unpack_from('>f', data, offset)[0]
- return value, offset + 4
-
-
-def parse_osc_message(data: bytes, offset: int = 0) -> dict | None:
- """Parse a single OSC message. Returns dict with address + args, or None."""
- if offset >= len(data):
- return None
-
- address, offset = _read_osc_string(data, offset)
- if offset >= len(data):
- return {'address': address, 'args': []}
-
- type_tag, offset = _read_osc_string(data, offset)
- if not type_tag.startswith(','):
- return {'address': address, 'args': []}
-
- args: list[str | float | int] = []
- for tag in type_tag[1:]: # skip the leading comma
- if tag == 'f':
- val, offset = _read_osc_float(data, offset)
- args.append(val)
- elif tag == 's':
- val, offset = _read_osc_string(data, offset)
- args.append(val)
- elif tag == 'i':
- val = struct.unpack_from('>i', data, offset)[0]
- offset += 4
- args.append(val)
- else:
- break # unknown type, stop parsing
-
- return {'address': address, 'args': args}
-
-
-def parse_bundle(data: bytes) -> list[dict]:
- """Parse an OSC bundle into a list of messages."""
- messages: list[dict] = []
-
- # Check for #bundle header
- if data[:8] != b'#bundle\x00':
- msg = parse_osc_message(data)
- if msg:
- messages.append(msg)
- return messages
-
- offset = 8 # skip "#bundle\0"
- offset += 8 # skip timetag
-
- while offset < len(data):
- if offset + 4 > len(data):
- break
- size = struct.unpack_from('>I', data, offset)[0]
- offset += 4
- if offset + size > len(data):
- break
- msg = parse_osc_message(data, offset)
- if msg:
- messages.append(msg)
- offset += size
-
- return messages
-
-
-def main() -> None:
- port = int(sys.argv[1]) if len(sys.argv) > 1 else 39539
-
- sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- sock.bind(('0.0.0.0', port))
- sock.settimeout(1.0)
-
- print(f"VMC test receiver listening on UDP port {port}")
- print(f"Waiting for /VMC/Ext/Bone/Pos messages...\n")
-
- frame_count = 0
- try:
- while True:
- try:
- data, addr = sock.recvfrom(65536)
- except socket.timeout:
- continue
-
- messages = parse_bundle(data)
- bone_messages = [m for m in messages if m['address'] == '/VMC/Ext/Bone/Pos']
-
- if bone_messages:
- frame_count += 1
- print(f"--- Frame {frame_count} ({len(bone_messages)} bones from {addr[0]}:{addr[1]}) ---")
- for msg in bone_messages:
- args = msg['args']
- if len(args) >= 8:
- name = args[0]
- px, py, pz = args[1], args[2], args[3]
- qx, qy, qz, qw = args[4], args[5], args[6], args[7]
- print(f" {name:20s} pos=({px:+7.3f}, {py:+7.3f}, {pz:+7.3f}) "
- f"quat=({qw:+6.3f}, {qx:+6.3f}, {qy:+6.3f}, {qz:+6.3f})")
- print()
-
- except KeyboardInterrupt:
- print(f"\nReceived {frame_count} frames total. Goodbye!")
- finally:
- sock.close()
-
-
-if __name__ == '__main__':
- main()
diff --git a/freemocap/api/websocket/websocket_server.py b/freemocap/api/websocket/websocket_server.py
index bb551043..11ac5ab3 100644
--- a/freemocap/api/websocket/websocket_server.py
+++ b/freemocap/api/websocket/websocket_server.py
@@ -9,9 +9,9 @@ Changes from original:
import asyncio
import json
import logging
+from typing import TYPE_CHECKING
from fastapi import FastAPI
-from skellycam.core.types.type_overloads import CameraIdString
from starlette.websockets import WebSocket, WebSocketState, WebSocketDisconnect
from freemocap.app.freemocap_application import FreemocapApplication, get_freemocap_app
@@ -25,7 +25,6 @@ from freemocap.system.logging_configuration.handlers.websocket_log_queue_handler
MIN_LOG_LEVEL_FOR_WEBSOCKET,
)
from freemocap.utilities.wait_functions import await_10ms
-from typing import TYPE_CHECKING
if TYPE_CHECKING:
from freemocap.app.settings import SettingsManager
@@ -283,6 +282,7 @@ class WebsocketServer:
# Route settings messages to the settings protocol
data_message_type = data.get("message_type", "")
if data_message_type.startswith("settings/"):
+ logger.trace(f"Received settings message: {json.dumps(data, indent=2)}")
handle_settings_message(
data=data,
settings_manager=self._settings_manager,
diff --git a/freemocap/app/app.py b/freemocap/app/app.py
index e97ce57d..13deeefa 100644
--- a/freemocap/app/app.py
+++ b/freemocap/app/app.py
@@ -1,7 +1,6 @@
"""
Consolidated FastAPI app factory with proper lifecycle management.
"""
-import asyncio
import logging
import multiprocessing
from contextlib import asynccontextmanager
@@ -16,16 +15,12 @@ from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from starlette.responses import FileResponse
import freemocap
-from freemocap.api.http.app.health import health_router
-from freemocap.api.http.app.shutdown import shutdown_router
-from freemocap.api.http.app.state import state_router
from freemocap.api.middleware.add_middleware import add_middleware
from freemocap.api.middleware.cors import cors
from freemocap.api.routers import SKELLYCAM_ROUTERS, FREEMOCAP_ROUTERS, APP_ROUTERS
from freemocap.api.server_constants import PROTOCOL, HOSTNAME
-from freemocap.api.udp.vmc_relay import vmc_relay_task
from freemocap.api.websocket.websocket_connect import websocket_router
-from freemocap.app.freemocap_application import create_freemocap_app, get_freemocap_app
+from freemocap.app.freemocap_application import create_freemocap_app
from freemocap.system.default_paths import (
get_default_freemocap_base_folder_path, FREEMOCAP_FAVICON_ICO_PATH
)
diff --git a/freemocap/app/freemocap_application.py b/freemocap/app/freemocap_application.py
index b8bc8b96..4091f731 100644
--- a/freemocap/app/freemocap_application.py
+++ b/freemocap/app/freemocap_application.py
@@ -7,40 +7,25 @@ import multiprocessing
from dataclasses import dataclass, field
from fastapi import FastAPI
-from pydantic import BaseModel, ConfigDict
-from skellycam.core.camera_group.camera_group import CameraGroupState
from skellycam.core.camera_group.camera_group_manager import CameraGroupManager, get_or_create_camera_group_manager
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.recorders.videos.recording_info import RecordingInfo
from skellycam.core.types.type_overloads import CameraGroupIdString
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationPipelineConfig
-from freemocap.core.pipeline.pipeline_configs.mocap_task_config import MocapPipelineConfig
+from freemocap.app.settings import SettingsManager
from freemocap.core.pipeline.posthoc.posthoc_pipeline import PosthocPipeline
from freemocap.core.pipeline.posthoc.posthoc_pipeline_manager import PosthocPipelineManager
+from freemocap.core.pipeline.realtime.realtime_aggregator_node import RealtimePipelineConfig
from freemocap.core.pipeline.realtime.realtime_pipeline import RealtimePipeline
from freemocap.core.pipeline.realtime.realtime_pipeline_manager import RealtimePipelineManager
-from freemocap.app.settings import SettingsManager
-from freemocap.core.viz.frontend_payload import FrontendPayload
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
+from freemocap.core.tasks.calibration.calibration_task_config import PosthocCalibrationPipelineConfig
+from freemocap.core.tasks.mocap.mocap_task_config import PosthocMocapPipelineConfig
from freemocap.core.types.type_overloads import PipelineIdString, FrameNumberInt
+from freemocap.core.viz.frontend_payload import FrontendPayload
logger = logging.getLogger(__name__)
-class WorkerState(BaseModel):
- model_config = ConfigDict(frozen=True)
- pid: int
- name: str
- alive: bool
- error: str | None = None
-
-
-class AppState(BaseModel):
- model_config = ConfigDict(frozen=True)
- camera_groups: dict[CameraGroupIdString, CameraGroupState]
- workers: dict[str, WorkerState]
-
@dataclass
class FreemocapApplication:
@@ -108,7 +93,7 @@ class FreemocapApplication:
async def create_posthoc_calibration_pipeline(
self,
recording_info: RecordingInfo,
- calibration_config: CalibrationPipelineConfig,
+ calibration_config: PosthocCalibrationPipelineConfig,
) -> PosthocPipeline:
pipeline = self.posthoc_pipeline_manager.create_calibration_pipeline(
recording_info=recording_info,
@@ -120,7 +105,7 @@ class FreemocapApplication:
async def create_posthoc_mocap_pipeline(
self,
recording_info: RecordingInfo,
- mocap_config: MocapPipelineConfig,
+ mocap_config: PosthocMocapPipelineConfig,
) -> PosthocPipeline:
pipeline = self.posthoc_pipeline_manager.create_mocap_pipeline(
recording_info=recording_info,
@@ -158,7 +143,7 @@ class FreemocapApplication:
def get_latest_frontend_payloads(
self,
if_newer_than: FrameNumberInt,
- ) -> dict[PipelineIdString | CameraGroupIdString, tuple[bytes, FrontendPayload | FrameNumberInt]]:
+ ) -> dict[str, tuple[bytes, int]] | dict[str, tuple[bytes | None, FrontendPayload | None]]:
# Clean up completed posthoc pipelines (releases relay threads + queues)
self.posthoc_pipeline_manager.evict_completed()
diff --git a/freemocap/app/settings.py b/freemocap/app/settings.py
index b11e141a..6313c5f0 100644
--- a/freemocap/app/settings.py
+++ b/freemocap/app/settings.py
@@ -11,12 +11,12 @@ import logging
from enum import Enum
from pydantic import BaseModel, Field
-from skellycam.core.camera.config.camera_config import CameraConfig, CameraConfigs
+from skellycam.core.camera.config.camera_config import CameraConfig
from skellycam.core.types.type_overloads import CameraIdString
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationPipelineConfig
-from freemocap.core.pipeline.pipeline_configs.mocap_task_config import MocapPipelineConfig
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
+from freemocap.core.pipeline.realtime.realtime_aggregator_node import RealtimePipelineConfig
+from freemocap.core.tasks.calibration.calibration_task_config import PosthocCalibrationPipelineConfig
+from freemocap.core.tasks.mocap.mocap_task_config import PosthocMocapPipelineConfig
logger = logging.getLogger(__name__)
@@ -49,7 +49,7 @@ class PipelineSettings(BaseModel):
class CalibrationSettings(BaseModel):
"""Calibration config + runtime status."""
- config: CalibrationPipelineConfig = Field(default_factory=CalibrationPipelineConfig)
+ config: PosthocCalibrationPipelineConfig = Field(default_factory=PosthocCalibrationPipelineConfig)
is_recording: bool = False
recording_progress: float = 0.0
last_recording_path: str | None = None
@@ -58,18 +58,12 @@ class CalibrationSettings(BaseModel):
class MocapSettings(BaseModel):
"""Motion capture config + runtime status."""
- config: MocapPipelineConfig = Field(default_factory=MocapPipelineConfig.default_realtime)
+ config: PosthocMocapPipelineConfig = Field(default_factory=PosthocMocapPipelineConfig.default_realtime)
is_recording: bool = False
recording_progress: float = 0.0
last_recording_path: str | None = None
-class VMCSettings(BaseModel):
- """VMC (Virtual Motion Capture) protocol output settings."""
- enabled: bool = False
- host: str = "127.0.0.1"
- port: int = 39539
-
# ---------------------------------------------------------------------------
# Top-level settings blob
@@ -87,7 +81,6 @@ class FreeMoCapSettings(BaseModel):
pipeline: PipelineSettings = Field(default_factory=PipelineSettings)
calibration: CalibrationSettings = Field(default_factory=CalibrationSettings)
mocap: MocapSettings = Field(default_factory=MocapSettings)
- vmc: VMCSettings = Field(default_factory=VMCSettings)
# ---------------------------------------------------------------------------
@@ -157,6 +150,7 @@ class SettingsManager:
Validates the result via Pydantic. If validation fails,
the settings are left unchanged and the error is raised.
"""
+ #TODO - Replace this raw dict intput with a Pydantic model
current = self._settings.model_dump()
merged = _deep_merge(base=current, patch=patch)
# Pydantic validates on construction β€” if this raises, settings are unchanged
@@ -216,7 +210,6 @@ class SettingsManager:
pipeline=pipeline,
calibration=calibration,
mocap=mocap,
- vmc=self._settings.vmc,
)
self.notify_changed()
diff --git a/freemocap/core/blender/export_to_blender.py b/freemocap/core/blender/export_to_blender.py
index 1f5e2f96..156d72a9 100644
--- a/freemocap/core/blender/export_to_blender.py
+++ b/freemocap/core/blender/export_to_blender.py
@@ -1,14 +1,13 @@
import inspect
import logging
import subprocess
-import sys
from pathlib import Path
from typing import Union, List
-from freemocap.core.blender.helpers.freemocap_blender_addon_helpers.run_simple import run_simple
-from freemocap.core.blender.helpers.get_best_guess_of_blender_path import get_best_guess_of_blender_path
import freemocap_blender_addon
+from freemocap.core.blender.helpers.freemocap_blender_addon_helpers.run_simple import run_simple
+from freemocap.core.blender.helpers.get_best_guess_of_blender_path import get_best_guess_of_blender_path
from freemocap.utilities.open_file import open_file
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/blender/helpers/freemocap_blender_addon_helpers/install_addon/install_blender_addon.py b/freemocap/core/blender/helpers/freemocap_blender_addon_helpers/install_addon/install_blender_addon.py
index 9909d9b8..abcbe7fc 100644
--- a/freemocap/core/blender/helpers/freemocap_blender_addon_helpers/install_addon/install_blender_addon.py
+++ b/freemocap/core/blender/helpers/freemocap_blender_addon_helpers/install_addon/install_blender_addon.py
@@ -3,11 +3,11 @@ import subprocess
from importlib.metadata import distribution
from pathlib import Path
+from freemocap_blender_addon.main import ajc27_run_as_main_function
+
from freemocap.core.blender.helpers.freemocap_blender_addon_helpers.install_addon.bpy_install_addon import \
INSTALL_ADDON_SCRIPT_PATH
from freemocap.core.blender.helpers.get_best_guess_of_blender_path import get_best_guess_of_blender_path
-from freemocap_blender_addon.main import ajc27_run_as_main_function
-
FREEMOCAP_BLENDER_ADDON_PACKAGE_NAME = "freemocap_blender_addon"
diff --git a/freemocap/core/mocap/skeleton_dewiggler/vmc_sender.py b/freemocap/core/mocap/skeleton_dewiggler/vmc_sender.py
deleted file mode 100644
index 992cf8f3..00000000
--- a/freemocap/core/mocap/skeleton_dewiggler/vmc_sender.py
+++ /dev/null
@@ -1,175 +0,0 @@
-"""
-VMC (Virtual Motion Capture) protocol sender.
-
-Broadcasts rigid body segment poses over OSC/UDP using the VMC protocol,
-enabling real-time streaming to VTuber apps (VSeeFace, VMagicMirror),
-game engines (Unity, Unreal), and other VMC-compatible receivers.
-
-Protocol reference:
- https://protocol.vmc.info/english
-
-VMC bone transforms are sent as:
- /VMC/Ext/Bone/Pos <name> <px> <py> <pz> <qx> <qy> <qz> <qw>
-
-The sender maps freemocap's mediapipe bone keys ("parent->child") to
-VRM humanoid bone names ("LeftUpperArm", "RightLowerLeg", etc.).
-
-Coordinate system conversion:
- freemocap: right-handed, Y-up (after the 180Β° X rotation)
- VMC/Unity: left-handed, Y-up
- Conversion: negate X position and negate X/Z quaternion components.
-
-Usage:
- sender = VMCSender(host="127.0.0.1", port=39539)
- sender.send(rigid_body_poses)
- sender.close()
-"""
-
-import logging
-import socket
-import struct
-
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.rigid_body_estimator import RigidBodyPose
-
-logger = logging.getLogger(__name__)
-
-
-# ---------------------------------------------------------------------------
-# Mediapipe bone key β†’ VRM humanoid bone name mapping
-# ---------------------------------------------------------------------------
-
-MEDIAPIPE_TO_VRM: dict[str, str] = {
- # Arms
- "left_shoulder->left_elbow": "LeftUpperArm",
- "left_elbow->left_wrist": "LeftLowerArm",
- "right_shoulder->right_elbow": "RightUpperArm",
- "right_elbow->right_wrist": "RightLowerArm",
- # Legs
- "left_hip->left_knee": "LeftUpperLeg",
- "left_knee->left_ankle": "LeftLowerLeg",
- "right_hip->right_knee": "RightUpperLeg",
- "right_knee->right_ankle": "RightLowerLeg",
- # Feet
- "left_ankle->left_foot_index": "LeftFoot",
- "left_ankle->left_heel": "LeftToes",
- "right_ankle->right_foot_index": "RightFoot",
- "right_ankle->right_heel": "RightToes",
-}
-
-
-# ---------------------------------------------------------------------------
-# Minimal OSC message builder (avoids dependency on python-osc)
-# ---------------------------------------------------------------------------
-
-
-def _osc_string(s: str) -> bytes:
- """Encode a string as an OSC string (null-terminated, padded to 4 bytes)."""
- encoded = s.encode("utf-8") + b"\x00"
- # Pad to multiple of 4 bytes
- padding = (4 - len(encoded) % 4) % 4
- return encoded + b"\x00" * padding
-
-
-def _osc_float(f: float) -> bytes:
- """Encode a float as an OSC float32."""
- return struct.pack(">f", f)
-
-
-def _build_bone_message(
- bone_name: str,
- px: float,
- py: float,
- pz: float,
- qx: float,
- qy: float,
- qz: float,
- qw: float,
-) -> bytes:
- """Build a single /VMC/Ext/Bone/Pos OSC message."""
- address = _osc_string("/VMC/Ext/Bone/Pos")
- type_tag = _osc_string(",sfffffff")
- payload = (
- _osc_string(bone_name)
- + _osc_float(px)
- + _osc_float(py)
- + _osc_float(pz)
- + _osc_float(qx)
- + _osc_float(qy)
- + _osc_float(qz)
- + _osc_float(qw)
- )
- return address + type_tag + payload
-
-
-def _build_bundle(messages: list[bytes], timetag: int = 1) -> bytes:
- """Build an OSC bundle containing multiple messages."""
- header = _osc_string("#bundle")
- time_bytes = struct.pack(">Q", timetag) # NTP "immediately"
- elements = b""
- for msg in messages:
- elements += struct.pack(">I", len(msg)) + msg
- return header + time_bytes + elements
-
-
-# ---------------------------------------------------------------------------
-# VMC Sender
-# ---------------------------------------------------------------------------
-
-
-class VMCSender:
- """Broadcasts rigid body poses over VMC (OSC/UDP).
-
- Converts freemocap's right-handed Y-up coordinates to VMC/Unity's
- left-handed Y-up coordinates by negating X position and X/Z quaternion
- components.
- """
-
- def __init__(self, *, host: str, port: int) -> None:
- self._host: str = host
- self._port: int = port
- self._socket: socket.socket = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
- self._socket.setblocking(False)
- logger.info(f"VMCSender initialized: {host}:{port}")
-
- def send(self, rigid_body_poses: dict[str, RigidBodyPose]) -> None:
- """Send all mappable rigid body poses as a VMC OSC bundle.
-
- Bones without a VRM mapping are silently skipped.
- """
- messages: list[bytes] = []
-
- for bone_key, pose in rigid_body_poses.items():
- vrm_name = MEDIAPIPE_TO_VRM.get(bone_key)
- if vrm_name is None:
- continue
-
- px, py, pz = pose.position
- qw, qx, qy, qz = pose.orientation
-
- # Right-handed β†’ left-handed conversion: negate X pos and X/Z quat
- msg = _build_bone_message(
- bone_name=vrm_name,
- px=-px,
- py=py,
- pz=pz,
- qx=-qx,
- qy=qy,
- qz=-qz,
- qw=qw,
- )
- messages.append(msg)
-
- if not messages:
- return
-
- bundle = _build_bundle(messages)
- try:
- self._socket.sendto(bundle, (self._host, self._port))
- except OSError as e:
- # UDP send failures are non-fatal (receiver might not be running)
- logger.debug(f"VMC send failed: {e}")
-
- def close(self) -> None:
- """Close the UDP socket."""
- self._socket.close()
- logger.info(f"VMCSender closed: {self._host}:{self._port}")
diff --git a/freemocap/api/udp/__init__.py b/freemocap/core/pipeline/abcs/__init__.py
similarity index 100%
rename from freemocap/api/udp/__init__.py
rename to freemocap/core/pipeline/abcs/__init__.py
diff --git a/freemocap/core/pipeline/abcs/aggregator_node_abc.py b/freemocap/core/pipeline/abcs/aggregator_node_abc.py
new file mode 100644
index 00000000..36a65aa0
--- /dev/null
+++ b/freemocap/core/pipeline/abcs/aggregator_node_abc.py
@@ -0,0 +1,6 @@
+from freemocap.core.pipeline.abcs.base_node_abc import BaseNode
+
+
+class AggregatorNode(BaseNode):
+ # TODO - Extract shared stuff (posthoc_aggregator, realtime_aggregator, and their children)
+ pass
diff --git a/freemocap/core/pipeline/base_node.py b/freemocap/core/pipeline/abcs/base_node_abc.py
similarity index 100%
rename from freemocap/core/pipeline/base_node.py
rename to freemocap/core/pipeline/abcs/base_node_abc.py
diff --git a/freemocap/core/pipeline/abcs/pipeline_abc.py b/freemocap/core/pipeline/abcs/pipeline_abc.py
new file mode 100644
index 00000000..f955c999
--- /dev/null
+++ b/freemocap/core/pipeline/abcs/pipeline_abc.py
@@ -0,0 +1,6 @@
+from abc import ABC
+
+
+class PipelineABC(ABC):
+ # TODO - extract shared stuff from posthoc/realtime pipelines
+ pass
diff --git a/freemocap/core/pipeline/pipeline_ipc.py b/freemocap/core/pipeline/abcs/pipeline_ipc.py
similarity index 100%
rename from freemocap/core/pipeline/pipeline_ipc.py
rename to freemocap/core/pipeline/abcs/pipeline_ipc.py
diff --git a/freemocap/core/pipeline/abcs/pipeline_manager_abc.py b/freemocap/core/pipeline/abcs/pipeline_manager_abc.py
new file mode 100644
index 00000000..c35db2b8
--- /dev/null
+++ b/freemocap/core/pipeline/abcs/pipeline_manager_abc.py
@@ -0,0 +1,6 @@
+from abc import ABC
+
+
+class PipelineManagerABC(ABC):
+ # TODO - extract shared stuff from posthoc/realtime pipeline managers
+ pass
diff --git a/freemocap/core/pipeline/abcs/source_node_abc.py b/freemocap/core/pipeline/abcs/source_node_abc.py
new file mode 100644
index 00000000..221c40e7
--- /dev/null
+++ b/freemocap/core/pipeline/abcs/source_node_abc.py
@@ -0,0 +1,6 @@
+from freemocap.core.pipeline.abcs.base_node_abc import BaseNode
+
+
+class SourceNode(BaseNode):
+ # TODO - Extract shared stuff between source nodes (e.g. camera node, video node)
+ pass
diff --git a/freemocap/core/pipeline/posthoc/posthoc_aggregation_node.py b/freemocap/core/pipeline/posthoc/posthoc_aggregation_node.py
index 0fe15fd0..44cd1637 100644
--- a/freemocap/core/pipeline/posthoc/posthoc_aggregation_node.py
+++ b/freemocap/core/pipeline/posthoc/posthoc_aggregation_node.py
@@ -26,15 +26,14 @@ from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.recorders.videos.recording_info import RecordingInfo
from skellycam.core.types.type_overloads import TopicSubscriptionQueue
-from freemocap.core.pipeline.base_node import BaseNode
-from freemocap.core.pipeline.pipeline_ipc import PipelineIPC
+from freemocap.core.pipeline.abcs.aggregator_node_abc import AggregatorNode
+from freemocap.core.pipeline.abcs.pipeline_ipc import PipelineIPC
from freemocap.core.pipeline.posthoc.video_group_helper import VideoMetadata
from freemocap.core.types.type_overloads import PipelineIdString, FrameNumberInt, VideoIdString
from freemocap.pubsub.pubsub_manager import PubSubTopicManager
from freemocap.pubsub.pubsub_topics import (
VideoNodeOutputMessage,
VideoNodeOutputTopic,
- PosthocProgressTopic,
)
from freemocap.utilities.wait_functions import wait_1ms
@@ -44,7 +43,7 @@ PosthocAggregationNodeTaskFn = Callable[..., None]
@dataclass
-class PosthocAggregationNode(BaseNode):
+class PosthocAggregationNode(AggregatorNode):
@classmethod
def create(
diff --git a/freemocap/core/pipeline/posthoc/posthoc_pipeline.py b/freemocap/core/pipeline/posthoc/posthoc_pipeline.py
index aeae2f09..04b5fe72 100644
--- a/freemocap/core/pipeline/posthoc/posthoc_pipeline.py
+++ b/freemocap/core/pipeline/posthoc/posthoc_pipeline.py
@@ -11,17 +11,16 @@ naturally when their work is done.
"""
import logging
import multiprocessing
-import sys
-import time
import uuid
from dataclasses import dataclass
from pathlib import Path
-from typing import ClassVar
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.recorders.videos.recording_info import RecordingInfo
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseDetectorConfig
-from freemocap.core.pipeline.pipeline_ipc import PipelineIPC
+
+from freemocap.core.pipeline.abcs.pipeline_abc import PipelineABC
+from freemocap.core.pipeline.abcs.pipeline_ipc import PipelineIPC
from freemocap.core.pipeline.posthoc.posthoc_aggregation_node import PosthocAggregationNode, \
PosthocAggregationNodeTaskFn
from freemocap.core.pipeline.posthoc.video_group_helper import VideoGroupHelper
@@ -33,7 +32,7 @@ logger = logging.getLogger(__name__)
@dataclass
-class PosthocPipeline:
+class PosthocPipeline(PipelineABC):
"""
Generic posthoc pipeline: video nodes β†’ aggregation node β†’ task function.
diff --git a/freemocap/core/pipeline/posthoc/posthoc_pipeline_manager.py b/freemocap/core/pipeline/posthoc/posthoc_pipeline_manager.py
index 1eda65af..ae051d5f 100644
--- a/freemocap/core/pipeline/posthoc/posthoc_pipeline_manager.py
+++ b/freemocap/core/pipeline/posthoc/posthoc_pipeline_manager.py
@@ -16,18 +16,19 @@ from dataclasses import dataclass, field
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.recorders.videos.recording_info import RecordingInfo
-from freemocap.core.calibration.calibration_task import run_calibration_task
-from freemocap.core.mocap.posthoc_mocap_task import run_post_mocap_aggregation_task
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationPipelineConfig
-from freemocap.core.pipeline.pipeline_configs.mocap_task_config import MocapPipelineConfig
+from freemocap.core.pipeline.abcs.pipeline_manager_abc import PipelineManagerABC
from freemocap.core.pipeline.posthoc.posthoc_pipeline import PosthocPipeline
+from freemocap.core.tasks.calibration.calibration_task_config import PosthocCalibrationPipelineConfig
+from freemocap.core.tasks.calibration.posthoc_calibration_task import run_posthoc_calibration_task
+from freemocap.core.tasks.mocap.mocap_task_config import PosthocMocapPipelineConfig
+from freemocap.core.tasks.mocap.posthoc_mocap_task import run_posthoc_mocap_aggregator_task
from freemocap.core.types.type_overloads import PipelineIdString
logger = logging.getLogger(__name__)
@dataclass
-class PosthocPipelineManager:
+class PosthocPipelineManager(PipelineManagerABC):
"""
Manages fire-and-forget posthoc pipelines.
@@ -82,10 +83,10 @@ class PosthocPipelineManager:
self,
*,
recording_info: RecordingInfo,
- calibration_config: CalibrationPipelineConfig,
+ calibration_config: PosthocCalibrationPipelineConfig,
) -> PosthocPipeline:
calibration_aggregation_task_fn = functools.partial(
- run_calibration_task,
+ run_posthoc_calibration_task,
task_config=calibration_config,
)
pipeline = PosthocPipeline.create(
@@ -109,11 +110,11 @@ class PosthocPipelineManager:
self,
*,
recording_info: RecordingInfo,
- mocap_config: MocapPipelineConfig,
+ mocap_config: PosthocMocapPipelineConfig,
start_pipeline: bool = True,
) -> PosthocPipeline:
mocap_task_fn = functools.partial(
- run_post_mocap_aggregation_task,
+ run_posthoc_mocap_aggregator_task,
task_config=mocap_config,
)
pipeline = PosthocPipeline.create(
diff --git a/freemocap/core/pipeline/posthoc/video_group_helper.py b/freemocap/core/pipeline/posthoc/video_group_helper.py
index 6374eebf..d4c711c1 100644
--- a/freemocap/core/pipeline/posthoc/video_group_helper.py
+++ b/freemocap/core/pipeline/posthoc/video_group_helper.py
@@ -10,7 +10,7 @@ import cv2
import numpy as np
from pydantic import BaseModel, Field, ConfigDict, model_validator
-from freemocap.core.calibration.shared.camera_to_video_identity_matcher import camera_ids_from_video_paths
+from freemocap.core.tasks.calibration.shared.camera_to_video_identity_matcher import camera_ids_from_video_paths
from freemocap.core.types.type_overloads import VideoIdString
# Module level constants
diff --git a/freemocap/core/pipeline/posthoc/video_node.py b/freemocap/core/pipeline/posthoc/video_node.py
index 72405bd7..f9172449 100644
--- a/freemocap/core/pipeline/posthoc/video_node.py
+++ b/freemocap/core/pipeline/posthoc/video_node.py
@@ -19,8 +19,8 @@ from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseDetectorConfig
from skellytracker.trackers.base_tracker.helpers import create_detector_from_config, create_annotator_from_config
-from freemocap.core.pipeline.base_node import BaseNode
-from freemocap.core.pipeline.pipeline_ipc import PipelineIPC
+from freemocap.core.pipeline.abcs.pipeline_ipc import PipelineIPC
+from freemocap.core.pipeline.abcs.source_node_abc import SourceNode
from freemocap.core.types.type_overloads import VideoIdString, TopicPublicationQueue
from freemocap.pubsub.pubsub_manager import PubSubTopicManager
from freemocap.pubsub.pubsub_topics import VideoNodeOutputTopic, VideoNodeOutputMessage
@@ -31,7 +31,7 @@ ANNOTATED_VIDEOS_FOLDER_NAME = "annotated_videos"
@dataclass
-class VideoNode(BaseNode):
+class VideoNode(SourceNode):
video_id: VideoIdString
video_path: Path
diff --git a/freemocap/core/pipeline/realtime/realtime_camera_node.py b/freemocap/core/pipeline/realtime/camera_node.py
similarity index 82%
rename from freemocap/core/pipeline/realtime/realtime_camera_node.py
rename to freemocap/core/pipeline/realtime/camera_node.py
index f3775f46..8966ac5b 100644
--- a/freemocap/core/pipeline/realtime/realtime_camera_node.py
+++ b/freemocap/core/pipeline/realtime/camera_node.py
@@ -8,16 +8,18 @@ Runs indefinitely until shutdown. Responds to pipeline config updates
import logging
import multiprocessing
from dataclasses import dataclass
+from typing import TYPE_CHECKING
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.ipc.shared_memory.camera_shared_memory_ring_buffer import CameraSharedMemoryRingBuffer
from skellycam.core.ipc.shared_memory.ring_buffer_shared_memory import SharedMemoryRingBufferDTO
from skellycam.core.types.type_overloads import CameraIdString, TopicSubscriptionQueue
from skellycam.utilities.wait_functions import wait_1ms
+from skellytracker.trackers.legacy_mediapipe_tracker.legacy_mediapipe_detector import LegacyMediapipeDetector
-from freemocap.core.pipeline.base_node import BaseNode
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
-from freemocap.core.pipeline.pipeline_ipc import PipelineIPC
+from freemocap.core.pipeline.abcs.pipeline_ipc import PipelineIPC
+from freemocap.core.pipeline.abcs.source_node_abc import SourceNode
+from freemocap.core.pipeline.realtime.camera_node_config import CameraNodeConfig
from freemocap.core.types.type_overloads import TopicPublicationQueue
from freemocap.pubsub.pubsub_manager import PubSubTopicManager
from freemocap.pubsub.pubsub_topics import (
@@ -28,7 +30,6 @@ from freemocap.pubsub.pubsub_topics import (
ProcessFrameNumberMessage,
CameraNodeOutputMessage,
)
-from typing import TYPE_CHECKING
if TYPE_CHECKING:
import numpy as np
@@ -37,8 +38,8 @@ logger = logging.getLogger(__name__)
@dataclass
-class RealtimeCameraNode(BaseNode):
- camera_id: CameraIdString
+class CameraNode(SourceNode):
+ camera_id:CameraIdString
@classmethod
def create(
@@ -47,10 +48,10 @@ class RealtimeCameraNode(BaseNode):
camera_id: CameraIdString,
camera_shm_dto: SharedMemoryRingBufferDTO,
worker_registry: WorkerRegistry,
- config: RealtimePipelineConfig,
+ config: CameraNodeConfig,
ipc: PipelineIPC,
pubsub: PubSubTopicManager,
- ) -> "RealtimeCameraNode":
+ ) -> "CameraNode":
shutdown_self_flag, worker = cls._create_worker(
target=cls._run,
name=f"RealtimeCameraNode-{camera_id}",
@@ -83,7 +84,7 @@ class RealtimeCameraNode(BaseNode):
*,
camera_id: CameraIdString,
ipc: PipelineIPC,
- config: RealtimePipelineConfig,
+ config: CameraNodeConfig,
process_frame_number_sub: TopicSubscriptionQueue,
pipeline_config_sub: TopicSubscriptionQueue,
camera_output_pub: TopicPublicationQueue,
@@ -92,7 +93,6 @@ class RealtimeCameraNode(BaseNode):
) -> None:
import cv2
from skellytracker.trackers.charuco_tracker.charuco_detector import CharucoDetector
- from skellytracker.trackers.mediapipe_tracker import MediapipeDetector
logger.debug(f"RealtimeCameraNode [{camera_id}] initializing")
camera_shm = CameraSharedMemoryRingBuffer.recreate(
@@ -101,15 +101,15 @@ class RealtimeCameraNode(BaseNode):
)
charuco_detector: CharucoDetector | None = None
- mediapipe_detector: MediapipeDetector | None = None
+ mediapipe_detector: LegacyMediapipeDetector | None = None
- if config.calibration_detection_enabled:
+ if config.charuco_tracking_enabled and config.charuco_detector_config is not None:
charuco_detector = CharucoDetector.create(
- config=config.calibration_config.detector_config,
+ config=config.charuco_detector_config,
)
- if config.mocap_detection_enabled:
- mediapipe_detector = MediapipeDetector.create(
- config=config.mocap_config.detector_config ,
+ if config.skeleton_tracking_enabled and config.skeleton_detector_config is not None:
+ mediapipe_detector = LegacyMediapipeDetector.create(
+ config=config.skeleton_detector_config ,
)
frame_rec_array: np.recarray | None = None
@@ -122,19 +122,19 @@ class RealtimeCameraNode(BaseNode):
# ---- Handle config updates ----
while not pipeline_config_sub.empty():
update_msg: PipelineConfigUpdateMessage = pipeline_config_sub.get()
- new_config = update_msg.pipeline_config
+ new_config:CameraNodeConfig = update_msg.pipeline_config.camera_node_config
logger.debug(f"RealtimeCameraNode [{camera_id}] received config update")
- if new_config.calibration_detection_enabled and charuco_detector is None:
+ if new_config.charuco_tracking_enabled and new_config.charuco_detector_config is not None:
charuco_detector = CharucoDetector.create(
- config=new_config.calibration_config.detector_config,
+ config=new_config.charuco_detector_config,
)
- elif not new_config.calibration_detection_enabled:
+ elif not new_config.charuco_tracking_enabled:
charuco_detector = None
- if new_config.mocap_detection_enabled and mediapipe_detector is None:
- mediapipe_detector = MediapipeDetector.create(
- config=new_config.mocap_config.detector_config,
+ if new_config.skeleton_tracking_enabled and new_config.skeleton_detector_config is not None:
+ mediapipe_detector = LegacyMediapipeDetector.create(
+ config=new_config.skeleton_detector_config,
)
elif not new_config.mocap_detection_enabled:
mediapipe_detector = None
diff --git a/freemocap/core/pipeline/realtime/camera_node_config.py b/freemocap/core/pipeline/realtime/camera_node_config.py
new file mode 100644
index 00000000..15a8676b
--- /dev/null
+++ b/freemocap/core/pipeline/realtime/camera_node_config.py
@@ -0,0 +1,14 @@
+from pydantic import BaseModel, Field
+from skellytracker.trackers.charuco_tracker.charuco_tracker_config import CharucoDetectorConfig
+from skellytracker.trackers.legacy_mediapipe_tracker import LegacyMediapipeDetectorConfig
+
+
+class CameraNodeConfig(BaseModel):
+ charuco_tracking_enabled: bool = True
+ skeleton_tracking_enabled: bool = True
+ charuco_detector_config: CharucoDetectorConfig|None = Field(default_factory=CharucoDetectorConfig)
+ skeleton_detector_config: LegacyMediapipeDetectorConfig|None = Field(default_factory=LegacyMediapipeDetectorConfig)
+
+ @property
+ def tracking2d_enabled(self) -> bool:
+ return self.charuco_tracking_enabled or self.skeleton_tracking_enabled
diff --git a/freemocap/core/pipeline/realtime/realtime_aggregation_node.py b/freemocap/core/pipeline/realtime/realtime_aggregator_node.py
similarity index 71%
rename from freemocap/core/pipeline/realtime/realtime_aggregation_node.py
rename to freemocap/core/pipeline/realtime/realtime_aggregator_node.py
index b07c6643..d82cf09a 100644
--- a/freemocap/core/pipeline/realtime/realtime_aggregation_node.py
+++ b/freemocap/core/pipeline/realtime/realtime_aggregator_node.py
@@ -21,28 +21,31 @@ import logging
import multiprocessing
import time
from dataclasses import dataclass
+from typing import Iterable
import numpy as np
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
-from skellyforge.data_models.trajectory_3d import Point3d
from skellycam.core.ipc.shared_memory.camera_group_shared_memory import (
CameraGroupSharedMemory,
CameraGroupSharedMemoryDTO,
)
from skellycam.core.types.type_overloads import CameraGroupIdString, CameraIdString, TopicSubscriptionQueue
from skellycam.utilities.wait_functions import wait_1ms
+from skellyforge.data_models.trajectory_3d import Point3d
-from freemocap.core.calibration.shared.calibration_state import CalibrationStateTracker
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import AnthropometricPrior
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import SkeletonDefinition
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.realtime_point_gate import RealtimePointGate, GateResult
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.rigid_body_estimator import estimate_rigid_bodies, RigidBodyPose
-from freemocap.core.mocap.skeleton_dewiggler.realtime_skeleton_filter import RealtimeFilterConfig, \
+from freemocap.core.pipeline.abcs.aggregator_node_abc import AggregatorNode
+from freemocap.core.pipeline.abcs.pipeline_ipc import PipelineIPC
+from freemocap.core.pipeline.realtime.realtime_aggregator_node_config import RealtimeAggregatorNodeConfig
+from freemocap.core.pipeline.realtime.realtime_pipeline_config import RealtimePipelineConfig
+from freemocap.core.tasks.calibration.shared.calibration_state import CalibrationStateTracker
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import AnthropometricPrior
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import \
+ SkeletonDefinition
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.realtime_point_gate import RealtimePointGate, \
+ GateResult
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.rigid_body_estimator import RigidBodyPose
+from freemocap.core.tasks.mocap.skeleton_dewiggler.realtime_skeleton_filter import RealtimeFilterConfig, \
RealtimeSkeletonFilter, FilterResult
-
-from freemocap.core.pipeline.base_node import BaseNode
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
-from freemocap.core.pipeline.pipeline_ipc import PipelineIPC
from freemocap.core.types.type_overloads import TopicPublicationQueue
from freemocap.pubsub.pubsub_manager import PubSubTopicManager
from freemocap.pubsub.pubsub_topics import (
@@ -63,9 +66,9 @@ CALIBRATION_POLL_INTERVAL_SECONDS: float = 1.0
def _merge_triangulated_arrays(
- *,
- triangulated: dict[str, np.ndarray] | None,
- into: dict[str, np.ndarray],
+ *,
+ triangulated: dict[str, np.ndarray] | None,
+ into: dict[str, np.ndarray],
) -> None:
"""Merge triangulated 3D point arrays into the output dict, skipping NaN entries."""
if triangulated is None:
@@ -90,8 +93,8 @@ def _arrays_to_point3d(arrays: dict[str, np.ndarray]) -> dict[str, Point3d]:
def _create_skeleton_filter(
- *,
- filter_config: RealtimeFilterConfig,
+ *,
+ filter_config: RealtimeFilterConfig,
) -> RealtimeSkeletonFilter:
"""Create the skeleton filter with mediapipe body skeleton and anthropometric prior."""
skeleton = SkeletonDefinition.mediapipe_body()
@@ -104,10 +107,10 @@ def _create_skeleton_filter(
def _filter_skeleton_arrays(
- *,
- point_arrays: dict[str, np.ndarray],
- skeleton_filter: RealtimeSkeletonFilter,
- t: float,
+ *,
+ point_arrays: dict[str, np.ndarray],
+ skeleton_filter: RealtimeSkeletonFilter,
+ t: float,
) -> dict[str, np.ndarray]:
"""
Run the skeleton filter on triangulated point arrays, returning filtered results.
@@ -146,26 +149,26 @@ def _filter_skeleton_arrays(
@dataclass
-class RealtimeAggregationNode(BaseNode):
+class RealtimeAggregatorNode(AggregatorNode):
@classmethod
def create(
- cls,
- *,
- config: RealtimePipelineConfig,
- camera_group_id: CameraGroupIdString,
- worker_registry: WorkerRegistry,
- camera_group_shm_dto: CameraGroupSharedMemoryDTO,
- ipc: PipelineIPC,
- pubsub: PubSubTopicManager,
- ) -> "RealtimeAggregationNode":
+ cls,
+ *,
+ config: RealtimePipelineConfig,
+ camera_group_id: CameraGroupIdString,
+ worker_registry: WorkerRegistry,
+ camera_group_shm_dto: CameraGroupSharedMemoryDTO,
+ ipc: PipelineIPC,
+ pubsub: PubSubTopicManager,
+ ) -> "RealtimeAggregatorNode":
shutdown_self_flag, worker = cls._create_worker(
target=cls._run,
name=f"CameraGroup-{camera_group_id}-AggregationNode",
worker_registry=worker_registry,
log_queue=ipc.ws_queue,
kwargs=dict(
- config=config,
+ pipeline_config=config,
camera_group_id=camera_group_id,
ipc=ipc,
camera_group_shm_dto=camera_group_shm_dto,
@@ -190,19 +193,20 @@ class RealtimeAggregationNode(BaseNode):
@staticmethod
def _run(
- *,
- config: RealtimePipelineConfig,
- camera_group_id: CameraGroupIdString,
- ipc: PipelineIPC,
- shutdown_self_flag: multiprocessing.Value,
- camera_group_shm_dto: CameraGroupSharedMemoryDTO,
- camera_node_sub: TopicSubscriptionQueue,
- pipeline_config_sub: TopicSubscriptionQueue,
- process_frame_number_pub: TopicPublicationQueue,
- aggregation_output_pub: TopicPublicationQueue,
+ *,
+ pipeline_config: RealtimePipelineConfig,
+ camera_group_id: CameraGroupIdString,
+ ipc: PipelineIPC,
+ shutdown_self_flag: multiprocessing.Value,
+ camera_group_shm_dto: CameraGroupSharedMemoryDTO,
+ camera_node_sub: TopicSubscriptionQueue,
+ pipeline_config_sub: TopicSubscriptionQueue,
+ process_frame_number_pub: TopicPublicationQueue,
+ aggregation_output_pub: TopicPublicationQueue,
) -> None:
logger.debug(f"RealtimeAggregationNode [{camera_group_id}] initializing")
-
+ camera_ids = pipeline_config.camera_ids
+ aggregator_config = pipeline_config.aggregator_config
camera_group_shm = CameraGroupSharedMemory.recreate(
shm_dto=camera_group_shm_dto,
read_only=True,
@@ -220,7 +224,7 @@ class RealtimeAggregationNode(BaseNode):
)
# Initialize skeleton filter for 3D smoothing + bone length constraint
- filter_config = config.mocap_config.realtime_filter_config
+ filter_config = aggregator_config.realtime_filter_config
skeleton_filter = _create_skeleton_filter(filter_config=filter_config)
# Initialize velocity gate for rejecting teleportation spikes
@@ -230,11 +234,15 @@ class RealtimeAggregationNode(BaseNode):
)
camera_node_outputs: dict[CameraIdString, CameraNodeOutputMessage | None] = {
- cam_id: None for cam_id in config.camera_configs.keys()
+ cam_id: None for cam_id in camera_ids
}
latest_requested_frame: int = -1
last_received_frame: int = -1
last_calibration_poll: float = time.monotonic()
+ raw_keypoints: dict[str, np.ndarray] = {}
+ filtered_keypoints: dict[str, np.ndarray] = {}
+ skeleton_keypoints: dict[str, np.ndarray] = {}
+ rigid_body_poses: dict[str, RigidBodyPose] = {}
try:
previous_tik = time.perf_counter()
@@ -245,8 +253,9 @@ class RealtimeAggregationNode(BaseNode):
# ---- Handle config updates ----
while not pipeline_config_sub.empty():
msg: PipelineConfigUpdateMessage = pipeline_config_sub.get()
- config = msg.pipeline_config
- filter_config = config.mocap_config.realtime_filter_config
+ pipeline_config = msg.pipeline_config
+ aggregator_config = pipeline_config.aggregator_config
+ filter_config = aggregator_config.realtime_filter_config
logger.info(
f"RealtimeAggregationNode [{camera_group_id}] received config update"
)
@@ -286,17 +295,17 @@ class RealtimeAggregationNode(BaseNode):
continue
cam_output: CameraNodeOutputMessage = camera_node_sub.get()
- if cam_output.camera_id not in config.camera_configs:
+ if cam_output.camera_id not in camera_ids:
raise ValueError(
f"Camera ID {cam_output.camera_id} not in "
- f"camera IDs {list(config.camera_configs.keys())}"
+ f"camera IDs {list(camera_ids)}"
)
camera_node_outputs[cam_output.camera_id] = cam_output
# ---- Check if all cameras reported for this frame ----
if not all(
- isinstance(v, CameraNodeOutputMessage)
- for v in camera_node_outputs.values()
+ isinstance(v, CameraNodeOutputMessage)
+ for v in camera_node_outputs.values()
):
continue
@@ -316,16 +325,14 @@ class RealtimeAggregationNode(BaseNode):
# ---- Triangulate and process if calibration is valid ----
# All processing stays in dict[str, ndarray] until final
# conversion to Point3d for the output message.
- point_arrays: dict[str, np.ndarray] = {}
- rigid_body_poses: dict[str, RigidBodyPose] = {}
- if calibration.is_valid:
+ if calibration.is_valid and aggregator_config.triangulation_enabled:
# Triangulate mediapipe observations
mediapipe_observations_by_camera = {
cam_id: output.mediapipe_observation
for cam_id, output in camera_node_outputs.items()
if isinstance(output, CameraNodeOutputMessage)
- and output.mediapipe_observation is not None
+ and output.mediapipe_observation is not None
}
if mediapipe_observations_by_camera:
_merge_triangulated_arrays(
@@ -334,7 +341,7 @@ class RealtimeAggregationNode(BaseNode):
frame_observations_by_camera=mediapipe_observations_by_camera,
max_reprojection_error_px=filter_config.max_reprojection_error_px,
),
- into=point_arrays,
+ into=raw_keypoints,
)
# Triangulate charuco observations
@@ -342,7 +349,7 @@ class RealtimeAggregationNode(BaseNode):
cam_id: output.charuco_observation
for cam_id, output in camera_node_outputs.items()
if isinstance(output, CameraNodeOutputMessage)
- and output.charuco_observation is not None
+ and output.charuco_observation is not None
}
if charuco_observations_by_camera:
_merge_triangulated_arrays(
@@ -351,54 +358,59 @@ class RealtimeAggregationNode(BaseNode):
frame_observations_by_camera=charuco_observations_by_camera,
max_reprojection_error_px=filter_config.max_reprojection_error_px,
),
- into=point_arrays,
+ into=raw_keypoints,
)
# Velocity gate: reject teleportation spikes
- if point_arrays:
- gate_result: GateResult = point_gate.gate(
- t=time.monotonic(),
- points=point_arrays,
- )
- point_arrays = dict(gate_result.positions)
-
- # Filter + constrain skeleton keypoints
- if point_arrays:
- point_arrays = _filter_skeleton_arrays(
- point_arrays=point_arrays,
- skeleton_filter=skeleton_filter,
- t=time.monotonic(),
- )
-
- # Estimate rigid body segment poses
- if point_arrays and skeleton_filter.current_bone_lengths:
- rigid_body_poses = estimate_rigid_bodies(
- positions=point_arrays,
- skeleton=skeleton_filter.skeleton,
- bone_lengths=skeleton_filter.current_bone_lengths,
- )
+ if aggregator_config.filter_enabled:
+ if raw_keypoints:
+ gate_result: GateResult = point_gate.gate(
+ t=time.monotonic(),
+ points=raw_keypoints,
+ )
+ _merge_triangulated_arrays(
+ triangulated=gate_result.positions,
+ into=filtered_keypoints,
+ )
+
+ # # Filter + constrain skeleton keypoints
+ # if filtered_keypoints and config.skeleton_enabled:
+ # filtered_keypoints = _filter_skeleton_arrays(
+ # point_arrays=filtered_keypoints,
+ # skeleton_filter=skeleton_filter,
+ # t=time.monotonic(),
+ # )
+
+ # # Estimate rigid body segment poses
+ # if filtered_keypoints and config.skeleton_enabled and skeleton_filter.current_bone_lengths:
+ # skeleton_trajectories = estimate_rigid_bodies(
+ # positions=filtered_keypoints,
+ # skeleton=skeleton_filter.skeleton,
+ # bone_lengths=skeleton_filter.current_bone_lengths,
+ # )
# Convert to Point3d once at the end for the output message
- tracked_points3d: dict[str, Point3d] = _arrays_to_point3d(point_arrays)
+
now = time.perf_counter()
loop_time = now - previous_tik
previous_tik = now
- logger.trace(f"RealtimeAggregationNode [{camera_group_id}] loop time: {loop_time*1e3:.3f} ms")
+ # logger.trace(f"RealtimeAggregationNode [{camera_group_id}] loop time: {loop_time*1e3:.3f} ms")
# ---- Publish aggregated output ----
aggregation_output_pub.put(
AggregationNodeOutputMessage(
frame_number=latest_requested_frame,
pipeline_id=ipc.pipeline_id,
+ pipeline_config=pipeline_config,
camera_group_id=camera_group_id,
- pipeline_config=config,
camera_node_outputs=camera_node_outputs,
- tracked_points3d=tracked_points3d,
- rigid_body_poses=rigid_body_poses,
+ raw_keypoints=_arrays_to_point3d(raw_keypoints),
+ filtered_keypoints=_arrays_to_point3d(filtered_keypoints),
+ # rigid_body_poses=rigid_body_poses,
),
)
- camera_node_outputs = {cam_id: None for cam_id in config.camera_configs.keys()}
+ camera_node_outputs = {cam_id: None for cam_id in pipeline_config.camera_configs.keys()}
except Exception as e:
logger.error(
diff --git a/freemocap/core/pipeline/realtime/realtime_aggregator_node_config.py b/freemocap/core/pipeline/realtime/realtime_aggregator_node_config.py
new file mode 100644
index 00000000..c8a674b8
--- /dev/null
+++ b/freemocap/core/pipeline/realtime/realtime_aggregator_node_config.py
@@ -0,0 +1,22 @@
+from pydantic import BaseModel, Field
+
+from freemocap.core.tasks.calibration.calibration_task_config import CalibrationSource
+from freemocap.core.tasks.mocap.skeleton_dewiggler.realtime_skeleton_filter import RealtimeFilterConfig
+
+
+class RealtimeAggregatorNodeConfig(BaseModel):
+ calibration_toml_source:CalibrationSource = Field(
+ default=CalibrationSource.MOST_RECENT,
+ alias="calibrationTomlSource",
+ description="How to select the calibration TOML for this node: 'most_recent' uses the latest successful calibration, 'specified' uses calibrationTomlPath.",
+ )
+ calibration_toml_path: str | None = Field(
+ default=None,
+ alias="calibrationTomlPath",
+ description="Path to calibration TOML. Only used when calibrationTomlSource is 'specified'.",
+ )
+ triangulation_enabled: bool = True
+ filter_enabled: bool = False
+ skeleton_enabled: bool = True
+
+ realtime_filter_config: RealtimeFilterConfig = Field(default_factory=RealtimeFilterConfig)
diff --git a/freemocap/core/pipeline/realtime/realtime_pipeline.py b/freemocap/core/pipeline/realtime/realtime_pipeline.py
index c1981b9a..c83c88b3 100644
--- a/freemocap/core/pipeline/realtime/realtime_pipeline.py
+++ b/freemocap/core/pipeline/realtime/realtime_pipeline.py
@@ -11,6 +11,7 @@ calibration) is NOT here β€” it belongs in the PipelineManager or route handlers
import logging
import uuid
from dataclasses import dataclass
+from typing import Any
from pydantic import BaseModel, ConfigDict
from skellycam.core.camera.config.camera_config import CameraConfigs
@@ -18,12 +19,12 @@ from skellycam.core.camera_group.camera_group import CameraGroup
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.types.type_overloads import CameraIdString, CameraGroupIdString
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
-from freemocap.core.pipeline.pipeline_ipc import PipelineIPC
-from freemocap.core.pipeline.realtime.realtime_aggregation_node import RealtimeAggregationNode
-from freemocap.core.pipeline.realtime.realtime_camera_node import RealtimeCameraNode
-from freemocap.core.viz.frontend_payload import FrontendPayload
+from freemocap.core.pipeline.abcs.pipeline_ipc import PipelineIPC
+from freemocap.core.pipeline.realtime.camera_node import CameraNode
+from freemocap.core.pipeline.realtime.realtime_aggregator_node import RealtimeAggregatorNode
+from freemocap.core.pipeline.realtime.realtime_pipeline_config import RealtimePipelineConfig
from freemocap.core.types.type_overloads import PipelineIdString, TopicSubscriptionQueue, FrameNumberInt
+from freemocap.core.viz.frontend_payload import FrontendPayload
from freemocap.pubsub.pubsub_manager import PubSubTopicManager
from freemocap.pubsub.pubsub_topics import (
AggregationNodeOutputTopic,
@@ -49,8 +50,8 @@ class RealtimePipeline:
id: PipelineIdString
camera_group: CameraGroup
config: RealtimePipelineConfig
- camera_nodes: dict[CameraIdString, RealtimeCameraNode]
- aggregation_node: RealtimeAggregationNode
+ camera_nodes: dict[CameraIdString, CameraNode]
+ aggregation_node: RealtimeAggregatorNode
aggregation_output_subscription: TopicSubscriptionQueue
ipc: PipelineIPC
pubsub: PubSubTopicManager
@@ -96,18 +97,18 @@ class RealtimePipeline:
)
camera_nodes = {
- camera_id: RealtimeCameraNode.create(
+ camera_id: CameraNode.create(
camera_id=camera_id,
worker_registry=worker_registry,
camera_shm_dto=camera_group.shm.to_dto().camera_shm_dtos[camera_id],
- config=pipeline_config,
+ config=pipeline_config.camera_node_config,
ipc=ipc,
pubsub=pubsub,
)
for camera_id in camera_group.configs.keys()
}
- aggregation_node = RealtimeAggregationNode.create(
+ aggregation_node = RealtimeAggregatorNode.create(
camera_group_id=camera_group.id,
worker_registry=worker_registry,
camera_group_shm_dto=camera_group.shm.to_dto(),
@@ -187,7 +188,7 @@ class RealtimePipeline:
def get_latest_frontend_payload(
self,
if_newer_than: FrameNumberInt,
- ) -> tuple[bytes, FrontendPayload | None] | None:
+ ) -> None | tuple[Any, None] | tuple[bytes | None, FrontendPayload]:
"""
Drain the aggregation output queue and return the latest payload.
Returns None if no new data is available.
diff --git a/freemocap/core/pipeline/pipeline_configs/realtime_pipeline_config.py b/freemocap/core/pipeline/realtime/realtime_pipeline_config.py
similarity index 50%
rename from freemocap/core/pipeline/pipeline_configs/realtime_pipeline_config.py
rename to freemocap/core/pipeline/realtime/realtime_pipeline_config.py
index 22a3b551..75543791 100644
--- a/freemocap/core/pipeline/pipeline_configs/realtime_pipeline_config.py
+++ b/freemocap/core/pipeline/realtime/realtime_pipeline_config.py
@@ -2,21 +2,19 @@ from pydantic import BaseModel, Field
from skellycam.core.camera.config.camera_config import CameraConfigs
from skellycam.core.types.type_overloads import CameraIdString
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationPipelineConfig
-from freemocap.core.pipeline.pipeline_configs.mocap_task_config import MocapPipelineConfig
+from freemocap.core.pipeline.realtime.camera_node_config import CameraNodeConfig
+from freemocap.core.pipeline.realtime.realtime_aggregator_node_config import RealtimeAggregatorNodeConfig
class RealtimePipelineConfig(BaseModel):
camera_configs: CameraConfigs
- calibration_config: CalibrationPipelineConfig = Field(
- default_factory=CalibrationPipelineConfig,
+ camera_node_config: CameraNodeConfig = Field(
+ default_factory=CameraNodeConfig,
)
- mocap_config: MocapPipelineConfig = Field(
- default_factory=MocapPipelineConfig.default_realtime,
+ aggregator_config: RealtimeAggregatorNodeConfig = Field(
+ default_factory=RealtimeAggregatorNodeConfig,
)
- calibration_detection_enabled: bool = Field(default=True)
- mocap_detection_enabled: bool = Field(default=True)
@property
def camera_ids(self) -> list[CameraIdString]:
diff --git a/freemocap/core/pipeline/realtime/realtime_pipeline_manager.py b/freemocap/core/pipeline/realtime/realtime_pipeline_manager.py
index 23de1370..2f214c94 100644
--- a/freemocap/core/pipeline/realtime/realtime_pipeline_manager.py
+++ b/freemocap/core/pipeline/realtime/realtime_pipeline_manager.py
@@ -19,7 +19,8 @@ from skellycam.core.camera_group.camera_group import CameraGroup
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.types.type_overloads import CameraIdString
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
+from freemocap.core.pipeline.abcs.pipeline_manager_abc import PipelineManagerABC
+from freemocap.core.pipeline.realtime.realtime_aggregator_node import RealtimePipelineConfig
from freemocap.core.pipeline.realtime.realtime_pipeline import RealtimePipeline
from freemocap.core.types.type_overloads import PipelineIdString, FrameNumberInt
from freemocap.core.viz.frontend_payload import FrontendPayload
@@ -28,7 +29,7 @@ logger = logging.getLogger(__name__)
@dataclass
-class RealtimePipelineManager:
+class RealtimePipelineManager(PipelineManagerABC):
"""
Manages the lifecycle of realtime (camera-bound) pipelines.
diff --git a/freemocap/core/calibration/__init__.py b/freemocap/core/tasks/__init__.py
similarity index 100%
rename from freemocap/core/calibration/__init__.py
rename to freemocap/core/tasks/__init__.py
diff --git a/freemocap/core/calibration/anipose_calibration/__init__.py b/freemocap/core/tasks/calibration/__init__.py
similarity index 100%
rename from freemocap/core/calibration/anipose_calibration/__init__.py
rename to freemocap/core/tasks/calibration/__init__.py
diff --git a/freemocap/core/calibration/anipose_calibration/helpers/__init__.py b/freemocap/core/tasks/calibration/anipose_calibration/__init__.py
similarity index 100%
rename from freemocap/core/calibration/anipose_calibration/helpers/__init__.py
rename to freemocap/core/tasks/calibration/anipose_calibration/__init__.py
diff --git a/freemocap/core/calibration/anipose_calibration/anipose_adapters.py b/freemocap/core/tasks/calibration/anipose_calibration/anipose_adapters.py
similarity index 90%
rename from freemocap/core/calibration/anipose_calibration/anipose_adapters.py
rename to freemocap/core/tasks/calibration/anipose_calibration/anipose_adapters.py
index 483e6845..30887976 100644
--- a/freemocap/core/calibration/anipose_calibration/anipose_adapters.py
+++ b/freemocap/core/tasks/calibration/anipose_calibration/anipose_adapters.py
@@ -3,9 +3,9 @@
These let the anipose solver keep its internal AniposeCameraGroup/AniposeCamera
classes while the rest of the system speaks CameraModel/CalibrationResult.
"""
-from freemocap.core.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCharucoBoard, \
+from freemocap.core.tasks.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCharucoBoard, \
AniposeCameraGroup, AniposeCamera
-from freemocap.core.calibration.shared.calibration_models import CharucoBoardDefinition, CameraModel, CameraIntrinsics, \
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoBoardDefinition, CameraModel, CameraIntrinsics, \
CameraExtrinsics
@@ -20,7 +20,7 @@ def create_anipose_board(board: CharucoBoardDefinition) -> AniposeCharucoBoard:
squaresX=board.squares_x,
squaresY=board.squares_y,
square_length=board.square_length_mm,
- marker_length=board.marker_length_mm,
+ marker_length=board.aruco_marker_length_mm,
marker_bits=board.marker_bits,
dict_size=board.dict_size,
)
diff --git a/freemocap/core/calibration/pyceres_calibration/__init__.py b/freemocap/core/tasks/calibration/anipose_calibration/helpers/__init__.py
similarity index 100%
rename from freemocap/core/calibration/pyceres_calibration/__init__.py
rename to freemocap/core/tasks/calibration/anipose_calibration/helpers/__init__.py
diff --git a/freemocap/core/calibration/anipose_calibration/helpers/calibration_helpers.py b/freemocap/core/tasks/calibration/anipose_calibration/helpers/calibration_helpers.py
similarity index 96%
rename from freemocap/core/calibration/anipose_calibration/helpers/calibration_helpers.py
rename to freemocap/core/tasks/calibration/anipose_calibration/helpers/calibration_helpers.py
index 61b9b120..b5223556 100644
--- a/freemocap/core/calibration/anipose_calibration/helpers/calibration_helpers.py
+++ b/freemocap/core/tasks/calibration/anipose_calibration/helpers/calibration_helpers.py
@@ -14,10 +14,10 @@ from skellycam.core.types.type_overloads import CameraIdString
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseRecorder
from skellytracker.trackers.charuco_tracker.charuco_observation import CharucoObservation
-from freemocap.core.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCameraGroup, \
+from freemocap.core.tasks.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCameraGroup, \
AniposeCharucoBoard
-from freemocap.core.calibration.shared.groundplane_alignment import GroundPlaneResult
-from freemocap.core.calibration.shared.groundplane_math import find_still_charuco_frame, CharucoVisibilityError, \
+from freemocap.core.tasks.calibration.shared.groundplane_alignment import GroundPlaneResult
+from freemocap.core.tasks.calibration.shared.groundplane_math import find_still_charuco_frame, CharucoVisibilityError, \
CharucoVelocityError, compute_board_basis_vectors
from freemocap.core.types.type_overloads import VideoIdString
diff --git a/freemocap/core/calibration/anipose_calibration/helpers/freemocap_anipose.py b/freemocap/core/tasks/calibration/anipose_calibration/helpers/freemocap_anipose.py
similarity index 99%
rename from freemocap/core/calibration/anipose_calibration/helpers/freemocap_anipose.py
rename to freemocap/core/tasks/calibration/anipose_calibration/helpers/freemocap_anipose.py
index 3024a26f..42e4f75f 100644
--- a/freemocap/core/calibration/anipose_calibration/helpers/freemocap_anipose.py
+++ b/freemocap/core/tasks/calibration/anipose_calibration/helpers/freemocap_anipose.py
@@ -18,7 +18,7 @@ from scipy import optimize
from scipy.sparse import dok_matrix
from tqdm import trange
-from freemocap.core.calibration.shared.transform_math import build_maximum_spanning_tree, make_M, \
+from freemocap.core.tasks.calibration.shared.transform_math import build_maximum_spanning_tree, make_M, \
robust_average_transforms, find_spanning_tree_pairs, get_rtvec
numba_logger = logging.getLogger("numba")
diff --git a/freemocap/core/calibration/anipose_calibration/run_anipose_calibration.py b/freemocap/core/tasks/calibration/anipose_calibration/run_anipose_calibration.py
similarity index 88%
rename from freemocap/core/calibration/anipose_calibration/run_anipose_calibration.py
rename to freemocap/core/tasks/calibration/anipose_calibration/run_anipose_calibration.py
index 7b1e8e49..e24b7c3f 100644
--- a/freemocap/core/calibration/anipose_calibration/run_anipose_calibration.py
+++ b/freemocap/core/tasks/calibration/anipose_calibration/run_anipose_calibration.py
@@ -13,16 +13,17 @@ from skellycam.core.types.type_overloads import CameraIdString
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseRecorder
from skellytracker.trackers.charuco_tracker.charuco_observation import CharucoObservation
-from freemocap.core.calibration.anipose_calibration.anipose_adapters import create_anipose_board, \
+from freemocap.core.pipeline.posthoc.video_group_helper import VideoMetadata
+from freemocap.core.tasks.calibration.anipose_calibration.anipose_adapters import create_anipose_board, \
anipose_group_to_camera_models
-from freemocap.core.calibration.anipose_calibration.helpers.calibration_helpers import anipose_pin_camera_zero_to_origin, \
+from freemocap.core.tasks.calibration.anipose_calibration.helpers.calibration_helpers import \
+ anipose_pin_camera_zero_to_origin, \
set_charuco_board_as_groundplane, get_real_world_matrices
-from freemocap.core.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCamera, AniposeCameraGroup
-from freemocap.core.calibration.shared.calibration_models import CharucoBoardDefinition, CalibrationResult
-from freemocap.core.calibration.shared.groundplane_alignment import GroundPlaneResult
-from freemocap.core.calibration.shared.charuco_observation_aggregator import CharucoObservationAggregator
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationPipelineConfig
-from freemocap.core.pipeline.posthoc.video_group_helper import VideoMetadata
+from freemocap.core.tasks.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCamera, \
+ AniposeCameraGroup
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoBoardDefinition, CalibrationResult
+from freemocap.core.tasks.calibration.shared.charuco_observation_aggregator import CharucoObservationAggregator
+from freemocap.core.tasks.calibration.shared.groundplane_alignment import GroundPlaneResult
from freemocap.core.types.type_overloads import VideoIdString
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/pipeline/pipeline_configs/calibration_task_config.py b/freemocap/core/tasks/calibration/calibration_task_config.py
similarity index 65%
rename from freemocap/core/pipeline/pipeline_configs/calibration_task_config.py
rename to freemocap/core/tasks/calibration/calibration_task_config.py
index 2988cec9..c4170c63 100644
--- a/freemocap/core/pipeline/pipeline_configs/calibration_task_config.py
+++ b/freemocap/core/tasks/calibration/calibration_task_config.py
@@ -3,7 +3,9 @@ from enum import Enum
from pydantic import BaseModel, ConfigDict, Field
from skellytracker.trackers.charuco_tracker.charuco_tracker_config import CharucoDetectorConfig
-from freemocap.core.calibration.pyceres_calibration.helpers.models import PyceresCalibrationSolverConfig
+from freemocap.core.tasks.calibration.pyceres_calibration.helpers.models import PyceresCalibrationSolverConfig
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoBoardDefinition
+
class CalibrationSolverMethod(str, Enum):
"""Which calibration solver backend to use."""
@@ -18,21 +20,19 @@ class CalibrationSource(str, Enum):
# FROM_ACTIVE_RECORDING = "from_active_recording" # NotImplemented
-class CalibrationPipelineConfig(BaseModel):
+class PosthocCalibrationPipelineConfig(BaseModel):
model_config = ConfigDict(populate_by_name=True)
calibration_recording_folder: str | None = Field(
default=None, alias="calibrationRecordingFolder",
)
- charuco_board_x_squares: int = Field(gt=0, default=5, alias="charucoBoardXSquares")
- charuco_board_y_squares: int = Field(gt=0, default=3, alias="charucoBoardYSquares")
- charuco_square_length: float = Field(gt=0, default=54, alias="charucoSquareLength",
- description="Length of one side of a black square on teh charuco board, default unit: mm")
-
+ charuco_board: CharucoBoardDefinition = Field(default_factory=CharucoBoardDefinition.create_letter_size_5x3,
+ alias="charucoBoard",
+ description="Definition of the charuco board used for calibration")
solver_method: CalibrationSolverMethod = Field(
default=CalibrationSolverMethod.ANIPOSE,
alias="solverMethod",
- description="Which calibration solver to use: 'anipose' (legacy) or 'pyceres' (new bundle adjustment).",
+ description="Which calibration solver to use: 'anipose' (legacy) or 'pyceres' ( untested bundle adjustment based calibration method).",
)
pyceres_solver_config: PyceresCalibrationSolverConfig = Field(
@@ -50,7 +50,7 @@ class CalibrationPipelineConfig(BaseModel):
@property
def detector_config(self) -> CharucoDetectorConfig:
return CharucoDetectorConfig(
- squares_x=self.charuco_board_x_squares,
- squares_y=self.charuco_board_y_squares,
- # square_length=self.charuco_square_length,
+ squares_x=self.charuco_board.squares_x,
+ squares_y=self.charuco_board.squares_y,
+ square_length=self.charuco_board.square_length_mm,
)
diff --git a/freemocap/core/calibration/calibration_task.py b/freemocap/core/tasks/calibration/posthoc_calibration_task.py
similarity index 90%
rename from freemocap/core/calibration/calibration_task.py
rename to freemocap/core/tasks/calibration/posthoc_calibration_task.py
index b7f63880..24e2c1f3 100644
--- a/freemocap/core/calibration/calibration_task.py
+++ b/freemocap/core/tasks/calibration/posthoc_calibration_task.py
@@ -21,19 +21,20 @@ from skellycam.core.recorders.videos.recording_info import RecordingInfo
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseRecorder
from skellytracker.trackers.charuco_tracker.charuco_observation import CharucoObservation
-from freemocap.core.calibration.anipose_calibration.run_anipose_calibration import run_anipose_calibration
-from freemocap.core.calibration.pyceres_calibration.pyceres_calibration_pipeline import run_pyceres_calibration
-from freemocap.core.calibration.shared.calibration_models import CharucoBoardDefinition, CharucoCornersObservation, \
- CornerObservation, CalibrationResult
-from freemocap.core.calibration.shared.groundplane_alignment import GroundPlaneResult, groundplane_metadata
-from freemocap.core.calibration.shared.calibration_paths import get_last_successful_calibration_toml_path
-from freemocap.core.calibration.shared.calibration_save import save_calibration_copies
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationPipelineConfig, \
- CalibrationSolverMethod
-from freemocap.utilities.toml_mixin import numpy_to_python
-from freemocap.core.mocap.mocap_helpers.charuco_model_from_observations import charuco_model_from_observations
from freemocap.core.pipeline.posthoc.video_group_helper import VideoMetadata
+from freemocap.core.tasks.calibration.anipose_calibration.run_anipose_calibration import run_anipose_calibration
+from freemocap.core.tasks.calibration.calibration_task_config import PosthocCalibrationPipelineConfig, \
+ CalibrationSolverMethod
+from freemocap.core.tasks.calibration.pyceres_calibration.pyceres_calibration_pipeline import run_pyceres_calibration
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoBoardDefinition, \
+ CharucoCornersObservation, \
+ CornerObservation, CalibrationResult
+from freemocap.core.tasks.calibration.shared.calibration_paths import get_last_successful_calibration_toml_path
+from freemocap.core.tasks.calibration.shared.calibration_save import save_calibration_copies
+from freemocap.core.tasks.calibration.shared.groundplane_alignment import GroundPlaneResult, groundplane_metadata
+from freemocap.core.tasks.mocap.mocap_helpers.charuco_model_from_observations import charuco_model_from_observations
from freemocap.core.types.type_overloads import VideoIdString
+from freemocap.utilities.toml_mixin import numpy_to_python
from scripts.compare_calibrations import compute_calibration_health
logger = logging.getLogger(__name__)
@@ -44,7 +45,7 @@ logger = logging.getLogger(__name__)
# =============================================================================
-def _create_board(task_config: CalibrationPipelineConfig) -> CharucoBoardDefinition:
+def _create_board(task_config: PosthocCalibrationPipelineConfig) -> CharucoBoardDefinition:
"""Create the shared charuco board definition from pipeline config.
Single source of truth β€” both solver paths use this exact board.
@@ -53,7 +54,7 @@ def _create_board(task_config: CalibrationPipelineConfig) -> CharucoBoardDefinit
squares_x=task_config.charuco_board_x_squares,
squares_y=task_config.charuco_board_y_squares,
square_length_mm=task_config.detector_config.square_length,
- marker_length_mm=task_config.detector_config.marker_length,
+ aruco_marker_length_mm=task_config.detector_config.marker_length,
)
@@ -152,7 +153,7 @@ def _run_pyceres_path(
*,
all_observations: list[CharucoCornersObservation],
board: CharucoBoardDefinition,
- task_config: CalibrationPipelineConfig,
+ task_config: PosthocCalibrationPipelineConfig,
video_metadata: dict[VideoIdString, VideoMetadata],
) -> tuple[CalibrationResult, GroundPlaneResult | None]:
"""Run calibration using the pyceres bundle adjustment solver."""
@@ -191,7 +192,7 @@ def _run_anipose_path(
*,
charuco_observations_by_frame: list[dict[VideoIdString, CharucoObservation]],
board: CharucoBoardDefinition,
- task_config: CalibrationPipelineConfig,
+ task_config: PosthocCalibrationPipelineConfig,
recording_info: RecordingInfo,
video_metadata: dict[VideoIdString, VideoMetadata],
) -> tuple[CalibrationResult, GroundPlaneResult | None]:
@@ -218,12 +219,12 @@ def _run_anipose_path(
# =============================================================================
-def run_calibration_task(
+def run_posthoc_calibration_task(
*,
frame_observations: list[dict[VideoIdString, CharucoObservation]],
recording_info: RecordingInfo,
video_metadata: dict[VideoIdString, VideoMetadata],
- task_config: CalibrationPipelineConfig,
+ task_config: PosthocCalibrationPipelineConfig,
) -> None:
"""Run posthoc calibration on collected charuco observations.
diff --git a/freemocap/core/calibration/pyceres_calibration/helpers/__init__.py b/freemocap/core/tasks/calibration/pyceres_calibration/__init__.py
similarity index 100%
rename from freemocap/core/calibration/pyceres_calibration/helpers/__init__.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/__init__.py
diff --git a/freemocap/core/mocap/__init__.py b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/__init__.py
similarity index 100%
rename from freemocap/core/mocap/__init__.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/helpers/__init__.py
diff --git a/freemocap/core/calibration/pyceres_calibration/helpers/cost_functions.py b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/cost_functions.py
similarity index 100%
rename from freemocap/core/calibration/pyceres_calibration/helpers/cost_functions.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/helpers/cost_functions.py
diff --git a/freemocap/core/calibration/pyceres_calibration/helpers/initialization.py b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/initialization.py
similarity index 98%
rename from freemocap/core/calibration/pyceres_calibration/helpers/initialization.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/helpers/initialization.py
index 11c8fb69..6f915790 100644
--- a/freemocap/core/calibration/pyceres_calibration/helpers/initialization.py
+++ b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/initialization.py
@@ -17,9 +17,9 @@ from numpy.typing import NDArray
from scipy.linalg import inv as matrix_inverse
from scipy.spatial.transform import Rotation
-from freemocap.core.calibration.shared.calibration_models import CharucoCornersObservation, CameraIntrinsics, \
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoCornersObservation, CameraIntrinsics, \
CharucoBoardDefinition, CameraExtrinsics
-from freemocap.core.calibration.shared.transform_math import make_M, robust_average_transforms, \
+from freemocap.core.tasks.calibration.shared.transform_math import make_M, robust_average_transforms, \
build_maximum_spanning_tree, find_spanning_tree_pairs, get_rtvec
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/calibration/pyceres_calibration/helpers/models.py b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/models.py
similarity index 100%
rename from freemocap/core/calibration/pyceres_calibration/helpers/models.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/helpers/models.py
diff --git a/freemocap/core/calibration/pyceres_calibration/helpers/postprocessing.py b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/postprocessing.py
similarity index 95%
rename from freemocap/core/calibration/pyceres_calibration/helpers/postprocessing.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/helpers/postprocessing.py
index 75c08044..e5254365 100644
--- a/freemocap/core/calibration/pyceres_calibration/helpers/postprocessing.py
+++ b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/postprocessing.py
@@ -10,10 +10,12 @@ import numpy as np
from numpy.typing import NDArray
from scipy.spatial.transform import Rotation
-from freemocap.core.calibration.shared.calibration_models import CameraModel, CameraExtrinsics, \
+from freemocap.core.tasks.calibration.shared.calibration_models import CameraModel, CameraExtrinsics, \
CharucoCornersObservation, CharucoBoardDefinition
-from freemocap.core.calibration.shared.groundplane_alignment import GroundPlaneResult, apply_groundplane_to_cameras
-from freemocap.core.calibration.shared.groundplane_math import find_still_charuco_frame, compute_board_basis_vectors
+from freemocap.core.tasks.calibration.shared.groundplane_alignment import GroundPlaneResult, \
+ apply_groundplane_to_cameras
+from freemocap.core.tasks.calibration.shared.groundplane_math import find_still_charuco_frame, \
+ compute_board_basis_vectors
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/calibration/pyceres_calibration/helpers/solver.py b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/solver.py
similarity index 97%
rename from freemocap/core/calibration/pyceres_calibration/helpers/solver.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/helpers/solver.py
index c1738313..60dcf071 100644
--- a/freemocap/core/calibration/pyceres_calibration/helpers/solver.py
+++ b/freemocap/core/tasks/calibration/pyceres_calibration/helpers/solver.py
@@ -13,10 +13,10 @@ import pyceres
from numpy.typing import NDArray
from scipy.spatial.transform import Rotation
-from freemocap.core.calibration.pyceres_calibration.helpers.cost_functions import CharucoReprojectionCost, \
+from freemocap.core.tasks.calibration.pyceres_calibration.helpers.cost_functions import CharucoReprojectionCost, \
IntrinsicsPriorCost
-from freemocap.core.calibration.pyceres_calibration.helpers.models import PyceresCalibrationSolverConfig
-from freemocap.core.calibration.shared.calibration_models import CharucoBoardDefinition, CameraModel, \
+from freemocap.core.tasks.calibration.pyceres_calibration.helpers.models import PyceresCalibrationSolverConfig
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoBoardDefinition, CameraModel, \
CharucoCornersObservation, CalibrationResult, CameraIntrinsics, CameraExtrinsics
logger = logging.getLogger(__name__)
@@ -438,4 +438,4 @@ def run_pyceres_bundle_adjustment(
time_seconds=elapsed,
n_observations_used=n_used,
n_observations_rejected=n_rejected_total,
- )
\ No newline at end of file
+ )
diff --git a/freemocap/core/calibration/pyceres_calibration/pyceres_calibration_pipeline.py b/freemocap/core/tasks/calibration/pyceres_calibration/pyceres_calibration_pipeline.py
similarity index 91%
rename from freemocap/core/calibration/pyceres_calibration/pyceres_calibration_pipeline.py
rename to freemocap/core/tasks/calibration/pyceres_calibration/pyceres_calibration_pipeline.py
index 02d99ef2..34448f94 100644
--- a/freemocap/core/calibration/pyceres_calibration/pyceres_calibration_pipeline.py
+++ b/freemocap/core/tasks/calibration/pyceres_calibration/pyceres_calibration_pipeline.py
@@ -12,15 +12,16 @@ Orchestrates the full calibration flow:
import logging
-from freemocap.core.calibration.pyceres_calibration.helpers.initialization import initialize_intrinsics, \
+from freemocap.core.tasks.calibration.pyceres_calibration.helpers.initialization import initialize_intrinsics, \
initialize_extrinsics, initialize_board_poses
-from freemocap.core.calibration.pyceres_calibration.helpers.models import PyceresCalibrationSolverConfig
-from freemocap.core.calibration.pyceres_calibration.helpers.postprocessing import pin_camera_to_origin, \
+from freemocap.core.tasks.calibration.pyceres_calibration.helpers.models import PyceresCalibrationSolverConfig
+from freemocap.core.tasks.calibration.pyceres_calibration.helpers.postprocessing import pin_camera_to_origin, \
align_to_charuco_groundplane
-from freemocap.core.calibration.shared.groundplane_alignment import GroundPlaneResult
-from freemocap.core.calibration.pyceres_calibration.helpers.solver import run_pyceres_bundle_adjustment
-from freemocap.core.calibration.shared.calibration_models import CharucoBoardDefinition, CharucoCornersObservation, \
+from freemocap.core.tasks.calibration.pyceres_calibration.helpers.solver import run_pyceres_bundle_adjustment
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoBoardDefinition, \
+ CharucoCornersObservation, \
CalibrationResult, CameraModel
+from freemocap.core.tasks.calibration.shared.groundplane_alignment import GroundPlaneResult
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/calibration/shared/__init__.py b/freemocap/core/tasks/calibration/shared/__init__.py
similarity index 100%
rename from freemocap/core/calibration/shared/__init__.py
rename to freemocap/core/tasks/calibration/shared/__init__.py
diff --git a/freemocap/core/calibration/shared/calibration_models.py b/freemocap/core/tasks/calibration/shared/calibration_models.py
similarity index 92%
rename from freemocap/core/calibration/shared/calibration_models.py
rename to freemocap/core/tasks/calibration/shared/calibration_models.py
index 9c18a74c..4736722d 100644
--- a/freemocap/core/calibration/shared/calibration_models.py
+++ b/freemocap/core/tasks/calibration/shared/calibration_models.py
@@ -5,13 +5,13 @@ and pyceres calibration paths. Each solver may have additional internal
models, but data flows through these shared types at the boundaries.
"""
-import toml
from pathlib import Path
import cv2
import numpy as np
+import toml
from numpy.typing import NDArray
-from pydantic import BaseModel, ConfigDict, field_validator, model_validator
+from pydantic import BaseModel, ConfigDict, field_validator, model_validator, computed_field
from scipy.spatial.transform import Rotation
from freemocap.utilities.toml_mixin import TomlMixin, numpy_to_python
@@ -34,15 +34,20 @@ class CharucoBoardDefinition(BaseModel, TomlMixin):
squares_x: int
squares_y: int
square_length_mm: float
- marker_length_mm: float
+ marker_length_ratio: float = 0.8
marker_bits: int = 4
dict_size: int = 250
+ @computed_field
+ @property
+ def aruco_marker_length_mm(self) -> float:
+ return self.marker_length_ratio * self.square_length_mm
+
@model_validator(mode="after")
def validate_geometry(self) -> "CharucoBoardDefinition":
- if self.marker_length_mm >= self.square_length_mm:
+ if self.aruco_marker_length_mm >= self.square_length_mm:
raise ValueError(
- f"marker_length_mm ({self.marker_length_mm}) must be < "
+ f"marker_length_mm ({self.aruco_marker_length_mm}) must be < "
f"square_length_mm ({self.square_length_mm})"
)
if self.squares_x < 2 or self.squares_y < 2:
@@ -54,7 +59,10 @@ class CharucoBoardDefinition(BaseModel, TomlMixin):
@property
def n_corners(self) -> int:
- """Number of internal corners on the board."""
+ """
+ Number of internal corners on the board, i.e. corners between
+ adjacent aruco markers. These are the points used as input to the calibrator
+ """
return (self.squares_x - 1) * (self.squares_y - 1)
@property
@@ -67,6 +75,23 @@ class CharucoBoardDefinition(BaseModel, TomlMixin):
objp *= self.square_length_mm
return objp
+ @classmethod
+ def create_test_data_7x5(cls) -> "CharucoBoardDefinition":
+ """Convenience method to create a standard 7x5 charuco board definition."""
+ return cls(
+ squares_x=7,
+ squares_y=5,
+ square_length_mm=58.0,
+ )
+
+ @classmethod
+ def create_letter_size_5x3(cls) -> "CharucoBoardDefinition":
+ """Convenience method to create a standard 7x5 charuco board definition."""
+ return cls(
+ squares_x=5,
+ squares_y=3,
+ square_length_mm=54.0,
+ )
# =============================================================================
# INTRINSICS
@@ -353,7 +378,7 @@ class CalibrationResult(BaseModel, TomlMixin):
The Triangulator performs DLT triangulation directly from CameraModel
intrinsics/extrinsics with no anipose dependency.
"""
- from freemocap.core.calibration.shared.triangulator import Triangulator
+ from freemocap.core.tasks.calibration.shared.triangulator import Triangulator
return Triangulator.from_calibration_result(calibration=self)
def get_triangulator_for_cameras(self, camera_ids: list[str]) -> "Triangulator":
@@ -365,7 +390,7 @@ class CalibrationResult(BaseModel, TomlMixin):
Raises:
KeyError: If any camera_id is not found in this calibration.
"""
- from freemocap.core.calibration.shared.triangulator import Triangulator
+ from freemocap.core.tasks.calibration.shared.triangulator import Triangulator
return Triangulator.from_calibration_for_cameras(
calibration=self,
@@ -403,7 +428,7 @@ class CalibrationResult(BaseModel, TomlMixin):
"squares_x": self.board.squares_x,
"squares_y": self.board.squares_y,
"square_length_mm": self.board.square_length_mm,
- "marker_length_mm": self.board.marker_length_mm,
+ "marker_length_mm": self.board.aruco_marker_length_mm,
"marker_bits": self.board.marker_bits,
"dict_size": self.board.dict_size,
}
@@ -474,7 +499,7 @@ class CalibrationResult(BaseModel, TomlMixin):
squares_x=board_meta.get("squares_x", 7),
squares_y=board_meta.get("squares_y", 5),
square_length_mm=board_meta.get("square_length_mm", 1.0),
- marker_length_mm=board_meta.get("marker_length_mm", 0.8),
+ # aruco_marker_length_mm=board_meta.get("marker_length_mm", 0.8),
marker_bits=board_meta.get("marker_bits", 4),
dict_size=board_meta.get("dict_size", 250),
)
diff --git a/freemocap/core/calibration/shared/calibration_paths.py b/freemocap/core/tasks/calibration/shared/calibration_paths.py
similarity index 100%
rename from freemocap/core/calibration/shared/calibration_paths.py
rename to freemocap/core/tasks/calibration/shared/calibration_paths.py
diff --git a/freemocap/core/calibration/shared/calibration_save.py b/freemocap/core/tasks/calibration/shared/calibration_save.py
similarity index 93%
rename from freemocap/core/calibration/shared/calibration_save.py
rename to freemocap/core/tasks/calibration/shared/calibration_save.py
index 082961b5..2249eaef 100644
--- a/freemocap/core/calibration/shared/calibration_save.py
+++ b/freemocap/core/tasks/calibration/shared/calibration_save.py
@@ -12,7 +12,7 @@ import logging
from collections.abc import Callable
from pathlib import Path
-from freemocap.core.calibration.shared.calibration_paths import create_camera_calibration_file_name, \
+from freemocap.core.tasks.calibration.shared.calibration_paths import create_camera_calibration_file_name, \
get_calibrations_folder_path, get_last_successful_calibration_toml_path
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/calibration/shared/calibration_state.py b/freemocap/core/tasks/calibration/shared/calibration_state.py
similarity index 97%
rename from freemocap/core/calibration/shared/calibration_state.py
rename to freemocap/core/tasks/calibration/shared/calibration_state.py
index dc2d9e70..624e7c56 100644
--- a/freemocap/core/calibration/shared/calibration_state.py
+++ b/freemocap/core/tasks/calibration/shared/calibration_state.py
@@ -14,9 +14,9 @@ from numpy.typing import NDArray
from skellycam.core.types.type_overloads import CameraIdString
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseObservation
-from freemocap.core.calibration.shared.calibration_models import CalibrationResult
-from freemocap.core.calibration.shared.calibration_paths import get_last_successful_calibration_toml_path
-from freemocap.core.calibration.shared.triangulator import Triangulator
+from freemocap.core.tasks.calibration.shared.calibration_models import CalibrationResult
+from freemocap.core.tasks.calibration.shared.calibration_paths import get_last_successful_calibration_toml_path
+from freemocap.core.tasks.calibration.shared.triangulator import Triangulator
logger = logging.getLogger(__name__)
@@ -284,4 +284,4 @@ def _match_camera_name(
f"Camera '{cam_id}' has no exact match in calibration cameras "
f"{calibration_camera_names} β€” skipping this camera for triangulation"
)
- return None
\ No newline at end of file
+ return None
diff --git a/freemocap/core/calibration/shared/camera_to_video_identity_matcher.py b/freemocap/core/tasks/calibration/shared/camera_to_video_identity_matcher.py
similarity index 98%
rename from freemocap/core/calibration/shared/camera_to_video_identity_matcher.py
rename to freemocap/core/tasks/calibration/shared/camera_to_video_identity_matcher.py
index 6c41b77e..fe4cf4de 100644
--- a/freemocap/core/calibration/shared/camera_to_video_identity_matcher.py
+++ b/freemocap/core/tasks/calibration/shared/camera_to_video_identity_matcher.py
@@ -22,7 +22,7 @@ _CAMERA_ID_PATTERNS: list[re.Pattern[str]] = [
re.compile(r"camera[_\-](\d+)", re.IGNORECASE),
# "rec1_cam000.mp4"
re.compile(r"cam(\d+)", re.IGNORECASE),
- # "000.mp4" β€” bare numeric filename (common in freemocap recordings)
+ # "000.mp4" β€” bare numeric filename
re.compile(r"^(\d+)\.[a-zA-Z0-9]+$"),
]
diff --git a/freemocap/core/calibration/shared/charuco_observation_aggregator.py b/freemocap/core/tasks/calibration/shared/charuco_observation_aggregator.py
similarity index 100%
rename from freemocap/core/calibration/shared/charuco_observation_aggregator.py
rename to freemocap/core/tasks/calibration/shared/charuco_observation_aggregator.py
diff --git a/freemocap/core/calibration/shared/feet_groundplane.py b/freemocap/core/tasks/calibration/shared/feet_groundplane.py
similarity index 98%
rename from freemocap/core/calibration/shared/feet_groundplane.py
rename to freemocap/core/tasks/calibration/shared/feet_groundplane.py
index e49138d5..a14de8db 100644
--- a/freemocap/core/calibration/shared/feet_groundplane.py
+++ b/freemocap/core/tasks/calibration/shared/feet_groundplane.py
@@ -10,7 +10,7 @@ import logging
import numpy as np
from numpy.typing import NDArray
-from freemocap.core.calibration.shared.groundplane_alignment import GroundPlaneResult
+from freemocap.core.tasks.calibration.shared.groundplane_alignment import GroundPlaneResult
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/calibration/shared/groundplane_alignment.py b/freemocap/core/tasks/calibration/shared/groundplane_alignment.py
similarity index 97%
rename from freemocap/core/calibration/shared/groundplane_alignment.py
rename to freemocap/core/tasks/calibration/shared/groundplane_alignment.py
index 98fd6c17..e0e54e51 100644
--- a/freemocap/core/calibration/shared/groundplane_alignment.py
+++ b/freemocap/core/tasks/calibration/shared/groundplane_alignment.py
@@ -14,7 +14,7 @@ import numpy as np
from numpy.typing import NDArray
from scipy.spatial.transform import Rotation
-from freemocap.core.calibration.shared.calibration_models import (
+from freemocap.core.tasks.calibration.shared.calibration_models import (
CameraExtrinsics,
CameraModel,
)
diff --git a/freemocap/core/calibration/shared/groundplane_math.py b/freemocap/core/tasks/calibration/shared/groundplane_math.py
similarity index 100%
rename from freemocap/core/calibration/shared/groundplane_math.py
rename to freemocap/core/tasks/calibration/shared/groundplane_math.py
diff --git a/freemocap/core/calibration/shared/transform_math.py b/freemocap/core/tasks/calibration/shared/transform_math.py
similarity index 100%
rename from freemocap/core/calibration/shared/transform_math.py
rename to freemocap/core/tasks/calibration/shared/transform_math.py
diff --git a/freemocap/core/calibration/shared/triangulator.py b/freemocap/core/tasks/calibration/shared/triangulator.py
similarity index 99%
rename from freemocap/core/calibration/shared/triangulator.py
rename to freemocap/core/tasks/calibration/shared/triangulator.py
index 37393f17..13a5b7cc 100644
--- a/freemocap/core/calibration/shared/triangulator.py
+++ b/freemocap/core/tasks/calibration/shared/triangulator.py
@@ -11,7 +11,7 @@ import numpy as np
from numpy.typing import NDArray
from pydantic import BaseModel, ConfigDict, model_validator
-from freemocap.core.calibration.shared.calibration_models import CameraModel, CalibrationResult
+from freemocap.core.tasks.calibration.shared.calibration_models import CameraModel, CalibrationResult
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/mocap/mocap_helpers/__init__.py b/freemocap/core/tasks/mocap/__init__.py
similarity index 100%
rename from freemocap/core/mocap/mocap_helpers/__init__.py
rename to freemocap/core/tasks/mocap/__init__.py
diff --git a/freemocap/core/mocap/skeleton_dewiggler/__init__.py b/freemocap/core/tasks/mocap/mocap_helpers/__init__.py
similarity index 100%
rename from freemocap/core/mocap/skeleton_dewiggler/__init__.py
rename to freemocap/core/tasks/mocap/mocap_helpers/__init__.py
diff --git a/freemocap/core/mocap/mocap_helpers/charuco_model_from_observations.py b/freemocap/core/tasks/mocap/mocap_helpers/charuco_model_from_observations.py
similarity index 94%
rename from freemocap/core/mocap/mocap_helpers/charuco_model_from_observations.py
rename to freemocap/core/tasks/mocap/mocap_helpers/charuco_model_from_observations.py
index c7c1b504..fe3c2de5 100644
--- a/freemocap/core/mocap/mocap_helpers/charuco_model_from_observations.py
+++ b/freemocap/core/tasks/mocap/mocap_helpers/charuco_model_from_observations.py
@@ -7,6 +7,7 @@ then interpolates, filters, and saves the result.
import logging
from pathlib import Path
+from typing import TYPE_CHECKING
from skellyforge.post_processing.filters.apply_filter import filter_trajectory
from skellyforge.post_processing.filters.filter_config import FilterConfig
@@ -17,10 +18,9 @@ from skellyforge.skellymodels.models.tracking_model_info import CharucoBoard5x3M
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseRecorder
from skellytracker.trackers.charuco_tracker.charuco_observation import CharucoObservation
-from freemocap.core.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCameraGroup
-from freemocap.core.mocap.mocap_helpers.triangulate_trajectory_array import TriangulationConfig, triangulate_dict
+from freemocap.core.tasks.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCameraGroup
+from freemocap.core.tasks.mocap.mocap_helpers.triangulate_trajectory_array import TriangulationConfig, triangulate_dict
from freemocap.core.types.type_overloads import VideoIdString
-from typing import TYPE_CHECKING
if TYPE_CHECKING:
from skellyforge.data_models.trajectory_3d import Trajectory3d
diff --git a/freemocap/core/mocap/mocap_helpers/skeleton_from_mediapipe_observations.py b/freemocap/core/tasks/mocap/mocap_helpers/skeleton_from_mediapipe_observations.py
similarity index 95%
rename from freemocap/core/mocap/mocap_helpers/skeleton_from_mediapipe_observations.py
rename to freemocap/core/tasks/mocap/mocap_helpers/skeleton_from_mediapipe_observations.py
index 92d3f733..e9dc150f 100644
--- a/freemocap/core/mocap/mocap_helpers/skeleton_from_mediapipe_observations.py
+++ b/freemocap/core/tasks/mocap/mocap_helpers/skeleton_from_mediapipe_observations.py
@@ -12,8 +12,8 @@ from skellyforge.skellymodels.managers.human import Human
from skellyforge.skellymodels.models.tracking_model_info import MediapipeModelInfo
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseRecorder
-from freemocap.core.calibration.shared.calibration_models import CalibrationResult
-from freemocap.core.calibration.shared.triangulator import Triangulator
+from freemocap.core.tasks.calibration.shared.calibration_models import CalibrationResult
+from freemocap.core.tasks.calibration.shared.triangulator import Triangulator
from freemocap.core.types.type_overloads import VideoIdString
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/mocap/mocap_helpers/triangulate_trajectory_array.py b/freemocap/core/tasks/mocap/mocap_helpers/triangulate_trajectory_array.py
similarity index 98%
rename from freemocap/core/mocap/mocap_helpers/triangulate_trajectory_array.py
rename to freemocap/core/tasks/mocap/mocap_helpers/triangulate_trajectory_array.py
index 005402b7..4eb43dc8 100644
--- a/freemocap/core/mocap/mocap_helpers/triangulate_trajectory_array.py
+++ b/freemocap/core/tasks/mocap/mocap_helpers/triangulate_trajectory_array.py
@@ -7,7 +7,7 @@ from skellyforge.data_models.trajectory_3d import Observation3d, Trajectory3d
from skellyforge.data_models.type_overloads import CameraIdString, FrameObservationsByCamera, Trajectory2dGroup
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseObservation
-from freemocap.core.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCameraGroup
+from freemocap.core.tasks.calibration.anipose_calibration.helpers.freemocap_anipose import AniposeCameraGroup
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/pipeline/pipeline_configs/mocap_task_config.py b/freemocap/core/tasks/mocap/mocap_task_config.py
similarity index 79%
rename from freemocap/core/pipeline/pipeline_configs/mocap_task_config.py
rename to freemocap/core/tasks/mocap/mocap_task_config.py
index 2efce7fa..a7fb5f81 100644
--- a/freemocap/core/pipeline/pipeline_configs/mocap_task_config.py
+++ b/freemocap/core/tasks/mocap/mocap_task_config.py
@@ -5,15 +5,13 @@ from skellytracker.trackers.mediapipe_tracker import MediapipeDetectorConfig
from skellytracker.trackers.mediapipe_tracker.body.mediapipe_pose_config import MediapipePoseConfig
from skellytracker.trackers.mediapipe_tracker.mediapipe_model_manager import MediapipePoseModelComplexity
-from freemocap.core.mocap.skeleton_dewiggler.realtime_skeleton_filter import RealtimeFilterConfig
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationSource
+from freemocap.core.tasks.calibration.calibration_task_config import CalibrationSource
-class MocapPipelineConfig(BaseModel):
+class PosthocMocapPipelineConfig(BaseModel):
model_config = ConfigDict(populate_by_name=True)
detector_config: DetectorConfig = Field(default_factory=LegacyMediapipeDetectorConfig)
- realtime_filter_config: RealtimeFilterConfig = Field(default_factory=RealtimeFilterConfig)
calibration_source: CalibrationSource = Field(
default=CalibrationSource.MOST_RECENT,
alias="calibrationSource",
@@ -32,12 +30,12 @@ class MocapPipelineConfig(BaseModel):
)
@classmethod
- def default_realtime(cls) -> "MocapPipelineConfig":
+ def default_realtime(cls) -> "PosthocMocapPipelineConfig":
# return cls(detector_config=RTMPoseDetectorConfig())
return cls(detector_config=MediapipeDetectorConfig(
pose_config=MediapipePoseConfig(model_complexity=MediapipePoseModelComplexity.LITE)
))
@classmethod
- def default_posthoc(cls) -> "MocapPipelineConfig":
+ def default_posthoc(cls) -> "PosthocMocapPipelineConfig":
return cls(detector_config=LegacyMediapipeDetectorConfig())
diff --git a/freemocap/core/mocap/posthoc_mocap_task.py b/freemocap/core/tasks/mocap/posthoc_mocap_task.py
similarity index 89%
rename from freemocap/core/mocap/posthoc_mocap_task.py
rename to freemocap/core/tasks/mocap/posthoc_mocap_task.py
index 55c86470..583b1a6f 100644
--- a/freemocap/core/mocap/posthoc_mocap_task.py
+++ b/freemocap/core/tasks/mocap/posthoc_mocap_task.py
@@ -16,30 +16,28 @@ from typing import TYPE_CHECKING
import toml
-from freemocap.core.pipeline.pipeline_configs.calibration_task_config import CalibrationSource
-from freemocap.core.pipeline.pipeline_configs.mocap_task_config import MocapPipelineConfig
+from freemocap.core.tasks.calibration.calibration_task_config import CalibrationSource
+from freemocap.core.tasks.mocap.mocap_task_config import PosthocMocapPipelineConfig
if TYPE_CHECKING:
from skellyforge.skellymodels.managers.human import Human
from skellycam.core.recorders.videos.recording_info import RecordingInfo
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseObservation, BaseRecorder
-from skellytracker.trackers.legacy_mediapipe_tracker.legacy_mediapipe_observation import LegacyMediapipeObservations, \
- LegacyMediapipeObservation
+from skellytracker.trackers.legacy_mediapipe_tracker.legacy_mediapipe_observation import LegacyMediapipeObservation
from skellytracker.trackers.mediapipe_tracker import MediapipeObservation
from freemocap.core.blender.export_to_blender import export_to_blender
-from freemocap.core.blender.helpers.get_best_guess_of_blender_path import get_best_guess_of_blender_path
-from freemocap.core.calibration.shared.calibration_models import CalibrationResult
-from freemocap.core.calibration.shared.calibration_paths import get_last_successful_calibration_toml_path
-from freemocap.core.calibration.shared.feet_groundplane import (
+from freemocap.core.tasks.calibration.shared.calibration_models import CalibrationResult
+from freemocap.core.tasks.calibration.shared.calibration_paths import get_last_successful_calibration_toml_path
+from freemocap.core.tasks.calibration.shared.feet_groundplane import (
estimate_groundplane_from_feet,
build_mediapipe_body_marker_name_to_index,
)
-from freemocap.core.calibration.shared.groundplane_alignment import (
+from freemocap.core.tasks.calibration.shared.groundplane_alignment import (
apply_groundplane_to_cameras,
groundplane_metadata,
)
-from freemocap.core.mocap.mocap_helpers.skeleton_from_mediapipe_observations import \
+from freemocap.core.tasks.mocap.mocap_helpers.skeleton_from_mediapipe_observations import \
skeleton_from_mediapipe_observation_recorders
from freemocap.core.pipeline.posthoc.video_group_helper import VideoMetadata
from freemocap.core.types.type_overloads import VideoIdString
@@ -48,12 +46,12 @@ from freemocap.utilities.toml_mixin import numpy_to_python
logger = logging.getLogger(__name__)
-def run_post_mocap_aggregation_task(
+def run_posthoc_mocap_aggregator_task(
*,
frame_observations: list[dict[VideoIdString, BaseObservation]],
recording_info: RecordingInfo,
video_metadata: dict[VideoIdString, VideoMetadata],
- task_config: MocapPipelineConfig,
+ task_config: PosthocMocapPipelineConfig,
create_blender_output: bool=True, #TODO - Add this to the mocap config, after we split the RT and PH pipeline
report_progress: Callable[[str, float], None] | None = None,
@@ -150,7 +148,7 @@ def _maybe_apply_feet_groundplane(
skeleton: "Human",
calibration_toml_path: Path,
recording_id: str,
- task_config: MocapPipelineConfig,
+ task_config: PosthocMocapPipelineConfig,
) -> None:
"""Apply feet-based ground plane to camera calibration if appropriate.
@@ -158,9 +156,7 @@ def _maybe_apply_feet_groundplane(
- update_camera_positions_from_feet is False in config
- Ground plane was already applied during calibration (unless force_reestimate)
"""
- if not task_config.update_camera_positions_from_feet:
- logger.debug("Feet ground plane update disabled in config")
- return
+
# Check if groundplane was already applied during calibration
if not task_config.force_reestimate_groundplane:
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/__init__.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/__init__.py
similarity index 100%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/__init__.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/__init__.py
diff --git a/freemocap/core/pipeline/pipeline_configs/__init__.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/__init__.py
similarity index 100%
rename from freemocap/core/pipeline/pipeline_configs/__init__.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/__init__.py
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/bone_length_estimator.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/bone_length_estimator.py
similarity index 99%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/bone_length_estimator.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/bone_length_estimator.py
index 93fb255b..eb0280ef 100644
--- a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/bone_length_estimator.py
+++ b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/bone_length_estimator.py
@@ -44,7 +44,8 @@ from dataclasses import dataclass, field
import numpy as np
from pydantic import BaseModel, ConfigDict, model_validator
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import SkeletonDefinition
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import \
+ SkeletonDefinition
# ============================================================
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/fabrik_solver.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/fabrik_solver.py
similarity index 98%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/fabrik_solver.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/fabrik_solver.py
index 053c2e0b..1ef18fe4 100644
--- a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/fabrik_solver.py
+++ b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/fabrik_solver.py
@@ -35,7 +35,8 @@ from dataclasses import dataclass
import numpy as np
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import SkeletonDefinition
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import \
+ SkeletonDefinition
# ============================================================
@@ -350,4 +351,4 @@ def estimate_bone_lengths(
raise ValueError(f"No samples found for bone '{bone_key}'")
bone_lengths[bone_key] = float(np.median(samples))
- return bone_lengths
\ No newline at end of file
+ return bone_lengths
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/mediapipe_skeleton_config.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/mediapipe_skeleton_config.py
similarity index 100%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/mediapipe_skeleton_config.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/mediapipe_skeleton_config.py
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/one_euro_filter.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/one_euro_filter.py
similarity index 100%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/one_euro_filter.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/one_euro_filter.py
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/realtime_point_gate.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/realtime_point_gate.py
similarity index 100%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/realtime_point_gate.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/realtime_point_gate.py
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/rigid_body_estimator.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/rigid_body_estimator.py
similarity index 97%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/rigid_body_estimator.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/rigid_body_estimator.py
index 8d5f5e9e..0775e00f 100644
--- a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/rigid_body_estimator.py
+++ b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/rigid_body_estimator.py
@@ -33,8 +33,8 @@ Usage:
import numpy as np
from pydantic import BaseModel, ConfigDict
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import SkeletonDefinition
-
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import \
+ SkeletonDefinition
# World-up vector for zero-roll constraint (Y-up, matching freemocap convention).
_WORLD_UP: np.ndarray = np.array([0.0, 1.0, 0.0])
diff --git a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/skeleton_filter_pipeline.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/skeleton_filter_pipeline.py
similarity index 99%
rename from freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/skeleton_filter_pipeline.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/skeleton_filter_pipeline.py
index e5da17ce..cd538447 100644
--- a/freemocap/core/mocap/skeleton_dewiggler/dewiggling_methods/skeleton_filter_pipeline.py
+++ b/freemocap/core/tasks/mocap/skeleton_dewiggler/dewiggling_methods/skeleton_filter_pipeline.py
@@ -39,8 +39,8 @@ import numpy as np
from pydantic import BaseModel, ConfigDict
from fabrik_solver import FabrikTree, estimate_bone_lengths, solve_fabrik_tree
-from one_euro_filter import OneEuroFilter3D
from mediapipe_skeleton_config import SkeletonDefinition
+from one_euro_filter import OneEuroFilter3D
class FilterConfig(BaseModel):
@@ -196,4 +196,4 @@ class SkeletonFilterPipeline:
else:
result = filtered
- return result
\ No newline at end of file
+ return result
diff --git a/freemocap/core/mocap/skeleton_dewiggler/realtime_skeleton_filter.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/realtime_skeleton_filter.py
similarity index 96%
rename from freemocap/core/mocap/skeleton_dewiggler/realtime_skeleton_filter.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/realtime_skeleton_filter.py
index df161014..7fef0e33 100644
--- a/freemocap/core/mocap/skeleton_dewiggler/realtime_skeleton_filter.py
+++ b/freemocap/core/tasks/mocap/skeleton_dewiggler/realtime_skeleton_filter.py
@@ -38,11 +38,12 @@ from dataclasses import dataclass, field
import numpy as np
from pydantic import BaseModel
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import EstimatorConfig, \
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import EstimatorConfig, \
BoneLengthEstimator, AnthropometricPrior
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.fabrik_solver import FabrikTree, solve_fabrik_tree
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import SkeletonDefinition
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.one_euro_filter import OneEuroFilter3D
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.fabrik_solver import FabrikTree, solve_fabrik_tree
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import \
+ SkeletonDefinition
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.one_euro_filter import OneEuroFilter3D
logger = logging.getLogger(__name__)
diff --git a/freemocap/core/mocap/skeleton_dewiggler/run_pipeline.py b/freemocap/core/tasks/mocap/skeleton_dewiggler/run_pipeline.py
similarity index 94%
rename from freemocap/core/mocap/skeleton_dewiggler/run_pipeline.py
rename to freemocap/core/tasks/mocap/skeleton_dewiggler/run_pipeline.py
index 7095d8e0..6843fa12 100644
--- a/freemocap/core/mocap/skeleton_dewiggler/run_pipeline.py
+++ b/freemocap/core/tasks/mocap/skeleton_dewiggler/run_pipeline.py
@@ -11,9 +11,12 @@ Produces:
import numpy as np
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import AnthropometricPrior, BoneLengthEstimator, EstimatorConfig
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import SkeletonDefinition
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.skeleton_filter_pipeline import FilterConfig, SkeletonFilterPipeline
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import AnthropometricPrior, \
+ BoneLengthEstimator, EstimatorConfig
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.mediapipe_skeleton_config import \
+ SkeletonDefinition
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.skeleton_filter_pipeline import FilterConfig, \
+ SkeletonFilterPipeline
def run_pipeline(
@@ -195,4 +198,4 @@ if __name__ == "__main__":
raw_jitter = np.mean(np.std(np.diff(skeleton_fr_name_xyz, axis=0), axis=0))
filtered_jitter = np.mean(np.std(np.diff(filtered, axis=0), axis=0))
print(f"Mean frame-to-frame jitter std: raw={raw_jitter*1000:.2f}mm β†’ filtered={filtered_jitter*1000:.2f}mm")
- print(f"Jitter reduction: {(1 - filtered_jitter/raw_jitter)*100:.0f}%")
\ No newline at end of file
+ print(f"Jitter reduction: {(1 - filtered_jitter/raw_jitter)*100:.0f}%")
diff --git a/freemocap/core/viz/frontend_payload.py b/freemocap/core/viz/frontend_payload.py
index cc6d49da..bc234bef 100644
--- a/freemocap/core/viz/frontend_payload.py
+++ b/freemocap/core/viz/frontend_payload.py
@@ -4,10 +4,10 @@ from pydantic import BaseModel, ConfigDict
from skellycam.core.types.type_overloads import CameraIdString
from skellyforge.data_models.trajectory_3d import Point3d
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.rigid_body_estimator import RigidBodyPose
+from freemocap.core.types.type_overloads import TrackedPointNameString
from freemocap.core.viz.image_overlay.charuco_overlay_data import CharucoOverlayData
from freemocap.core.viz.image_overlay.mediapipe_overlay_data import MediapipeOverlayData
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.rigid_body_estimator import RigidBodyPose
-from freemocap.core.types.type_overloads import TrackedPointNameString
from freemocap.pubsub.pubsub_topics import AggregationNodeOutputMessage
logger = logging.getLogger(__name__)
@@ -40,7 +40,7 @@ class FrontendPayload(BaseModel):
frame_number=aggregation_output.frame_number,
charuco_overlays=aggregation_output.charuco_overlay_data,
mediapipe_overlays=aggregation_output.mediapipe_overlay_data,
- tracked_points3d=aggregation_output.tracked_points3d,
+ tracked_points3d=aggregation_output.raw_keypoints,
rigid_body_poses=aggregation_output.rigid_body_poses,
)
@@ -64,4 +64,4 @@ class FrontendPayload(BaseModel):
bone_key: pose.model_dump()
for bone_key, pose in self.rigid_body_poses.items()
},
- }
\ No newline at end of file
+ }
diff --git a/freemocap/pubsub/pubsub_topics.py b/freemocap/pubsub/pubsub_topics.py
index b39360c1..25ff3fbd 100644
--- a/freemocap/pubsub/pubsub_topics.py
+++ b/freemocap/pubsub/pubsub_topics.py
@@ -12,8 +12,8 @@ from skellycam.core.types.type_overloads import CameraGroupIdString, CameraIdStr
from skellyforge.data_models.trajectory_3d import Point3d
from skellytracker.trackers.base_tracker.base_tracker_abcs import BaseObservation
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.rigid_body_estimator import RigidBodyPose
+from freemocap.core.pipeline.realtime.realtime_pipeline_config import RealtimePipelineConfig
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.rigid_body_estimator import RigidBodyPose
from freemocap.core.types.type_overloads import (
FrameNumberInt,
PipelineIdString,
@@ -75,10 +75,11 @@ class VideoNodeOutputMessage(TopicMessageABC):
class AggregationNodeOutputMessage(TopicMessageABC):
frame_number: FrameNumberInt = Field(ge=0)
pipeline_id: PipelineIdString
- camera_group_id: CameraGroupIdString
pipeline_config: RealtimePipelineConfig
+ camera_group_id: CameraGroupIdString
camera_node_outputs: dict[CameraIdString, CameraNodeOutputMessage]
- tracked_points3d: dict[TrackedPointNameString, Point3d] = Field(default_factory=dict)
+ raw_keypoints: dict[TrackedPointNameString, Point3d] = Field(default_factory=dict)
+ filtered_keypoints: dict[TrackedPointNameString, Point3d] = Field(default_factory=dict)
rigid_body_poses: dict[str, RigidBodyPose] = Field(default_factory=dict)
@model_validator(mode='after')
diff --git a/freemocap/system/logging_configuration/handlers/websocket_log_queue_handler.py b/freemocap/system/logging_configuration/handlers/websocket_log_queue_handler.py
index e811cb1d..843a7e5d 100644
--- a/freemocap/system/logging_configuration/handlers/websocket_log_queue_handler.py
+++ b/freemocap/system/logging_configuration/handlers/websocket_log_queue_handler.py
@@ -7,10 +7,10 @@ from typing import Optional
from pydantic import BaseModel
-from ..log_levels import LogLevels
from ..filters.delta_time import DeltaTimeFilter
from ..formatters.custom_formatter import CustomFormatter
from ..log_format_string import LOG_FORMAT_STRING
+from ..log_levels import LogLevels
MIN_LOG_LEVEL_FOR_WEBSOCKET = LogLevels.TRACE.value
@@ -139,4 +139,4 @@ def get_websocket_log_queue() -> Queue:
global WEBSOCKET_LOG_QUEUE
if WEBSOCKET_LOG_QUEUE is None:
raise ValueError("Websocket log queue not created yet")
- return WEBSOCKET_LOG_QUEUE
\ No newline at end of file
+ return WEBSOCKET_LOG_QUEUE
diff --git a/freemocap/tests/conftest.py b/freemocap/tests/conftest.py
index 8ecbba2f..0cd5abc7 100644
--- a/freemocap/tests/conftest.py
+++ b/freemocap/tests/conftest.py
@@ -15,7 +15,10 @@ from unittest.mock import MagicMock, patch
import pytest
from fastapi import APIRouter, FastAPI, WebSocket
from fastapi.testclient import TestClient
-from starlette.websockets import WebSocketState
+from freemocap.core.pipeline.pipeline_configs import (
+ CalibrationPipelineConfig,
+ MocapPipelineConfig,
+)
from freemocap.api.http.calibration.calibration_router import calibration_router
from freemocap.api.http.mocap.mocap_router import mocap_router
@@ -24,10 +27,6 @@ from freemocap.app.settings_protocol import (
handle_settings_message,
settings_state_relay,
)
-from freemocap.core.pipeline.pipeline_configs import (
- CalibrationPipelineConfig,
- MocapPipelineConfig,
-)
# ---------------------------------------------------------------------------
diff --git a/freemocap/tests/test_e2e_http_settings_sync.py b/freemocap/tests/test_e2e_http_settings_sync.py
index 40eed3f5..8dc13559 100644
--- a/freemocap/tests/test_e2e_http_settings_sync.py
+++ b/freemocap/tests/test_e2e_http_settings_sync.py
@@ -16,10 +16,9 @@ What these catch that unit tests don't:
"""
from unittest.mock import patch
-import pytest
from fastapi.testclient import TestClient
-
from freemocap.core.pipeline.pipeline_configs import MocapPipelineConfig
+
from freemocap.tests.conftest import MockFreemocapApp
diff --git a/freemocap/tests/test_e2e_pipeline.py b/freemocap/tests/test_e2e_pipeline.py
index 979a3338..74234481 100644
--- a/freemocap/tests/test_e2e_pipeline.py
+++ b/freemocap/tests/test_e2e_pipeline.py
@@ -17,19 +17,19 @@ from pathlib import Path
import cv2
import numpy as np
import pytest
-from skellycam.core.ipc.process_management.managed_worker import WorkerMode
-from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
-from skellycam.core.recorders.videos.recording_info import RecordingInfo
-
-from freemocap.core.calibration.shared.calibration_paths import (
- get_last_successful_calibration_toml_path,
-)
from freemocap.core.pipeline.pipeline_configs import (
CalibrationPipelineConfig,
MocapPipelineConfig,
)
+from skellycam.core.ipc.process_management.managed_worker import WorkerMode
+from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
+from skellycam.core.recorders.videos.recording_info import RecordingInfo
+
from freemocap.core.pipeline.posthoc.posthoc_pipeline import PosthocPipeline
from freemocap.core.pipeline.posthoc.posthoc_pipeline_manager import PosthocPipelineManager
+from freemocap.core.tasks.calibration.shared.calibration_paths import (
+ get_last_successful_calibration_toml_path,
+)
from freemocap.system.default_paths import FREEMOCAP_TEST_DATA_PATH
PIPELINE_TIMEOUT_SECONDS = 600
diff --git a/freemocap/tests/test_e2e_websocket_settings_sync.py b/freemocap/tests/test_e2e_websocket_settings_sync.py
index 1065efd8..bff4c5c7 100644
--- a/freemocap/tests/test_e2e_websocket_settings_sync.py
+++ b/freemocap/tests/test_e2e_websocket_settings_sync.py
@@ -13,7 +13,6 @@ What these catch that unit tests don't:
"""
from unittest.mock import patch
-import pytest
from fastapi.testclient import TestClient
from freemocap.tests.conftest import MockFreemocapApp
diff --git a/freemocap/tests/test_http_config_endpoints.py b/freemocap/tests/test_http_config_endpoints.py
index f41e3866..f1d41e3d 100644
--- a/freemocap/tests/test_http_config_endpoints.py
+++ b/freemocap/tests/test_http_config_endpoints.py
@@ -7,22 +7,21 @@ Uses FastAPI TestClient with a mocked FreemocapApplication.
"""
import threading
from copy import deepcopy
-from dataclasses import dataclass, field
from typing import Any
from unittest.mock import MagicMock, patch
import pytest
from fastapi import FastAPI
from fastapi.testclient import TestClient
-
-from freemocap.api.http.calibration.calibration_router import calibration_router
-from freemocap.api.http.mocap.mocap_router import mocap_router
-from freemocap.app.settings import SettingsManager
from freemocap.core.pipeline.pipeline_configs import (
CalibrationPipelineConfig,
MocapPipelineConfig,
)
+from freemocap.api.http.calibration.calibration_router import calibration_router
+from freemocap.api.http.mocap.mocap_router import mocap_router
+from freemocap.app.settings import SettingsManager
+
# ---------------------------------------------------------------------------
# Mock pipeline for testing config sync
diff --git a/freemocap/tests/test_schema_contract.py b/freemocap/tests/test_schema_contract.py
index 74678606..99741b83 100644
--- a/freemocap/tests/test_schema_contract.py
+++ b/freemocap/tests/test_schema_contract.py
@@ -5,7 +5,12 @@ the frontend TypeScript types expect.
These catch field name drift, missing fields, and default value mismatches
between the Python backend and the React frontend.
"""
-import pytest
+
+from freemocap.core.pipeline.pipeline_configs import (
+ CalibrationPipelineConfig,
+ CalibrationSolverMethod,
+ MocapPipelineConfig,
+)
from freemocap.app.settings import (
CalibrationSettings,
@@ -17,14 +22,8 @@ from freemocap.app.settings import (
SettingsManager,
VMCSettings,
)
-from freemocap.core.pipeline.pipeline_configs import (
- CalibrationPipelineConfig,
- CalibrationSolverMethod,
- MocapPipelineConfig,
-)
-from freemocap.core.pipeline.pipeline_configs.realtime_pipeline_config import RealtimePipelineConfig
-from freemocap.core.mocap.skeleton_dewiggler.realtime_skeleton_filter import RealtimeFilterConfig
-from freemocap.core.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import EstimatorConfig
+from freemocap.core.tasks.mocap.skeleton_dewiggler.dewiggling_methods.bone_length_estimator import EstimatorConfig
+from freemocap.core.tasks.mocap.skeleton_dewiggler.realtime_skeleton_filter import RealtimeFilterConfig
# ---------------------------------------------------------------------------
diff --git a/freemocap/tests/test_settings_manager.py b/freemocap/tests/test_settings_manager.py
index 0bf6993b..5277788c 100644
--- a/freemocap/tests/test_settings_manager.py
+++ b/freemocap/tests/test_settings_manager.py
@@ -8,9 +8,7 @@ import copy
import pytest
from freemocap.app.settings import (
- CalibrationSettings,
FreeMoCapSettings,
- MocapSettings,
SettingsManager,
_deep_merge,
)
diff --git a/freemocap/tests/test_websocket_settings_protocol.py b/freemocap/tests/test_websocket_settings_protocol.py
index 9d09f8a5..c7e8aecb 100644
--- a/freemocap/tests/test_websocket_settings_protocol.py
+++ b/freemocap/tests/test_websocket_settings_protocol.py
@@ -3,13 +3,17 @@ WebSocket settings protocol tests: verify handle_settings_message routing,
patch application, pipeline sync, and the settings_state_relay push loop.
"""
import asyncio
-import json
import threading
from copy import deepcopy
from typing import Any
-from unittest.mock import AsyncMock, MagicMock
+from unittest.mock import MagicMock
import pytest
+from freemocap.core.pipeline.pipeline_configs import (
+ CalibrationPipelineConfig,
+ MocapPipelineConfig,
+)
+from starlette.websockets import WebSocketState
from freemocap.app.settings import SettingsManager
from freemocap.app.settings_protocol import (
@@ -17,13 +21,6 @@ from freemocap.app.settings_protocol import (
handle_settings_message,
settings_state_relay,
)
-from freemocap.core.pipeline.pipeline_configs import (
- CalibrationPipelineConfig,
- MocapPipelineConfig,
-)
-
-
-from starlette.websockets import WebSocketState
# ---------------------------------------------------------------------------
diff --git a/pyproject.toml b/pyproject.toml
index e86cddf2..3d2fd0ce 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -15,19 +15,17 @@ dependencies = [
"scikit-learn>=1.7.2",
"pyceres>=2.5",
"tomli-w>=1.2.0",
-# "rtmlib==0.0.14",
-# "onnxruntime-gpu",
-
+ # "rtmlib==0.0.14",
+ # "onnxruntime-gpu",
#sub-skellies
"freemocap_blender_addon",
"skellycam",
"skellyforge",
"skellytracker[mediapipe]",
-
#skelly utils
"skellylogs",
"skellypings",
-
+ "scipy-stubs~=1.16.3",
]
[tool.uv.sources]
diff --git a/scripts/compare_calibrations.py b/scripts/compare_calibrations.py
index 7556c231..30df2454 100644
--- a/scripts/compare_calibrations.py
+++ b/scripts/compare_calibrations.py
@@ -11,7 +11,7 @@ import numpy as np
from numpy.typing import NDArray
from pydantic import BaseModel, ConfigDict
-from freemocap.core.calibration.shared.calibration_models import CharucoBoardDefinition, CameraModel, \
+from freemocap.core.tasks.calibration.shared.calibration_models import CharucoBoardDefinition, CameraModel, \
CharucoCornersObservation, CalibrationResult
logger = logging.getLogger(__name__)
@@ -551,4 +551,4 @@ def compare_calibration_results(
max_world_position_delta_mm=float(np.max(pos_deltas)),
mean_rotation_delta_deg=float(np.mean(rot_deltas)),
max_rotation_delta_deg=float(np.max(rot_deltas)),
- )
\ No newline at end of file
+ )
diff --git a/scripts/run_posthoc_calibration.py b/scripts/run_posthoc_calibration.py
index 30efab28..ba56a1dd 100644
--- a/scripts/run_posthoc_calibration.py
+++ b/scripts/run_posthoc_calibration.py
@@ -18,8 +18,6 @@ import multiprocessing
import time
from pathlib import Path
-from freemocap.core.pipeline.posthoc.posthoc_pipeline_manager import PosthocPipelineManager
-from freemocap.core.pipeline.posthoc.video_group_helper import VideoGroupHelper
from freemocap.core.pipeline.pipeline_configs import (
CalibrationPipelineConfig,
CalibrationSolverMethod,
@@ -27,6 +25,8 @@ from freemocap.core.pipeline.pipeline_configs import (
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.recorders.videos.recording_info import RecordingInfo
+from freemocap.core.pipeline.posthoc.posthoc_pipeline_manager import PosthocPipelineManager
+from freemocap.core.pipeline.posthoc.video_group_helper import VideoGroupHelper
logger = logging.getLogger(__name__)
@@ -156,4 +156,4 @@ if __name__ == "__main__":
run_posthoc_calibration(
recording_path=RECORDING_PATH,
calibration_config=CONFIG
- )
\ No newline at end of file
+ )
diff --git a/scripts/run_posthoc_calibration_comparison.py b/scripts/run_posthoc_calibration_comparison.py
index bbfc3224..0a098b18 100644
--- a/scripts/run_posthoc_calibration_comparison.py
+++ b/scripts/run_posthoc_calibration_comparison.py
@@ -16,14 +16,6 @@ import shutil
import time
from pathlib import Path
-from freemocap.core.pipeline.posthoc.posthoc_calibration_task.shared.calibration_models import CalibrationResult, \
- CharucoCornersObservation
-from freemocap.core.pipeline.posthoc.posthoc_calibration_task.shared.calibration_paths import (
- create_camera_calibration_file_name,
-)
-
-from freemocap.core.pipeline.posthoc.posthoc_pipeline_manager import PosthocPipelineManager
-from freemocap.core.pipeline.posthoc.video_group_helper import VideoGroupHelper
from freemocap.core.pipeline.pipeline_configs import (
CalibrationPipelineConfig,
CalibrationSolverMethod,
@@ -31,6 +23,13 @@ from freemocap.core.pipeline.pipeline_configs import (
from skellycam.core.ipc.process_management.worker_registry import WorkerRegistry
from skellycam.core.recorders.videos.recording_info import RecordingInfo
+from freemocap.core.pipeline.posthoc import CalibrationResult, \
+ CharucoCornersObservation
+from freemocap.core.pipeline.posthoc import (
+ create_camera_calibration_file_name,
+)
+from freemocap.core.pipeline.posthoc.posthoc_pipeline_manager import PosthocPipelineManager
+from freemocap.core.pipeline.posthoc.video_group_helper import VideoGroupHelper
from scripts.compare_calibrations import CalibrationComparisonResult, compare_calibration_results
logger = logging.getLogger(__name__)
diff --git a/uv.lock b/uv.lock
index 84928e33..906127fd 100644
--- a/uv.lock
+++ b/uv.lock
@@ -531,6 +531,7 @@ dependencies = [
{ name = "pyinstaller" },
{ name = "requests" },
{ name = "scikit-learn" },
+ { name = "scipy-stubs" },
{ name = "skellycam" },
{ name = "skellyforge" },
{ name = "skellylogs" },
@@ -564,6 +565,7 @@ requires-dist = [
{ name = "pyinstaller", specifier = ">=6.11.0" },
{ name = "requests", specifier = ">=2.32.3" },
{ name = "scikit-learn", specifier = ">=1.7.2" },
+ { name = "scipy-stubs", specifier = "~=1.16.3" },
{ name = "skellycam", git = "https://github.com/freemocap/skellycam?branch=development" },
{ name = "skellyforge", git = "https://github.com/freemocap/skellyforge?branch=development" },
{ name = "skellylogs", git = "https://github.com/freemocap/skellylogs" },
@@ -1031,6 +1033,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/28/75/3b679b41713bb60e2e8f6e2f87be72c971c9e718b1c17b8f8749240ddca8/numpy-1.26.2-cp312-cp312-win_amd64.whl", hash = "sha256:b04f5dc6b3efdaab541f7857351aac359e6ae3c126e2edb376929bd3b7f92d7e", size = 15504951, upload-time = "2023-11-12T23:07:33.828Z" },
]
+[[package]]
+name = "numpy-typing-compat"
+version = "20251206.1.25"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "numpy" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/f9/63/f166333649396d083b9e95b5aa15feb56f9168f766a72540132206119937/numpy_typing_compat-20251206.1.25.tar.gz", hash = "sha256:27ff188fe70102312ea5e8553423897a4f3365eee15aa2a7ee1fcf6efc6fed12", size = 5060, upload-time = "2025-12-06T20:02:00.974Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/b4/cb/99443f79c562466d128e3bf94d1507146fba386ec2ce85e97fe916225691/numpy_typing_compat-20251206.1.25-py3-none-any.whl", hash = "sha256:9be87412b68c1e9e193e7bfd996cae4ec07de5880c19d70bf81f890f51644e7f", size = 6354, upload-time = "2025-12-06T20:01:51.007Z" },
+]
+
[[package]]
name = "numpydantic"
version = "1.8.0"
@@ -1070,6 +1084,24 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl", hash = "sha256:69bb92469f86a1565195ece4ac0323943e83477171b91d24c35afe028a90d7cd", size = 71932, upload-time = "2024-09-26T14:33:23.039Z" },
]
+[[package]]
+name = "optype"
+version = "0.15.0"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "typing-extensions", marker = "python_full_version < '3.13'" },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/d7/93/6b9e43138ce36fbad134bd1a50460a7bbda61105b5a964e4cf773fe4d845/optype-0.15.0.tar.gz", hash = "sha256:457d6ca9e7da19967ec16d42bdf94e240b33b5d70a56fbbf5b427e5ea39cf41e", size = 99978, upload-time = "2025-12-08T12:32:41.422Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/07/8b/93f6c496fc5da062fd7e7c4745b5a8dd09b7b576c626075844fe97951a7d/optype-0.15.0-py3-none-any.whl", hash = "sha256:caba40ece9ea39b499fa76c036a82e0d452a432dd4dd3e8e0d30892be2e8c76c", size = 88716, upload-time = "2025-12-08T12:32:39.669Z" },
+]
+
+[package.optional-dependencies]
+numpy = [
+ { name = "numpy" },
+ { name = "numpy-typing-compat" },
+]
+
[[package]]
name = "packaging"
version = "26.0"
@@ -2056,6 +2088,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/64/47/a494741db7280eae6dc033510c319e34d42dd41b7ac0c7ead39354d1a2b5/scipy-1.16.3-cp314-cp314t-win_arm64.whl", hash = "sha256:21d9d6b197227a12dcbf9633320a4e34c6b0e51c57268df255a0942983bac562", size = 26464127, upload-time = "2025-10-28T17:38:11.34Z" },
]
+[[package]]
+name = "scipy-stubs"
+version = "1.16.3.3"
+source = { registry = "https://pypi.org/simple" }
+dependencies = [
+ { name = "optype", extra = ["numpy"] },
+]
+sdist = { url = "https://files.pythonhosted.org/packages/08/91/1700d2a1a9f64f19bb019a547e510b99a6af1fef49641a0bce86bc85fb8e/scipy_stubs-1.16.3.3.tar.gz", hash = "sha256:af47578875d5557567225a16ec1b9b38a48c4c4377d92396413ebd65406c44ee", size = 361468, upload-time = "2025-12-08T13:45:38.37Z" }
+wheels = [
+ { url = "https://files.pythonhosted.org/packages/7c/e2/3b8826f281f59301e3284989b19cfc56fdccf799134c1befedd38482a23a/scipy_stubs-1.16.3.3-py3-none-any.whl", hash = "sha256:f6316b36cd0fb272c994ae5b10c4a73c644a7e156ed8d32bcd9c35303d0e1b7e", size = 561750, upload-time = "2025-12-08T13:45:36.568Z" },
+]
+
[[package]]
name = "setproctitle"
version = "1.3.3"