Skip to content

Architecture

Michael Maier edited this page Jun 27, 2022 · 1 revision

I plan to document the architecture in more detail, but for now, I give you a quick overview. The main loop is Cameraman. It reads frames from LiveView, passes each frame to the object detection engine (returns target), updates the CameramanModeManager and the UI (native and server image). The CameramanModeManager updates the PTZ camera based on the current mode. There a several modes ( searching, aligning, tracking) that lead to a call of a strategy (SearchTargetStrategy, AlignTrackingStrategy, TrackingStrategy), which calculate/update the target speeds of the PTZ camera. If the mode is manual, the target speeds have been set using the manual control methods/API. In all those cases/modes, the CameraController is updated based on the target speeds. The only exception is the mode angle, since its dirty impelemtation bypasses the regular control API. It only requires one call to simplebgc.serial_example.control_gimbal. Then no further update is required. On the other hand, CameraController is called every frame of the live view (tick of the main loop). For example, the implementation SmoothCameraController increases the current (target) speeds gradually each call till the (end) target speeds are reached. The speeds are passed to robot_cameraman.gimbal.Gimbal and PanasonicCameraManager. They control the devices (gimbal, camera zoom) to actually reach the current target speeds.

Clone this wiki locally