跳转到内容

uBot Camera Capture Coordinator

C++
UUBotCameraCaptureCoordinatorComponent
父类
UActorComponent
类型
组件 · 可在 Components 面板添加 · 可作为蓝图父类
模块
UBotSensor · UBotSensor 0.1.1
头文件
Source/UBotSensor/Public/UBotCameraCaptureCoordinatorComponent.h

让同一个采集组里的相机在同一仿真时刻采集,共用组序号和时间戳。自动采集按 Update Rate Hz 进行,第一次在启动后一个间隔。

函数 · UUBotCameraCaptureCoordinatorComponent.CaptureGroupOnce

立即采集一组,不要求采集组在运行。组里所有相机都成功时返回 true。

引脚方向类型
Return Value输出Boolean

纯函数 · UUBotCameraCaptureCoordinatorComponent.GetDroppedCaptureCount

因为一帧跨过多个采集间隔而跳过的采集次数。Start Capture Group 时清零。

引脚方向类型
Return Value输出Integer64

纯函数 · UUBotCameraCaptureCoordinatorComponent.GetRegisteredCameraCount

登记在这个组 ID 下的相机数。

引脚方向类型
Return Value输出Integer

纯函数 · UUBotCameraCaptureCoordinatorComponent.IsCaptureGroupRunning

自动采集是否在运行。

引脚方向类型
Return Value输出Boolean

函数 · UUBotCameraCaptureCoordinatorComponent.StartCaptureGroup

启动自动采集,第一次采集在一个间隔之后。Enabled 为 false 或协调器没有注册成功时返回 false。

引脚方向类型
Return Value输出Boolean

函数 · UUBotCameraCaptureCoordinatorComponent.StopCaptureGroup

停止自动采集。手动调用 Capture Group Once 仍然可用。

在 Components 面板选中组件,在 Details 面板底部 Events 区点事件旁的 + 即可生成事件节点。

事件 · UUBotCameraCaptureCoordinatorComponent.OnCaptureGroupError

采集组出错时触发,Error Message 是原因。

引脚方向类型
Error Message输出String

未特别标注的属性:蓝图里只读,Details 面板里可以编辑。

属性类型默认值说明
Auto StartbAutoStart · Camera Capture GroupBooleantrue为 true 时在 BeginPlay 自动启动采集组。
Capture Group IdCaptureGroupId · Camera Capture GroupString""采集组 ID,必须非空,并与组内相机上的 Capture Group Id 一致。一个 ID 只能有一个协调器。
EnabledbEnabled · Camera Capture GroupBooleantrue总开关。为 false 时 Start Capture Group 和 Capture Group Once 都返回 false。
Update Rate HzUpdateRateHz · Camera Capture GroupFloat30.0整组的采集频率,单位 Hz,范围 0.1 到 240。范围 0.1 – 240.0