Commit ·
ce50e0c
1
Parent(s): ddf4b25
fix: 添加yaw补偿(向左5度),修复机器人偏向用户右边的问题
Browse files
reachy_mini_ha_voice/camera_server.py
CHANGED
|
@@ -248,6 +248,12 @@ class MJPEGCameraServer:
|
|
| 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 = [
|
|
|
|
| 248 |
pitch_offset_rad = np.radians(7.0) # Look down 7 degrees
|
| 249 |
rotation[1] += pitch_offset_rad
|
| 250 |
|
| 251 |
+
# Apply yaw offset compensation (robot tends to look to user's right)
|
| 252 |
+
# rotation[2] is yaw in xyz euler order
|
| 253 |
+
# Positive yaw = turn left (towards user's left)
|
| 254 |
+
yaw_offset_rad = np.radians(5.0) # Turn left 5 degrees
|
| 255 |
+
rotation[2] += yaw_offset_rad
|
| 256 |
+
|
| 257 |
# Update face tracking offsets
|
| 258 |
with self._face_tracking_lock:
|
| 259 |
self._face_tracking_offsets = [
|