wip: visual and pnp#57
Conversation
- Add Lightbars visualization via MarkerArray - Rewrite outpost neighbor armor position solver - Remove yaw/pitch pruning from PnP, stop abs on pitch - Pass Transform instead of Orientation to update_camera_pose - Unify marker lifetimes to 0.5s
|
Warning Review limit reached
More reviews will be available in 52 minutes and 39 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. WalkthroughPR 新增灯条批量发布系统 Changes灯条发布与位姿接口升级及几何算法优化
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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)
src/utility/logging/eigen.hpp (1)
26-27: 💤 Low value建议统一所有 Eigen 格式化器的符号显示风格。
Vector3d和Quaterniond的精度格式已更新为显式显示正负号(:+.{}f),但AngleAxisd(Line 49-51)和Isometry3d(Line 66-68)仍使用默认的无符号格式(:.{}f)。为保持日志输出的一致性,建议所有格式化器在启用精度时统一使用相同的符号显示策略。♻️ 建议的统一方案
如果希望所有格式化器都显示符号,可对
AngleAxisd和Isometry3d应用相同的:+格式:AngleAxisd (Line 49-51):
- return std::format_to(ctx.out(), "(angle={:.{}f}, axis=({:.{}f}, {:.{}f}, {:.{}f}))", - aa.angle(), precision, axis.x(), precision, axis.y(), precision, axis.z(), - precision); + return std::format_to(ctx.out(), "(angle={:+.{}f}, axis=({:+.{}f}, {:+.{}f}, {:+.{}f}))", + aa.angle(), precision, axis.x(), precision, axis.y(), precision, axis.z(), + precision);Isometry3d (Line 66-68):
return std::format_to(ctx.out(), - "T: ({:.{}f}, {:.{}f}, {:.{}f}), Q: (w={:.{}f}, {:.{}f}, {:.{}f}, {:.{}f})", t.x(), + "T: ({:+.{}f}, {:+.{}f}, {:+.{}f}), Q: (w={:+.{}f}, {:+.{}f}, {:+.{}f}, {:+.{}f})", t.x(), precision, t.y(), precision, t.z(), precision, q.w(), precision, q.x(), precision,Also applies to: 37-37
🤖 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 `@src/utility/logging/eigen.hpp` around lines 26 - 27, Update the Eigen formatters so sign display is consistent: change the format specifiers used in the AngleAxisd and Isometry3d formatters to include the explicit plus sign flag (use :+.{}f like in the Vector3d and Quaterniond formatters) so positive values render with a leading '+' when precision is enabled; locate and modify the formatting calls inside the AngleAxisd and Isometry3d formatter functions to mirror the Vector3d/Quaterniond specifiers and keep precision handling identical.
🤖 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 `@src/utility/logging/eigen.hpp`:
- Around line 26-27: Update the Eigen formatters so sign display is consistent:
change the format specifiers used in the AngleAxisd and Isometry3d formatters to
include the explicit plus sign flag (use :+.{}f like in the Vector3d and
Quaterniond formatters) so positive values render with a leading '+' when
precision is enabled; locate and modify the formatting calls inside the
AngleAxisd and Isometry3d formatter functions to mirror the Vector3d/Quaterniond
specifiers and keep precision handling identical.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ec08c2b3-0d17-443d-be21-d9d5abae5a30
📒 Files selected for processing (14)
.gitignoresrc/kernel/pose_estimator.cppsrc/kernel/visualization.cppsrc/kernel/visualization.hppsrc/runtime.cppsrc/utility/logging/eigen.hppsrc/utility/math/camera.hppsrc/utility/math/outpost.cppsrc/utility/math/solve_pnp/pnp_solution.cppsrc/utility/math/solve_pnp/pnp_solution.hppsrc/utility/rclcpp/visual/armor.cppsrc/utility/rclcpp/visual/lightbar.cppsrc/utility/rclcpp/visual/lightbar.hpptool/cxx/see_outpost.cpp
💤 Files with no reviewable changes (2)
- src/utility/math/camera.hpp
- src/utility/math/solve_pnp/pnp_solution.hpp
摘要
该PR对视觉和PnP求解系统进行了多项优化和功能增强。
核心改动
可视化系统升级
Lightbars类用于批量管理和发布灯条三维可视化,支持按名称缓存对应的ROS2发布器,并能够生成LINE_LIST类型的Marker进行可视化渲染。Visualization::update_camera_pose的参数从单纯的Orientation改为接收完整的Transform对象,以支持位姿的整体更新。PnP求解算法优化
RobustPnpSolution::Input中的max_yaw_pitch成员,简化输入配置。姿态估计改进
NeighborBarSolution::solve()中的几何计算逻辑从基于坐标轴推导改为基于装甲板姿态四元数与平移量进行计算,提高了计算的数值稳定性。运行时优化
-6'250'000ns调整为-8'200'000ns。camera_transform而非仅使用orientation。工具和格式改进