Skip to content

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

TypeScript

calibration pipeline runs

jonmatthisa9784c1f0a00
diff --git a/freemocap/__main__.py b/freemocap/__main__.py
index 3461b552..5fbc894b 100644
--- a/freemocap/__main__.py
+++ b/freemocap/__main__.py
@@ -14,7 +14,7 @@ from freemocap.utilities.get_process_name import get_process_name
from freemocap.utilities.setup_windows_app_id import setup_app_id_for_windows
logger = logging.getLogger(__name__)
-configure_logging(LogLevels.LOOP)
+configure_logging(LogLevels.TRACE)
if get_process_name().lower() == "mainprocess":
print_log_level_messages(logger)
diff --git a/freemocap/freemocap_app/freemocap_app_state.py b/freemocap/freemocap_app/freemocap_app_state.py
index 447d664e..64111dbf 100644
--- a/freemocap/freemocap_app/freemocap_app_state.py
+++ b/freemocap/freemocap_app/freemocap_app_state.py
@@ -74,7 +74,7 @@ class FreemocapAppState:
return CalibrationProcessingServer.create(
pipeline_config=CalibrationPipelineConfig.create(camera_configs=self.camera_configs,
- tracker_config=CharucoTrackerConfig.create()
+ tracker_config=CharucoTrackerConfig()
),
camera_shm_dtos=self.get_camera_shm_dtos(),
shutdown_event=self.pipeline_shutdown_event,
diff --git a/freemocap/pipelines/calibration_pipeline/calibration_camera_node.py b/freemocap/pipelines/calibration_pipeline/calibration_camera_node.py
index 870ebb15..1bc286f8 100644
--- a/freemocap/pipelines/calibration_pipeline/calibration_camera_node.py
+++ b/freemocap/pipelines/calibration_pipeline/calibration_camera_node.py
@@ -1,5 +1,6 @@
import logging
import multiprocessing
+from dataclasses import dataclass
from multiprocessing import Queue, Process
import time
@@ -15,25 +16,25 @@ from freemocap.pipelines.pipeline_abcs import BaseCameraNode, BasePipelineStageC
logger = logging.getLogger(__name__)
-
+@dataclass
class CalibrationPipelineAggregationLayerOutputData(BasePipelineData):
pass
-
+@dataclass
class CalibrationPipelineAggregationNodeConfig(BasePipelineStageConfig):
param2: int = 2
-
+@dataclass
class CalibrationPipelineCameraNodeConfig(BasePipelineStageConfig):
camera_config: CameraConfig
tracker_config: CharucoTrackerConfig
param1: int = 1
-
+@dataclass
class CalibrationCameraNodeOutputData(BaseCameraNodeOutputData):
data: CharucoObservation
-
+@dataclass
class CalibrationCameraNode(BaseCameraNode):
@classmethod
def create(cls,
@@ -65,7 +66,6 @@ class CalibrationCameraNode(BaseCameraNode):
camera_shm_dto: CameraSharedMemoryDTO,
output_queue: Queue,
shutdown_event: multiprocessing.Event,
- tracker: CharucoTracker
):
logger.trace(f"Camera#{camera_id} processing node started!")
camera_ring_shm = SingleSlotCameraSharedMemory.recreate(
@@ -73,7 +73,7 @@ class CalibrationCameraNode(BaseCameraNode):
camera_shm_dto=camera_shm_dto,
read_only=False)
- charuco_tracker = tracker.value.create(config=config.tracker_config)
+ charuco_tracker = CharucoTracker.create(config=config.tracker_config)
try:
while not shutdown_event.is_set():
diff --git a/freemocap/pipelines/calibration_pipeline/calibration_pipeline_main.py b/freemocap/pipelines/calibration_pipeline/calibration_pipeline_main.py
index 8b583c03..df1cb4bd 100644
--- a/freemocap/pipelines/calibration_pipeline/calibration_pipeline_main.py
+++ b/freemocap/pipelines/calibration_pipeline/calibration_pipeline_main.py
@@ -22,7 +22,7 @@ logger = logging.getLogger(__name__)
-
+@dataclass
class CalibrationPipelineConfig(BasePipelineConfig):
camera_node_configs: dict[CameraId, CalibrationPipelineCameraNodeConfig]
aggregation_node_config: CalibrationAggregationNodeConfig
diff --git a/freemocap/pipelines/pipeline_abcs.py b/freemocap/pipelines/pipeline_abcs.py
index 0142642f..384a1280 100644
--- a/freemocap/pipelines/pipeline_abcs.py
+++ b/freemocap/pipelines/pipeline_abcs.py
@@ -97,8 +97,7 @@ class BaseCameraNode(ABC):
config: BasePipelineStageConfig,
camera_shm_dto: CameraSharedMemoryDTO,
output_queue: Queue,
- shutdown_event: multiprocessing.Event,
- tracker: BaseTracker):
+ shutdown_event: multiprocessing.Event):
raise NotImplementedError(
"Add your camera process logic here! See example in the `freemocap/.../dummy_pipeline.py` file.")
# logger.trace(f"Starting camera processing node for camera {camera_ring_shm_dto.camera_id}")