This commit is contained in:
jingna 2025-08-07 14:34:28 +08:00
commit cbe52fb518
3 changed files with 100 additions and 14 deletions

View File

@ -194672,3 +194672,83 @@ transform: {rot: [0.994135, -0.00252459, 0.00230278, 0.00226079, 0.994134, 0.108
[08/06 16:16:20.792673][debug][18856][DeviceManager.cpp:64] DeviceManager Destructors done
[08/06 16:16:20.794234][debug][18856][MfPal.cpp:128] WmfPal destroyed!
[08/06 16:16:20.794542][info][18856][Context.cpp:84] Context destroyed
[08/06 18:49:39.320553][debug][7128][Context.cpp:30] Context creating, work_dir=D:\Trae_space\BodyBalanceEvaluation
[08/06 18:49:39.321439][debug][7128][Context.cpp:49] Config file version=1.1
[08/06 18:49:39.321794][debug][7128][FrameBufferManager.cpp:23] Max global frame buffer size updated! size=2048.000MB
[08/06 18:49:39.321861][info][7128][Context.cpp:68] Context created with config: default config!
[08/06 18:49:39.322297][info][7128][Context.cpp:73] Work directory=D:\Trae_space\BodyBalanceEvaluation, SDK version=v1.10.11-20240724-aeaa107e5
[08/06 18:49:39.322605][debug][7128][DeviceManager.cpp:30] DeviceManager init ...
[08/06 18:49:39.322653][info][7128][MfPal.cpp:105] createObPal: create WinPal!
[08/06 18:49:39.324634][debug][7128][MfPal.cpp:110] WmfPal init ...
[08/06 18:49:39.397789][debug][7128][MfPal.cpp:117] WmfPal created!
[08/06 18:49:39.397898][debug][7128][DeviceManager.cpp:34] Enable USB Device Enumerator ...
[08/06 18:49:39.480505][debug][7128][EnumeratorLibusb.cpp:321] queryDevicesInfo done!
[08/06 18:49:39.481199][debug][7128][MfPal.cpp:216] Create WinEventDeviceWatcher!
[08/06 18:49:39.481472][debug][7128][UsbDeviceEnumerator.cpp:78] No matched usb device found!
[08/06 18:49:39.481703][info][7128][DeviceManager.cpp:15] Current found device(s): (0)
[08/06 18:49:39.482334][debug][7128][DeviceManager.cpp:52] DeviceManager construct done!
[08/06 18:49:39.482711][debug][7128][Context.cpp:81] Context destroying ...
[08/06 18:49:39.482753][debug][7128][DeviceManager.cpp:56] DeviceManager destroy ...
[08/06 18:49:39.482846][debug][7128][DeviceManager.cpp:64] DeviceManager Destructors done
[08/06 18:49:39.484599][debug][7128][MfPal.cpp:128] WmfPal destroyed!
[08/06 18:49:39.485324][info][7128][Context.cpp:84] Context destroyed
[08/07 08:37:04.330106][debug][1608][Context.cpp:30] Context creating, work_dir=D:\Trae_space\BodyBalanceEvaluation
[08/07 08:37:04.331001][debug][1608][Context.cpp:49] Config file version=1.1
[08/07 08:37:04.331403][debug][1608][FrameBufferManager.cpp:23] Max global frame buffer size updated! size=2048.000MB
[08/07 08:37:04.331481][info][1608][Context.cpp:68] Context created with config: default config!
[08/07 08:37:04.331980][info][1608][Context.cpp:73] Work directory=D:\Trae_space\BodyBalanceEvaluation, SDK version=v1.10.11-20240724-aeaa107e5
[08/07 08:37:04.332345][debug][1608][DeviceManager.cpp:30] DeviceManager init ...
[08/07 08:37:04.332393][info][1608][MfPal.cpp:105] createObPal: create WinPal!
[08/07 08:37:04.332702][debug][1608][MfPal.cpp:110] WmfPal init ...
[08/07 08:37:04.392689][debug][1608][MfPal.cpp:117] WmfPal created!
[08/07 08:37:04.392788][debug][1608][DeviceManager.cpp:34] Enable USB Device Enumerator ...
[08/07 08:37:04.434990][debug][1608][EnumeratorLibusb.cpp:321] queryDevicesInfo done!
[08/07 08:37:04.435417][debug][1608][MfPal.cpp:216] Create WinEventDeviceWatcher!
[08/07 08:37:04.435774][debug][1608][UsbDeviceEnumerator.cpp:78] No matched usb device found!
[08/07 08:37:04.436028][info][1608][DeviceManager.cpp:15] Current found device(s): (0)
[08/07 08:37:04.436282][debug][1608][DeviceManager.cpp:52] DeviceManager construct done!
[08/07 08:37:04.436602][debug][1608][Context.cpp:81] Context destroying ...
[08/07 08:37:04.436640][debug][1608][DeviceManager.cpp:56] DeviceManager destroy ...
[08/07 08:37:04.436974][debug][1608][DeviceManager.cpp:64] DeviceManager Destructors done
[08/07 08:37:04.438813][debug][1608][MfPal.cpp:128] WmfPal destroyed!
[08/07 08:37:04.439737][info][1608][Context.cpp:84] Context destroyed
[08/07 08:53:58.557016][debug][26392][Context.cpp:30] Context creating, work_dir=D:\Trae_space\BodyBalanceEvaluation
[08/07 08:53:58.557193][debug][26392][Context.cpp:49] Config file version=1.1
[08/07 08:53:58.557237][debug][26392][FrameBufferManager.cpp:23] Max global frame buffer size updated! size=2048.000MB
[08/07 08:53:58.557265][info][26392][Context.cpp:68] Context created with config: default config!
[08/07 08:53:58.557495][info][26392][Context.cpp:73] Work directory=D:\Trae_space\BodyBalanceEvaluation, SDK version=v1.10.11-20240724-aeaa107e5
[08/07 08:53:58.557711][debug][26392][DeviceManager.cpp:30] DeviceManager init ...
[08/07 08:53:58.557731][info][26392][MfPal.cpp:105] createObPal: create WinPal!
[08/07 08:53:58.557935][debug][26392][MfPal.cpp:110] WmfPal init ...
[08/07 08:53:58.610665][debug][26392][MfPal.cpp:117] WmfPal created!
[08/07 08:53:58.610706][debug][26392][DeviceManager.cpp:34] Enable USB Device Enumerator ...
[08/07 08:53:58.642596][debug][26392][EnumeratorLibusb.cpp:321] queryDevicesInfo done!
[08/07 08:53:58.642997][debug][26392][MfPal.cpp:216] Create WinEventDeviceWatcher!
[08/07 08:53:58.643262][debug][26392][UsbDeviceEnumerator.cpp:78] No matched usb device found!
[08/07 08:53:58.643306][info][26392][DeviceManager.cpp:15] Current found device(s): (0)
[08/07 08:53:58.643483][debug][26392][DeviceManager.cpp:52] DeviceManager construct done!
[08/07 08:53:58.643513][debug][26392][Context.cpp:81] Context destroying ...
[08/07 08:53:58.643527][debug][26392][DeviceManager.cpp:56] DeviceManager destroy ...
[08/07 08:53:58.643540][debug][26392][DeviceManager.cpp:64] DeviceManager Destructors done
[08/07 08:53:58.644558][debug][26392][MfPal.cpp:128] WmfPal destroyed!
[08/07 08:53:58.644986][info][26392][Context.cpp:84] Context destroyed
[08/07 09:03:51.600617][debug][5460][Context.cpp:30] Context creating, work_dir=D:\Trae_space\BodyBalanceEvaluation
[08/07 09:03:51.600710][debug][5460][Context.cpp:49] Config file version=1.1
[08/07 09:03:51.600737][debug][5460][FrameBufferManager.cpp:23] Max global frame buffer size updated! size=2048.000MB
[08/07 09:03:51.600755][info][5460][Context.cpp:68] Context created with config: default config!
[08/07 09:03:51.600863][info][5460][Context.cpp:73] Work directory=D:\Trae_space\BodyBalanceEvaluation, SDK version=v1.10.11-20240724-aeaa107e5
[08/07 09:03:51.600973][debug][5460][DeviceManager.cpp:30] DeviceManager init ...
[08/07 09:03:51.600985][info][5460][MfPal.cpp:105] createObPal: create WinPal!
[08/07 09:03:51.601138][debug][5460][MfPal.cpp:110] WmfPal init ...
[08/07 09:03:51.629206][debug][5460][MfPal.cpp:117] WmfPal created!
[08/07 09:03:51.629309][debug][5460][DeviceManager.cpp:34] Enable USB Device Enumerator ...
[08/07 09:03:51.652743][debug][5460][EnumeratorLibusb.cpp:321] queryDevicesInfo done!
[08/07 09:03:51.653156][debug][5460][MfPal.cpp:216] Create WinEventDeviceWatcher!
[08/07 09:03:51.653432][debug][5460][UsbDeviceEnumerator.cpp:78] No matched usb device found!
[08/07 09:03:51.653463][info][5460][DeviceManager.cpp:15] Current found device(s): (0)
[08/07 09:03:51.653658][debug][5460][DeviceManager.cpp:52] DeviceManager construct done!
[08/07 09:03:51.653680][debug][5460][Context.cpp:81] Context destroying ...
[08/07 09:03:51.653690][debug][5460][DeviceManager.cpp:56] DeviceManager destroy ...
[08/07 09:03:51.653698][debug][5460][DeviceManager.cpp:64] DeviceManager Destructors done
[08/07 09:03:51.654355][debug][5460][MfPal.cpp:128] WmfPal destroyed!
[08/07 09:03:51.654625][info][5460][Context.cpp:84] Context destroyed

View File

@ -1221,9 +1221,7 @@ class DeviceManager:
head_pose_data = {
'rotation': head_pose['rotation'], # 旋转角:左旋(-), 右旋(+)
'tilt': head_pose['tilt'], # 倾斜角:左倾(-), 右倾(+)
'pitch': head_pose['pitch'], # 俯仰角:俯角(-), 仰角(+)
'temperature': imu_data.get('temperature', 25),
'pitch': head_pose['pitch'], # 俯仰角:俯角(-), 仰角(+)
'timestamp': imu_data['timestamp']
}
@ -1269,6 +1267,14 @@ class DeviceManager:
# 计算总压力
total_pressure = left_total + right_total
# 计算各区域压力百分比
left_front_percent = (left_front / total_pressure * 100) if total_pressure > 0 else 0
left_rear_percent = (left_rear / total_pressure * 100) if total_pressure > 0 else 0
right_front_percent = (right_front / total_pressure * 100) if total_pressure > 0 else 0
right_rear_percent = (right_rear / total_pressure * 100) if total_pressure > 0 else 0
left_total_percent = (left_total / total_pressure * 100) if total_pressure > 0 else 0
right_total_percent = (right_total / total_pressure * 100) if total_pressure > 0 else 0
# 计算平衡比例(左脚压力占总压力的比例)
balance_ratio = left_total / total_pressure if total_pressure > 0 else 0.5
@ -1281,15 +1287,15 @@ class DeviceManager:
# 构建完整的足部压力数据
complete_pressure_data = {
# 分区压力
# 分区压力百分比
'pressure_zones': {
'left_front': left_front,
'left_rear': left_rear,
'right_front': right_front,
'right_rear': right_rear,
'left_total': left_total,
'right_total': right_total,
'total_pressure': total_pressure
'left_front': round(left_front_percent, 1),
'left_rear': round(left_rear_percent, 1),
'right_front': round(right_front_percent,1),
'right_rear': round(right_rear_percent, 1),
'left_total': round(left_total_percent, 1),
'right_total': round(right_total_percent, 1),
'total_pressure': 100.0 # 总压力百分比始终为100%
},
# 平衡分析
'balance_analysis': {

View File

@ -846,7 +846,7 @@ function updateHeadPoseMaxValues(headPose) {
//
if (headPose.rotation < 0) {
//
headPoseMaxValues.value.rotationLeftMax = Math.min(
headPoseMaxValues.value.rotationLeftMax = Math.max(
headPoseMaxValues.value.rotationLeftMax,
Math.abs(headPose.rotation)
)
@ -861,7 +861,7 @@ function updateHeadPoseMaxValues(headPose) {
//
if (headPose.tilt < 0) {
//
headPoseMaxValues.value.tiltLeftMax = Math.min(
headPoseMaxValues.value.tiltLeftMax = Math.max(
headPoseMaxValues.value.tiltLeftMax,
Math.abs(headPose.tilt)
)
@ -876,7 +876,7 @@ function updateHeadPoseMaxValues(headPose) {
//
if (headPose.pitch < 0) {
//
headPoseMaxValues.value.pitchDownMax = Math.min(
headPoseMaxValues.value.pitchDownMax = Math.max(
headPoseMaxValues.value.pitchDownMax,
Math.abs(headPose.pitch)
)