perf:雷达数据允许2%丢帧; 平面相机5分钟调整一次曝光,增加了发包间隔
This commit is contained in:
parent
e0545f4bd9
commit
2e3645b1d2
@ -5,9 +5,9 @@
|
||||
| 项目 | 内容 |
|
||||
| --- | --- |
|
||||
| 文档版本 | V1.1 |
|
||||
| 更新日期 | 2026-09-08 |
|
||||
| 适用范围 | UDP 组播状态包、HTTP 当前状态查询 |
|
||||
| 说明 | 在 1.0 基础上增加工作模式、系统激活、设备状态,以及选择机型与检测机型的区分。 |
|
||||
| 更新日期 | 2026-09-18 |
|
||||
| 适用范围 | UDP 组播状态包、HTTP 当前状态查询、本机记录库历史访问 |
|
||||
| 说明 | 在 1.0 基础上增加工作模式、系统激活、设备状态,以及选择机型与检测机型的区分。第 11 节补充 `guide_session`、`guide_detail`、`guide_event` 三表关系。 |
|
||||
|
||||
* 状态 JSON 协议名称为 `ParkingSpaceGuideResult`,`version` 为 `1.1`。
|
||||
|
||||
@ -391,7 +391,7 @@ HTTP 查询返回的数据内容与 UDP 组播数据一致,字段、含义、
|
||||
|
||||
组播和 HTTP **不支持**历史查询,没有历史 URL。当前状态地址见第 2、3 节。
|
||||
|
||||
历史引导过程从本机记录库读取,字段与第 7 节一致,不另列。`status`、`selfCheck` 按对象内字段存储。另有会话起止时间 `startTime`、`endTime`,格式与轮挡时间相同(`yyyy-MM-dd HH:mm:ss`,进行中的结束时间为空)。
|
||||
历史引导过程从本机记录库读取。库内三张表:`guide_session`(一次引导会话)、`guide_detail`(过程采样)、`guide_event`(操作事件)。明细字段与第 7 节 `ParkingSpaceGuideResult` 对应;`status`、`selfCheck` 拆成 `status_`、`selfCheck_` 前缀列,读出后再拼回对象。另有会话起止时间 `startTime`、`endTime`,格式与轮挡时间相同(`yyyy-MM-dd HH:mm:ss`,进行中的结束时间为空)。`sessionUuid` 只作库内关联和回放查询,不是第 7 节结果包字段。
|
||||
|
||||
连接信息:
|
||||
|
||||
@ -404,4 +404,163 @@ HTTP 查询返回的数据内容与 UDP 组播数据一致,字段、含义、
|
||||
| 用户 | parking | 默认账号。 |
|
||||
| 密码 | parking | 默认密码,现场可改。 |
|
||||
|
||||
默认保留最近 30 天。库不可用时引导、组播和 HTTP 仍可用,仅不写历史。
|
||||
默认保留最近 30 天。库不可用时引导、组播和 HTTP 仍可用,仅不写历史。远程控制端也可用 `list_sessions` / `get_session_samples` 读会话和明细,见《停机引导远程控制协议》。
|
||||
|
||||
### 11.1 三表关系
|
||||
|
||||
关联键一律是 `sessionUuid`(`VARCHAR(64)`)。`guide_session.sessionUuid` 唯一。一次点击开始到停止(或急停、自检失败结束)对应 **一条** `guide_session`。
|
||||
|
||||
```
|
||||
guide_session 1 ── sessionUuid ──< N guide_detail (过程采样,必有所属会话)
|
||||
guide_session 1 ── sessionUuid ──< 0..N guide_event (操作事件;开机自检等无会话时为空)
|
||||
```
|
||||
|
||||
| 子表 | 关联字段 | 父表 | 基数 | 外键删除 |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| `guide_detail` | `sessionUuid` NOT NULL | `guide_session.sessionUuid` | 1 对多 | `ON DELETE CASCADE` |
|
||||
| `guide_event` | `sessionUuid` 可空 | `guide_session.sessionUuid` | 1 对 0..多 | `ON DELETE CASCADE`;`NULL` 行不随会话删除 |
|
||||
|
||||
约束要点:
|
||||
|
||||
- 明细必须先有会话。开始引导写入 `guide_session` 后,才向 `guide_detail`、`guide_event` 写该次 `sessionUuid`。
|
||||
- 事件允许无会话:`sessionUuid` 为空(库内 `NULL`),例如开机自检 `boot_self_check`。这类行没有父会话,删除过期会话时不会被级联清掉。
|
||||
- 删除一条 `guide_session` 时,该 `sessionUuid` 下的明细和有会话事件一并删除。过期清理先按 `guide_session.startTime` 删会话(级联子表),再按时间删除 `sessionUuid IS NULL` 的事件。
|
||||
- 三张表各自另有自增主键 `id`,仅库内使用,对外关联只用 `sessionUuid`。
|
||||
- 点云和图像不入库。回放只能还原当时的状态 JSON,不能还原原始传感器数据。
|
||||
|
||||
写入时机:
|
||||
|
||||
| 时机 | `guide_session` | `guide_detail` | `guide_event` |
|
||||
| --- | --- | --- | --- |
|
||||
| 开机自检 | 不写 | 不写 | `sessionUuid` 为空,`boot_self_check` |
|
||||
| 点击开始,快检失败 | 不写 | 不写 | 无会话或当前会话的 `self_check` |
|
||||
| 引导会话开始 | `INSERT` 一条,`endTime` 为空 | 随后按规则采样 | `session_begin` |
|
||||
| 引导过程中 | 轮挡时间变化时 `UPDATE` | `guideStateCode` 变化立即写一条;其余按 `sampleIntervalMs`(默认 200 ms)采样 | `person_chock` / `chock_on` / `chock_off` / `maintenance` / `self_check` |
|
||||
| 停止、急停或流程结束 | `UPDATE` 结束状态、检测机型、`endTime` | 可再写最后一条 | `session_end` |
|
||||
|
||||
还原一次引导:用 `sessionUuid` 读 `guide_session` 得到起止摘要;按 `timestamp` 升序读 `guide_detail`,把拆列拼回第 7 节对象;需要操作轨迹时再按同一 `sessionUuid` 读 `guide_event`。明细里的 `sessionUuid` 还原时不要放进结果包。
|
||||
|
||||
查询示例:
|
||||
|
||||
```sql
|
||||
-- 最近会话
|
||||
SELECT `sessionUuid`, `parkId`, `targetId`, `expectedModelType`, `modelType`,
|
||||
`startTime`, `endTime`, `guideStateCode`, `hasException`, `errorCode`
|
||||
FROM guide_session
|
||||
ORDER BY `startTime` DESC
|
||||
LIMIT 50;
|
||||
|
||||
-- 某次引导过程(拼回 ParkingSpaceGuideResult,不含 sessionUuid)
|
||||
SELECT *
|
||||
FROM guide_detail
|
||||
WHERE `sessionUuid` = '<sessionUuid>'
|
||||
ORDER BY `timestamp` ASC;
|
||||
|
||||
-- 某次引导的操作事件
|
||||
SELECT `timestamp`, `eventType`, `message`, `payload`
|
||||
FROM guide_event
|
||||
WHERE `sessionUuid` = '<sessionUuid>'
|
||||
ORDER BY `timestamp` ASC;
|
||||
|
||||
-- 无会话事件(如开机自检)
|
||||
SELECT `timestamp`, `eventType`, `message`, `payload`
|
||||
FROM guide_event
|
||||
WHERE `sessionUuid` IS NULL
|
||||
ORDER BY `timestamp` ASC;
|
||||
```
|
||||
|
||||
时间字段:`guide_session` 的 `startTime`、`endTime` 和三张表中的轮挡时间为设备本地 `DATETIME`(`yyyy-MM-dd HH:mm:ss`);`guide_detail.timestamp`、`guide_event.timestamp` 为 Unix 毫秒整数,与第 7 节 `timestamp` 相同。布尔列存 `TINYINT`:`1` 为真,`0` 为假。
|
||||
|
||||
### 11.2 `guide_session` 引导会话
|
||||
|
||||
一次点击开始到停止(或急停/自检失败结束)对应一条。结束时回写检测机型、最终状态和错误信息。
|
||||
|
||||
| 字段 | 说明 |
|
||||
| --- | --- |
|
||||
| sessionUuid | 会话标识,仅库内/回放使用 |
|
||||
| parkId | 停机位 |
|
||||
| targetId | 目标编号 |
|
||||
| expectedModelType | 操作员选择机型 |
|
||||
| modelType | 检测机型,会话结束时回写 |
|
||||
| modelMatched | 选择机型与检测机型是否匹配 |
|
||||
| startTime | 开始时间 |
|
||||
| endTime | 结束时间;进行中为空 |
|
||||
| guideStateCode | 结束时的引导状态序号 |
|
||||
| hasException | 结束时是否异常 |
|
||||
| errorCode | 结束时错误码,与第 10 节相同 |
|
||||
| message | 结束时说明 |
|
||||
| personChockTime | 人员轮挡确认时间 |
|
||||
| chockOnTime | 人工上轮挡时间 |
|
||||
| chockOffTime | 人工下轮挡时间 |
|
||||
|
||||
### 11.3 `guide_detail` 引导明细
|
||||
|
||||
一次会话的过程数据。除 `sessionUuid` 外,列与第 7 节一一对应。
|
||||
|
||||
| 字段 | 说明 |
|
||||
| --- | --- |
|
||||
| sessionUuid | 所属会话,对应 `guide_session.sessionUuid`,还原时不放入结果包 |
|
||||
| protocol | 固定 `ParkingSpaceGuideResult` |
|
||||
| version | 协议版本,当前 `1.1` |
|
||||
| success | 本条是否有效结果且 errorCode=0 |
|
||||
| hasResult | 本条是否包含有效引导结果 |
|
||||
| targetId | 目标编号 |
|
||||
| parkId | 停机位 |
|
||||
| expectedModelType | 操作员选择机型 |
|
||||
| modelType | 检测机型 |
|
||||
| modelMatched | 选择机型与检测机型是否匹配 |
|
||||
| personChockTime | 人员轮挡确认时间 |
|
||||
| chockOnTime | 人工上轮挡时间 |
|
||||
| chockOffTime | 人工下轮挡时间 |
|
||||
| status_workMode | 工作模式 |
|
||||
| status_activated | 是否已激活 |
|
||||
| status_camera_name | 平面相机名称 |
|
||||
| status_camera_connected | 平面相机是否在线 |
|
||||
| status_lidar_name | 雷达名称 |
|
||||
| status_lidar_connected | 雷达是否在线 |
|
||||
| status_emergencyStop_name | 急停名称 |
|
||||
| status_emergencyStop_enabled | 是否启用急停 |
|
||||
| status_emergencyStop_available | 急停输入是否可用 |
|
||||
| status_emergencyStop_active | 急停是否正在触发 |
|
||||
| status_emergencyStop_latched | 急停是否已锁存 |
|
||||
| selfCheck_running | 是否正在自检 |
|
||||
| selfCheck_ok | 自检是否通过 |
|
||||
| selfCheck_lidarOk | 雷达自检 |
|
||||
| selfCheck_cameraOk | 相机自检 |
|
||||
| selfCheck_storageOk | 存储自检 |
|
||||
| selfCheck_networkOk | 网络自检 |
|
||||
| selfCheck_errorCode | 自检错误码 |
|
||||
| selfCheck_message | 自检说明 |
|
||||
| guideStateCode | 引导状态序号 |
|
||||
| distanceToStop | 到停止线距离,毫米 |
|
||||
| bodyYawAngle | 机身偏转角,度 |
|
||||
| lateralOffset | 横向偏移,毫米 |
|
||||
| aircraftSpeed | 接近速度,米/秒 |
|
||||
| hasException | 本条是否异常 |
|
||||
| guideText | 引导文字 |
|
||||
| message | 说明或异常原因 |
|
||||
| errorCode | 错误码,与第 10 节相同 |
|
||||
| timestamp | 本条时间,Unix 毫秒 |
|
||||
|
||||
### 11.4 `guide_event` 操作事件
|
||||
|
||||
操作员动作和关键系统事件。有会话时 `sessionUuid` 与 `guide_session.sessionUuid` 相同;无会话时为空。
|
||||
|
||||
| 字段 | 说明 |
|
||||
| --- | --- |
|
||||
| sessionUuid | 所属会话;无会话时为空 |
|
||||
| timestamp | 事件时间,Unix 毫秒 |
|
||||
| eventType | 事件类型,见下表 |
|
||||
| message | 说明文字 |
|
||||
| payload | 附加 JSON 文本;自检事件为 `selfCheck` 对象,其余通常为空 |
|
||||
|
||||
| eventType | 写入时机 | sessionUuid | payload |
|
||||
| --- | --- | --- | --- |
|
||||
| boot_self_check | 应用初始化完成时的开机自检 | 空 | 自检结果 |
|
||||
| self_check | 点击开始后的启动自检 | 有会话则为该次,否则为空 | 自检结果 |
|
||||
| session_begin | 自检通过,引导会话开始 | 有 | 空 |
|
||||
| session_end | 停止、急停或流程结束 | 有 | 空 |
|
||||
| person_chock | 轮挡区域人员首次确认 | 有 | 空 |
|
||||
| chock_on | 人工上轮挡 | 有 | 空 |
|
||||
| chock_off | 人工下轮挡 | 有 | 空 |
|
||||
| maintenance | 进入或退出维护模式 | 有则带会话,否则为空 | 空 |
|
||||
|
||||
@ -133,6 +133,8 @@
|
||||
|
||||
`get_session_samples` 返回 `samples` 数组,按 `timestamp` 升序。元素为当时完整 `ParkingSpaceGuideResult`,字段与《停机引导对接协议》第 7 节一致,不含点云和图像。
|
||||
|
||||
历史数据来自本机 MariaDB 三张表,表间关系见《停机引导对接协议》第 11 节。`list_sessions` 读 `guide_session`,`get_session_samples` 按 `sessionUuid` 读该会话的 `guide_detail`。`guide_event` 只在记录库中,本协议不提供事件查询。
|
||||
|
||||
## 4. ZeroMQ 状态订阅
|
||||
|
||||
发布为双帧消息:第一帧为主题 `parking_guide`,第二帧为完整 `ParkingSpaceGuideResult` JSON。客户端须按完整主题匹配。
|
||||
|
||||
@ -239,7 +239,7 @@ LED 按 0720 式样输出:
|
||||
|
||||
默认库名 `parking_guide`。配置节点 `Database`:`enabled`、`host`、`port`、`user`、`name`、`retainDays`(默认 30 天)、`sampleIntervalMs`(默认 200 ms)。启动时按 `retainDays` 清理过期会话、明细和事件。
|
||||
|
||||
过程还原用 `guide_session` 和 `guide_detail`。`guide_event` 记录操作事件。三张表用 `sessionUuid` 关联;删除会话时级联删除该次引导的明细和事件。`guide_detail` 字段与《停机引导对接协议》`ParkingSpaceGuideResult` 一一对应;`status`、`selfCheck` 拆成 `status_`、`selfCheck_` 前缀列。`sessionUuid` 只作关联,还原时不放入结果包。回放按 `timestamp` 升序读列,拼回与组播/HTTP 相同的结果对象。`guideStateCode` 变化时立即写一条,其余按 `sampleIntervalMs`(默认 200 ms)采样。`timestamp` 为 Unix 毫秒;轮挡时间为设备本地 `yyyy-MM-dd HH:mm:ss`,未记录为空。
|
||||
过程还原用 `guide_session` 和 `guide_detail`。`guide_event` 记录操作事件。三张表用 `sessionUuid` 关联;删除会话时级联删除该次引导的明细和事件。无会话事件(如开机自检)`sessionUuid` 为空,过期时按时间单独清理。表间关系、外键和查询示例以《停机引导对接协议》第 11 节为准。`guide_detail` 字段与协议 `ParkingSpaceGuideResult` 一一对应;`status`、`selfCheck` 拆成 `status_`、`selfCheck_` 前缀列。`sessionUuid` 只作关联,还原时不放入结果包。回放按 `timestamp` 升序读列,拼回与组播/HTTP 相同的结果对象。`guideStateCode` 变化时立即写一条,其余按 `sampleIntervalMs`(默认 200 ms)采样。`timestamp` 为 Unix 毫秒;轮挡时间为设备本地 `yyyy-MM-dd HH:mm:ss`,未记录为空。
|
||||
|
||||
**`guide_session` 引导会话**
|
||||
|
||||
|
||||
@ -215,7 +215,7 @@ win32:CONFIG(debug, debug|release) {
|
||||
}
|
||||
|
||||
win32 {
|
||||
LIBS += -lws2_32
|
||||
LIBS += -lws2_32 -liphlpapi
|
||||
LIBS += Advapi32.lib
|
||||
CONFIG(release, debug|release) {
|
||||
LIBS += -L$$PWD/../../../Nets/SDK/ZeroMQ/Windows/x64/Release -llibzmq-v142-mt-4_3_5
|
||||
|
||||
@ -84,6 +84,7 @@ public:
|
||||
bool CalibrateGround(VrPlaneGroundCalibrationParam& calibration,
|
||||
QString& errorMessage);
|
||||
bool CapturePreviewImage(QImage& image, QString& errorMessage);
|
||||
void SetLivePreviewEnabled(bool enabled);
|
||||
|
||||
void SetDefaultCameraIndex(int cameraIndex);
|
||||
int GetDetectIndex() const;
|
||||
@ -149,7 +150,7 @@ private:
|
||||
int errorCode = 0;
|
||||
QString message;
|
||||
};
|
||||
SelfCheckResult RunSelfCheck();
|
||||
SelfCheckResult RunSelfCheck(bool requireLiveData = false);
|
||||
bool RejectStartForSelfCheck(const SelfCheckResult& check);
|
||||
void BeginGuideSession();
|
||||
void FinishGuideSession(int finalState, bool hasException);
|
||||
@ -268,7 +269,7 @@ private:
|
||||
void VideoStreamLoop(HttpFlvStreamConfig config,
|
||||
MvsCameraConfig cameraConfig);
|
||||
|
||||
bool CacheMvsFrame(const MvsImageData& image, QImage& frame);
|
||||
bool CacheMvsFrame(const MvsImageData& image, QImage& frame, bool fillPreview);
|
||||
|
||||
private:
|
||||
ConfigManager* m_configManager = nullptr;
|
||||
@ -361,6 +362,7 @@ private:
|
||||
std::atomic<bool> m_automaticDetection{false};
|
||||
std::atomic<bool> m_stopDetectionRequested{false};
|
||||
std::atomic<bool> m_trackingMode{false};
|
||||
std::atomic<bool> m_livePreviewEnabled{false};
|
||||
std::atomic<unsigned long long> m_simulationRound{0};
|
||||
std::atomic<long long> m_lastProbeAcceptedMs{0};
|
||||
std::atomic<bool> m_cloudCopyErrorReported{false};
|
||||
|
||||
@ -213,6 +213,36 @@ bool IsPastAlignmentGuidanceState(ParkingGuideState state)
|
||||
state == ParkingGuideState::ChocksOn;
|
||||
}
|
||||
|
||||
double IntegerMillimeters(double value)
|
||||
{
|
||||
if (!std::isfinite(value)) {
|
||||
return 0.0;
|
||||
}
|
||||
return static_cast<double>(std::lround(value));
|
||||
}
|
||||
|
||||
bool ShouldClearPublishedSpeed(int guideStateCode)
|
||||
{
|
||||
switch (ParkingGuideStateFromCode(guideStateCode)) {
|
||||
case ParkingGuideState::StopPositionReached:
|
||||
case ParkingGuideState::DockingCompleted:
|
||||
case ParkingGuideState::ChocksOn:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void ApplyPublishedGuideMetrics(ParkingSpaceGuideInfo& info)
|
||||
{
|
||||
// 对外距离/横向偏移只报毫米整数;到位后速度按静止处理。
|
||||
info.distance = IntegerMillimeters(info.distance);
|
||||
info.lateralOffset = IntegerMillimeters(info.lateralOffset);
|
||||
if (ShouldClearPublishedSpeed(info.guideStateCode)) {
|
||||
info.aircraftSpeed = 0.0;
|
||||
}
|
||||
}
|
||||
|
||||
bool ShouldFilterMeasurementJump(ParkingGuideState previousGuideState,
|
||||
double currentDistance,
|
||||
double stopTolerance,
|
||||
@ -281,10 +311,13 @@ ParkingSpaceGuideInfo MakeLastKnownInfo(
|
||||
info.chocksConfirmed = state.chocksConfirmed;
|
||||
info.personCount = state.personCount;
|
||||
info.personConfidence = state.personConfidence;
|
||||
info.distance = state.lastDistance;
|
||||
info.lateralOffset = state.lastDeviation;
|
||||
info.distance = IntegerMillimeters(state.lastDistance);
|
||||
info.lateralOffset = IntegerMillimeters(state.lastDeviation);
|
||||
info.angle = state.lastAngle;
|
||||
info.aircraftSpeed = state.filteredApproachSpeed / 1000.0;
|
||||
if (ShouldClearPublishedSpeed(state.lastGuideStateCode)) {
|
||||
info.aircraftSpeed = 0.0;
|
||||
}
|
||||
info.confidence = std::isfinite(state.modelConfidence)
|
||||
? state.modelConfidence
|
||||
: 0.0;
|
||||
@ -432,11 +465,12 @@ int DetectPresenter::DetectParkingSpaceGuide(const RsCloudData& cloud,
|
||||
retainedState == ParkingGuideState::Unknown
|
||||
? ParkingGuideState::Waiting
|
||||
: retainedState);
|
||||
ApplyPublishedGuideMetrics(errorInfo);
|
||||
result.message = previousState.hasMeasurement
|
||||
? QStringLiteral(
|
||||
"距离 %1 mm,横向偏差 %2 mm,航向角 %3°,接近速度 %4 m/s")
|
||||
.arg(errorInfo.distance, 0, 'f', 1)
|
||||
.arg(errorInfo.lateralOffset, 0, 'f', 1)
|
||||
.arg(errorInfo.distance, 0, 'f', 0)
|
||||
.arg(errorInfo.lateralOffset, 0, 'f', 0)
|
||||
.arg(errorInfo.angle, 0, 'f', 2)
|
||||
.arg(errorInfo.aircraftSpeed, 0, 'f', 1)
|
||||
: QStringLiteral("等待飞机定位");
|
||||
@ -448,6 +482,7 @@ int DetectPresenter::DetectParkingSpaceGuide(const RsCloudData& cloud,
|
||||
planeLost
|
||||
? ParkingGuideState::Waiting
|
||||
: ParkingGuideState::SystemError);
|
||||
ApplyPublishedGuideMetrics(errorInfo);
|
||||
errorInfo.hasException = !planeLost;
|
||||
result.errorCode = planeLost ? 0 : localization.errorCode;
|
||||
next.stoppedFrameCount = 0;
|
||||
@ -497,6 +532,7 @@ int DetectPresenter::DetectParkingSpaceGuide(const RsCloudData& cloud,
|
||||
retainedState == ParkingGuideState::Unknown
|
||||
? ParkingGuideState::Waiting
|
||||
: retainedState);
|
||||
ApplyPublishedGuideMetrics(retainedInfo);
|
||||
result.parkingSpaceInfoList.push_back(retainedInfo);
|
||||
result.message = QStringLiteral(
|
||||
"检测数据突变已忽略:距离变化 %1 mm(阈值 %2 mm,%3),横向偏移变化 %4 mm(阈值 %5 mm,%6)")
|
||||
@ -701,11 +737,16 @@ int DetectPresenter::DetectParkingSpaceGuide(const RsCloudData& cloud,
|
||||
|
||||
SetGuideState(info, guideState);
|
||||
next.lastGuideStateCode = info.guideStateCode;
|
||||
if (ShouldClearPublishedSpeed(info.guideStateCode)) {
|
||||
next.filteredApproachSpeed = 0.0;
|
||||
info.aircraftSpeed = 0.0;
|
||||
}
|
||||
ApplyPublishedGuideMetrics(info);
|
||||
result.parkingSpaceInfoList.push_back(info);
|
||||
result.message = QStringLiteral(
|
||||
"距离 %1 mm,横向偏差 %2 mm,航向角 %3°,接近速度 %4 m/s")
|
||||
.arg(info.distance, 0, 'f', 1)
|
||||
.arg(info.lateralOffset, 0, 'f', 1)
|
||||
.arg(info.distance, 0, 'f', 0)
|
||||
.arg(info.lateralOffset, 0, 'f', 0)
|
||||
.arg(info.angle, 0, 'f', 2)
|
||||
.arg(info.aircraftSpeed, 0, 'f', 1);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2,8 +2,8 @@
|
||||
#define PARKINGSPACEGUIDE_VERSION_H
|
||||
|
||||
#define PARKINGSPACEGUIDE_APP_NAME "停机引导"
|
||||
#define PARKINGSPACEGUIDE_VERSION_STRING "1.2.3"
|
||||
#define PARKINGSPACEGUIDE_BUILD_STRING "2"
|
||||
#define PARKINGSPACEGUIDE_VERSION_STRING "1.2.4"
|
||||
#define PARKINGSPACEGUIDE_BUILD_STRING "1"
|
||||
#define PARKINGSPACEGUIDE_FULL_VERSION_STRING "V" PARKINGSPACEGUIDE_VERSION_STRING "_" PARKINGSPACEGUIDE_BUILD_STRING
|
||||
|
||||
inline const char* GetParkingSpaceGuideVersion()
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
# 停机引导:相机 GigE + 雷达 UDP 同网卡时提高内核收包缓存,避免点云缺包。
|
||||
# 雷达应用层 socketRecvBufBytes=32MB,rmem_max 必须不小于该值。
|
||||
net.core.rmem_max = 67108864
|
||||
net.core.wmem_max = 67108864
|
||||
net.core.rmem_default = 4194304
|
||||
net.core.wmem_default = 4194304
|
||||
net.core.netdev_max_backlog = 5000
|
||||
# udp_mem 单位是页(通常 4KB),不是字节。约 64MB / 128MB / 256MB。
|
||||
net.ipv4.udp_mem = 16384 32768 65536
|
||||
net.ipv4.udp_rmem_min = 262144
|
||||
# 允许非 root 使用 ICMP 数据报套接字,进程内 ping 不必 fork /bin/ping。
|
||||
net.ipv4.ping_group_range = 0 2147483647
|
||||
net.ipv4.conf.all.rp_filter = 0
|
||||
net.ipv4.conf.default.rp_filter = 0
|
||||
@ -787,6 +787,7 @@ void DialogAlgoArg::BuildUi()
|
||||
m_exposureRoiHeight = AddDoubleEditor(autoExposure, QStringLiteral("曝光区域高度 (0~1)"), 4, 0.000001, 1.0);
|
||||
m_exposureReferenceGray = AddDoubleEditor(autoExposure, QStringLiteral("参考灰度"), 5, 0.0, 255.0);
|
||||
m_exposureGrayTolerance = AddDoubleEditor(autoExposure, QStringLiteral("灰度容差"), 6, 0.000001, 255.0);
|
||||
m_autoExposureIntervalMinutes = AddIntEditor(autoExposure, QStringLiteral("曝光调整间隔(分钟)"), 7, 1, 1440);
|
||||
|
||||
const QList<QLineEdit*> roiEditors = {
|
||||
m_modelRoiX, m_modelRoiY, m_modelRoiWidth, m_modelRoiHeight,
|
||||
@ -963,6 +964,7 @@ void DialogAlgoArg::LoadParams()
|
||||
SetDouble(m_exposureRoiHeight, config.mvsCamera.exposureRoiHeight);
|
||||
SetDouble(m_exposureReferenceGray, config.mvsCamera.exposureReferenceGray);
|
||||
SetDouble(m_exposureGrayTolerance, config.mvsCamera.exposureGrayTolerance);
|
||||
SetInt(m_autoExposureIntervalMinutes, config.mvsCamera.autoExposureIntervalMinutes);
|
||||
|
||||
m_mvsSerialNumber->setText(QString::fromStdString(config.mvsCamera.serialNumber));
|
||||
m_mvsIpAddress->setText(QString::fromStdString(config.mvsCamera.ipAddress));
|
||||
@ -1104,6 +1106,7 @@ bool DialogAlgoArg::SaveParams()
|
||||
if (!GetDouble(m_exposureRoiHeight, QStringLiteral("曝光区域高度"), config.mvsCamera.exposureRoiHeight)) return false;
|
||||
if (!GetDouble(m_exposureReferenceGray, QStringLiteral("参考灰度"), config.mvsCamera.exposureReferenceGray)) return false;
|
||||
if (!GetDouble(m_exposureGrayTolerance, QStringLiteral("灰度容差"), config.mvsCamera.exposureGrayTolerance)) return false;
|
||||
if (!GetInt(m_autoExposureIntervalMinutes, QStringLiteral("曝光调整间隔"), config.mvsCamera.autoExposureIntervalMinutes)) return false;
|
||||
if (config.mvsCamera.exposureRoiX + config.mvsCamera.exposureRoiWidth > 1.0 ||
|
||||
config.mvsCamera.exposureRoiY + config.mvsCamera.exposureRoiHeight > 1.0) {
|
||||
StyledMessageBox::warning(this,
|
||||
@ -1222,6 +1225,7 @@ void DialogAlgoArg::ResetParams()
|
||||
SetDouble(m_exposureRoiHeight, config.mvsCamera.exposureRoiHeight);
|
||||
SetDouble(m_exposureReferenceGray, config.mvsCamera.exposureReferenceGray);
|
||||
SetDouble(m_exposureGrayTolerance, config.mvsCamera.exposureGrayTolerance);
|
||||
SetInt(m_autoExposureIntervalMinutes, config.mvsCamera.autoExposureIntervalMinutes);
|
||||
|
||||
m_mvsSerialNumber->setText(QString::fromStdString(config.mvsCamera.serialNumber));
|
||||
m_mvsIpAddress->setText(QString::fromStdString(config.mvsCamera.ipAddress));
|
||||
|
||||
@ -159,6 +159,7 @@ private:
|
||||
QLineEdit* m_exposureRoiHeight = nullptr;
|
||||
QLineEdit* m_exposureReferenceGray = nullptr;
|
||||
QLineEdit* m_exposureGrayTolerance = nullptr;
|
||||
QLineEdit* m_autoExposureIntervalMinutes = nullptr;
|
||||
|
||||
QLineEdit* m_mvsSerialNumber = nullptr;
|
||||
QLineEdit* m_mvsIpAddress = nullptr;
|
||||
|
||||
@ -551,8 +551,8 @@ void MainWindow::addDetectionResult(const DetectionResult& result)
|
||||
? tr("已检测") : tr("未检测")},
|
||||
{tr("区域人数"), QString::number(info.personCount)},
|
||||
{tr("引导状态"), FormatGuideState(info)},
|
||||
{tr("到停止线"), FormatNumber(info.distance, tr("毫米"))},
|
||||
{tr("横向偏移"), FormatNumber(info.lateralOffset, tr("毫米"))},
|
||||
{tr("到停止线"), FormatNumber(info.distance, tr("毫米"), 0)},
|
||||
{tr("横向偏移"), FormatNumber(info.lateralOffset, tr("毫米"), 0)},
|
||||
{tr("偏转角"), FormatNumber(info.angle, tr("度"))},
|
||||
{tr("速度"), FormatNumber(info.aircraftSpeed, tr("米/秒"), 2)}
|
||||
});
|
||||
@ -848,6 +848,9 @@ void MainWindow::showParameterDialog(DialogAlgoArg::ConfigPage page, QPushButton
|
||||
if (!ui_dialogAlgoArg) {
|
||||
ui_dialogAlgoArg = new DialogAlgoArg(this);
|
||||
connect(ui_dialogAlgoArg, &QDialog::finished, this, [this]() {
|
||||
if (m_presenter) {
|
||||
m_presenter->SetLivePreviewEnabled(false);
|
||||
}
|
||||
if (m_selectedButton) {
|
||||
setButtonSelectedState(m_selectedButton, false);
|
||||
}
|
||||
@ -856,6 +859,7 @@ void MainWindow::showParameterDialog(DialogAlgoArg::ConfigPage page, QPushButton
|
||||
|
||||
ui_dialogAlgoArg->SetPresenter(m_presenter);
|
||||
ui_dialogAlgoArg->SetCurrentPage(page);
|
||||
m_presenter->SetLivePreviewEnabled(true);
|
||||
ui_dialogAlgoArg->show();
|
||||
ui_dialogAlgoArg->raise();
|
||||
ui_dialogAlgoArg->activateWindow();
|
||||
|
||||
@ -139,6 +139,7 @@ struct MvsCameraConfig
|
||||
double exposureRoiHeight = 1.0; // 0 表示到图像下边缘
|
||||
double exposureReferenceGray = 105.0;
|
||||
double exposureGrayTolerance = 10.0;
|
||||
int autoExposureIntervalMinutes = 5;
|
||||
};
|
||||
|
||||
struct HttpServerConfig
|
||||
@ -422,6 +423,11 @@ struct ConfigResult
|
||||
mvsCamera.exposureGrayTolerance > 255.0) {
|
||||
mvsCamera.exposureGrayTolerance = 10.0;
|
||||
}
|
||||
if (mvsCamera.autoExposureIntervalMinutes < 1) {
|
||||
mvsCamera.autoExposureIntervalMinutes = 1;
|
||||
} else if (mvsCamera.autoExposureIntervalMinutes > 1440) {
|
||||
mvsCamera.autoExposureIntervalMinutes = 1440;
|
||||
}
|
||||
|
||||
const auto validPort = [](int port) {
|
||||
return port > 0 && port <= 65535;
|
||||
|
||||
@ -53,6 +53,8 @@ void LoadMvsCamera(XMLElement* root, MvsCameraConfig& config)
|
||||
"exposureReferenceGray", config.exposureReferenceGray);
|
||||
config.exposureGrayTolerance = element->DoubleAttribute(
|
||||
"exposureGrayTolerance", config.exposureGrayTolerance);
|
||||
config.autoExposureIntervalMinutes = element->IntAttribute(
|
||||
"autoExposureIntervalMinutes", config.autoExposureIntervalMinutes);
|
||||
}
|
||||
|
||||
void SaveMvsCamera(XMLDocument& doc, XMLElement* root, const MvsCameraConfig& config)
|
||||
@ -72,6 +74,8 @@ void SaveMvsCamera(XMLDocument& doc, XMLElement* root, const MvsCameraConfig& co
|
||||
"exposureReferenceGray", config.exposureReferenceGray);
|
||||
element->SetAttribute(
|
||||
"exposureGrayTolerance", config.exposureGrayTolerance);
|
||||
element->SetAttribute(
|
||||
"autoExposureIntervalMinutes", config.autoExposureIntervalMinutes);
|
||||
root->InsertEndChild(element);
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,8 @@
|
||||
<MvsCamera enabled="false" serialNumber="" ipAddress="" deviceIndex="0" frameRate="10"
|
||||
autoExposureEnabled="true" exposureRoiX="0" exposureRoiY="0"
|
||||
exposureRoiWidth="1" exposureRoiHeight="1"
|
||||
exposureReferenceGray="105" exposureGrayTolerance="10"/>
|
||||
exposureReferenceGray="105" exposureGrayTolerance="10"
|
||||
autoExposureIntervalMinutes="5"/>
|
||||
<RsLidar enabled="false" lidarType="RSEM4" hostAddress="0.0.0.0" deviceIp="" msopPort="6699" difopPort="7788" imuPort="0" minDistance="0" maxDistance="0" densePoints="false" useLidarClock="false" tsFirstPoint="false" waitForDifop="false" startAngle="0" endAngle="360" splitAngle="0" frameId="rslidar" socketRecvBufBytes="33554432"/>
|
||||
<LedDisplay ip="192.168.1.100" port="5005" slaveId="65534" startAddress="0" timeoutMs="1000" enabled="false" controllerType="254" areaX="0" areaY="0" areaWidth="64" areaHeight="32" dynamicTimeoutSec="10" displayMode="1" speed="2" stayTime="10"/>
|
||||
<UdpBroadcast enabled="false" address="239.255.0.1" port="8800" targetId="T001" parkId="P01"/>
|
||||
|
||||
@ -408,9 +408,9 @@ void MainWindow::ApplyStatus(const QJsonObject& status)
|
||||
ui->personCountLabel->setText(QStringLiteral("--"));
|
||||
|
||||
SetMetric(ui->distanceLabel, status, "distanceToStop",
|
||||
QStringLiteral("毫米"));
|
||||
QStringLiteral("毫米"), 0);
|
||||
SetMetric(ui->offsetLabel, status, "lateralOffset",
|
||||
QStringLiteral("毫米"));
|
||||
QStringLiteral("毫米"), 0);
|
||||
SetMetric(ui->yawLabel, status, "bodyYawAngle", QStringLiteral("度"));
|
||||
SetMetric(ui->speedLabel, status, "aircraftSpeed", QStringLiteral("米/秒"));
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
2
Device
2
Device
@ -1 +1 @@
|
||||
Subproject commit a70cc73af5eefd378d35c0864b3a607cb420fbcb
|
||||
Subproject commit 11a7add8364786a1efb5191e3a486c26d3ee9acf
|
||||
@ -26,4 +26,4 @@
|
||||
| 20 | 砂轮盘孔定位 | DiscHolePose | 1.0.0.1 |
|
||||
| 21 | 玖瑞工件定位 | JiuruiWorkpiecePose | 1.0.0.1 |
|
||||
| 22 | 锥形工件定位 | WorkpieceTapered | 1.0.1.1 |
|
||||
| 23 | 转子钢芯定位 | WorkpieceRotor | 1.0.2.3 |
|
||||
| 23 | 转子钢芯定位 | WorkpieceRotor | 1.0.3.1 |
|
||||
|
||||
@ -92,6 +92,19 @@ if [ "${PACKAGE_NAME}" = "ParkingSpaceGuide" ]; then
|
||||
else
|
||||
echo "[${PACKAGE_NAME}] [WARN] Failed to queue MariaDB setup; run: sudo /opt/parkingspaceguide/install-mariadb.sh"
|
||||
fi
|
||||
|
||||
SYSCTL_CONF="/etc/sysctl.d/99-parkingspaceguide-network.conf"
|
||||
if [ -f "\${SYSCTL_CONF}" ]; then
|
||||
chmod 0644 "\${SYSCTL_CONF}"
|
||||
if sysctl --system >/dev/null 2>&1 || sysctl -p "\${SYSCTL_CONF}" >/dev/null 2>&1; then
|
||||
echo "[${PACKAGE_NAME}] Applied GigE/UDP socket buffer sysctl"
|
||||
else
|
||||
echo "[${PACKAGE_NAME}] [WARN] Failed to apply \${SYSCTL_CONF}"
|
||||
fi
|
||||
for rp in /proc/sys/net/ipv4/conf/*/rp_filter; do
|
||||
echo 0 > "\${rp}" 2>/dev/null || true
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# 端口映射 502 -> 5020
|
||||
|
||||
@ -135,7 +135,7 @@ DESKTOP_PROJECTS=(
|
||||
device_copy=globa|Device/SDK/MVS/MVS_STD_V3.0.1_251113/MVS-3.0.1_aarch64_20251113/lib/aarch64/*.so*|usr/lib;\
|
||||
ld_conf=/opt/rk3588-ai/AAPGS_model/lib,/opt/rk3588-ai/Persion_model/lib;\
|
||||
package_depends=libc6, libstdc++6;\
|
||||
extra_copy=${COPY_ALL_BUILD_LIBS},globa|SDK/poco/Arm/aarch64/lib/libPocoNet.so*|usr/lib,globa|SDK/poco/Arm/aarch64/lib/libPocoFoundation.so*|usr/lib,globa|Nets/SDK/ZeroMQ/Arm/aarch64/libzmq.so*|usr/lib,file|AppAlgo/planeLocalization/Arm/aarch64/libplaneLocalization.so|usr/lib/libplaneLocalization.so,file|AppAlgo/planeLocalization/Arm/aarch64/libbaseAlgorithm.so|usr/lib/libbaseAlgorithm.so,dir|AppAlgo/AAPGS_model/Arm/lib|opt/rk3588-ai/AAPGS_model/lib,dir|AppAlgo/AAPGS_model/Arm/models|opt/rk3588-ai/AAPGS_model/models,dir|AppAlgo/Persion_model/lib|opt/rk3588-ai/Persion_model/lib,dir|AppAlgo/Persion_model/models|opt/rk3588-ai/Persion_model/models,file|Module/GpioModule/deploy/parkingspaceguide-gpio-permissions.path|etc/systemd/system/parkingspaceguide-gpio-permissions.path,file|Module/GpioModule/deploy/parkingspaceguide-gpio-permissions.service|etc/systemd/system/parkingspaceguide-gpio-permissions.service,file|SDK/ZLMediaKit/Arm/aarch64/runtime/MediaServer|opt/parkingspaceguide/zlmediakit/MediaServer,file|SDK/ZLMediaKit/Arm/aarch64/runtime/config.ini|opt/parkingspaceguide/zlmediakit/config.ini,file|SDK/ZLMediaKit/Arm/aarch64/runtime/default.pem|opt/parkingspaceguide/zlmediakit/default.pem,dir|SDK/ZLMediaKit/Arm/aarch64/runtime/www|opt/parkingspaceguide/zlmediakit/www,file|App/ParkingSpaceGuide/ParkingSpaceGuideApp/deploy/parkingspaceguide-zlmediakit.service|etc/systemd/system/parkingspaceguide-zlmediakit.service,dir|SDK/mariadb|opt/parkingspaceguide/mariadb-offline,file|App/ParkingSpaceGuide/ParkingSpaceGuideApp/deploy/install-mariadb.sh|opt/parkingspaceguide/install-mariadb.sh,file|App/ParkingSpaceGuide/ParkingSpaceGuideApp/deploy/parkingspaceguide-mariadb-setup.service|etc/systemd/system/parkingspaceguide-mariadb-setup.service;\
|
||||
extra_copy=${COPY_ALL_BUILD_LIBS},globa|SDK/poco/Arm/aarch64/lib/libPocoNet.so*|usr/lib,globa|SDK/poco/Arm/aarch64/lib/libPocoFoundation.so*|usr/lib,globa|Nets/SDK/ZeroMQ/Arm/aarch64/libzmq.so*|usr/lib,file|AppAlgo/planeLocalization/Arm/aarch64/libplaneLocalization.so|usr/lib/libplaneLocalization.so,file|AppAlgo/planeLocalization/Arm/aarch64/libbaseAlgorithm.so|usr/lib/libbaseAlgorithm.so,dir|AppAlgo/AAPGS_model/Arm/lib|opt/rk3588-ai/AAPGS_model/lib,dir|AppAlgo/AAPGS_model/Arm/models|opt/rk3588-ai/AAPGS_model/models,dir|AppAlgo/Persion_model/lib|opt/rk3588-ai/Persion_model/lib,dir|AppAlgo/Persion_model/models|opt/rk3588-ai/Persion_model/models,file|Module/GpioModule/deploy/parkingspaceguide-gpio-permissions.path|etc/systemd/system/parkingspaceguide-gpio-permissions.path,file|Module/GpioModule/deploy/parkingspaceguide-gpio-permissions.service|etc/systemd/system/parkingspaceguide-gpio-permissions.service,file|SDK/ZLMediaKit/Arm/aarch64/runtime/MediaServer|opt/parkingspaceguide/zlmediakit/MediaServer,file|SDK/ZLMediaKit/Arm/aarch64/runtime/config.ini|opt/parkingspaceguide/zlmediakit/config.ini,file|SDK/ZLMediaKit/Arm/aarch64/runtime/default.pem|opt/parkingspaceguide/zlmediakit/default.pem,dir|SDK/ZLMediaKit/Arm/aarch64/runtime/www|opt/parkingspaceguide/zlmediakit/www,file|App/ParkingSpaceGuide/ParkingSpaceGuideApp/deploy/parkingspaceguide-zlmediakit.service|etc/systemd/system/parkingspaceguide-zlmediakit.service,dir|SDK/mariadb|opt/parkingspaceguide/mariadb-offline,file|App/ParkingSpaceGuide/ParkingSpaceGuideApp/deploy/install-mariadb.sh|opt/parkingspaceguide/install-mariadb.sh,file|App/ParkingSpaceGuide/ParkingSpaceGuideApp/deploy/parkingspaceguide-mariadb-setup.service|etc/systemd/system/parkingspaceguide-mariadb-setup.service,file|App/ParkingSpaceGuide/ParkingSpaceGuideApp/deploy/99-parkingspaceguide-network.conf|etc/sysctl.d/99-parkingspaceguide-network.conf;\
|
||||
optional_copy=globa|Device/SDK/MVS/MVS_STD_V3.0.1_251113/MVS-3.0.1_aarch64_20251113/lib/aarch64/ThirdParty/*.so*|usr/lib"
|
||||
|
||||
"ParkingSpaceGuideView;none;\
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user