From 9a3cbcb96306078e749034555cdebedf4ce293f5 Mon Sep 17 00:00:00 2001 From: Alvin-lyq Date: Wed, 29 Apr 2026 16:09:28 +0800 Subject: [PATCH] debug 19 --- src/perception/pbox_node_dirve/src/pbox_node/src/AGPbox.cpp | 4 ++-- .../pbox_node_dirve/src/pbox_node/src/protocol_asensing.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/perception/pbox_node_dirve/src/pbox_node/src/AGPbox.cpp b/src/perception/pbox_node_dirve/src/pbox_node/src/AGPbox.cpp index f6f1336..fc11873 100644 --- a/src/perception/pbox_node_dirve/src/pbox_node/src/AGPbox.cpp +++ b/src/perception/pbox_node_dirve/src/pbox_node/src/AGPbox.cpp @@ -84,8 +84,8 @@ void AGPbox::init_pbox_node() bindUdp(); } - // 创建定时器(在串口/UDP打开之后) - timer_ = this->create_wall_timer(1ms, std::bind(&AGPbox::timer_callback, this)); + // 创建定时器(在串口/UDP打开之后,使用10ms周期避免过快读取) + timer_ = this->create_wall_timer(10ms, std::bind(&AGPbox::timer_callback, this)); } void AGPbox::timer_callback() diff --git a/src/perception/pbox_node_dirve/src/pbox_node/src/protocol_asensing.cpp b/src/perception/pbox_node_dirve/src/pbox_node/src/protocol_asensing.cpp index 649f68b..5fc7d58 100644 --- a/src/perception/pbox_node_dirve/src/pbox_node/src/protocol_asensing.cpp +++ b/src/perception/pbox_node_dirve/src/pbox_node/src/protocol_asensing.cpp @@ -158,6 +158,7 @@ bool ProtocolAsensing::registProtocol(const std::string &protocolFlag , int leng protocolLengthMap.insert(std::pair(protocolFlag, length)); protocolMap.insert(std::pair(protocolFlag, sub)); //TinyLog::info("regist protocol:%s length: %d\n" , protocolFlag.c_str() , length); + return true; } void ProtocolAsensing::toQuaternion(double* rpy , double* quaterArray) {