feat(gimbal): use robot_center for dual-yaw targeting and tune PID params#84
feat(gimbal): use robot_center for dual-yaw targeting and tune PID params#84zlq04222 wants to merge 1 commit into
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
rmcs_ws/src/rmcs_core/src/controller/gimbal/eccentric_dual_yaw.cpp (1)
59-73: 请在接口文档或代码注释中明确auto_aim_robot_center输入的坐标系要求。代码在第 61-65 行假设
auto_aim_robot_center与camera_pos处于同一坐标系(OdomImu),才能正确计算差值向量。虽然enable_autoaim()对该输入进行了有效性检查(ready、非零、有限性),但并未验证坐标系的兼容性。建议在接口文档或代码注释中明确该输入必须在 OdomImu 坐标系中,以防止上游发布者使用不同坐标系导致的潜在问题。🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rmcs_ws/src/rmcs_core/src/controller/gimbal/eccentric_dual_yaw.cpp` around lines 59 - 73, The code assumes that `auto_aim_robot_center` is in the OdomImu coordinate system when computing the difference vector with `camera_pos`, but this requirement is not documented. Add a clear comment or documentation note above the section where `auto_aim_robot_center` is retrieved and used (around where it is assigned to `robot_center`) to explicitly state that this input must be provided in the OdomImu coordinate system to ensure correct calculations. This clarification should help prevent upstream publishers from accidentally providing data in mismatched coordinate frames.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@rmcs_ws/src/rmcs_core/src/controller/gimbal/eccentric_dual_yaw.cpp`:
- Around line 59-73: The code assumes that `auto_aim_robot_center` is in the
OdomImu coordinate system when computing the difference vector with
`camera_pos`, but this requirement is not documented. Add a clear comment or
documentation note above the section where `auto_aim_robot_center` is retrieved
and used (around where it is assigned to `robot_center`) to explicitly state
that this input must be provided in the OdomImu coordinate system to ensure
correct calculations. This clarification should help prevent upstream publishers
from accidentally providing data in mismatched coordinate frames.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6e952079-53f9-4a18-80cb-a32cbaa8afab
📒 Files selected for processing (2)
rmcs_ws/src/rmcs_bringup/config/sentry.yamlrmcs_ws/src/rmcs_core/src/controller/gimbal/eccentric_dual_yaw.cpp
功能变更
配置参数调整 (sentry.yaml)
云台硬件参数
pitch_motor_zero_point从 12347 至 12158云台控制器PID参数优化
kp: 45.0 → 35.0,ki: 0.0 → 0.008,kd: 0.0 → 0.005ki: 0.0 → 0.00,kd保持 0.0(kp保持 2.160)kp: 12.0 → 9.5,ki: 0.0 → 0.001,kd: 0.0 → 0.0003kp: 22.5 → 18.0(ki/kd保持 0.00/0.00)ki: 0.0 → 0.01核心控制逻辑更新 (eccentric_dual_yaw.cpp)
双偏航自瞄目标计算改进
auto_aim_robot_center输入接口,用于接收机器人中心点坐标center_yawcenter_yawcenter_yaw的有限角度差自瞄启用条件增强
auto_aim_robot_center就绪状态的检查代码结构优化
apply_control()方法中上下层偏航转矩的计算和赋值顺序(上层优先)影响范围