Feat/feishu history - #37
Closed
heyeuu wants to merge 3 commits into
Closed
Conversation
Contributor
|
Important Review skippedDraft detected. 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feishu历史记录和相机触发事件同步功能
本PR在系统中引入了共享内存历史记录机制和相机触发事件同步功能,用于实现精确的时间戳对齐和状态历史访问。
核心功能变更
共享内存基础设施增强
src/utility/shared/interprocess.hpp中引入了MappedContextRAII包装器,集中管理共享内存的映射生命周期HistoryClient<T, N>模板类,提供环形缓冲区的共享内存通道,支持:Send::push()- 写入数据到下一个序列号槽位Recv::latest()- 读取最新数据Recv::find_latest(Predicate)- 按条件查找最新匹配的历史数据Recv::pop_next()- 按FIFO顺序读取数据Feishu通信层重构
src/kernel/feishu.hpp中添加了通用的Channel<T>包装类,支持对不同数据类型的一致处理ChannelTraits模板,用于映射数据类型到相应的共享内存客户端Feishu::fetch_latest_before(Clock::time_point)方法,返回指定时刻之前的历史控制状态相机触发事件系统
CameraTriggerEvent结构体,包含单调递增的序列号和时间戳src/component.cpp中实现了相机触发事件的发布和提交流程,包括:Capturer触发同步支持
src/kernel/capturer.cpp中添加了bind_trigger_timestamp逻辑运行时集成
src/runtime.cpp的ROS2关闭处理,从信号处理改为ROS2的on_shutdown回调fetch_control_state以接收图像时间戳,通过fetch_latest_before获取历史控制状态配置更新
config/config.yaml中添加enable_trigger_sync开关hikcamera的fixed_framerate为true测试支持
test/timestamp_alignment.cpp测试套件,验证:std::chrono::steady_clock代码更改统计