Commit ·
d032f09
1
Parent(s): 5b55e2a
fix: 添加人脸追踪pitch偏移补偿(向下7度)
Browse files- 在camera_server.py中添加pitch_offset_rad = -7度
- 修复机器人看人时头部偏上的问题
reachy_mini_ha_voice/camera_server.py
CHANGED
|
@@ -242,6 +242,12 @@ class MJPEGCameraServer:
|
|
| 242 |
translation = translation * self._offset_scale
|
| 243 |
rotation = rotation * self._offset_scale
|
| 244 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
# Update face tracking offsets
|
| 246 |
with self._face_tracking_lock:
|
| 247 |
self._face_tracking_offsets = [
|
|
|
|
| 242 |
translation = translation * self._offset_scale
|
| 243 |
rotation = rotation * self._offset_scale
|
| 244 |
|
| 245 |
+
# Apply pitch offset compensation (robot tends to look up)
|
| 246 |
+
# rotation[1] is pitch in xyz euler order
|
| 247 |
+
# Negative pitch = look down
|
| 248 |
+
pitch_offset_rad = np.radians(-7.0) # Look down 7 degrees
|
| 249 |
+
rotation[1] += pitch_offset_rad
|
| 250 |
+
|
| 251 |
# Update face tracking offsets
|
| 252 |
with self._face_tracking_lock:
|
| 253 |
self._face_tracking_offsets = [
|