This commit is contained in:
Alvin-lyq 2026-04-14 10:50:48 +08:00
parent fbd1a0900e
commit f38c4befc8

View File

@ -289,6 +289,12 @@ class fu_node : public rclcpp::Node
vehicle_max_y_ = -1; vehicle_max_y_ = -1;
node_clock_ = this->get_clock(); node_clock_ = this->get_clock();
// 初始化栅格时间戳(使用 node_clock_ 确保时钟源一致)
{
std::lock_guard<std::mutex> lock(grid_mutex_);
last_grid_time_ = node_clock_->now();
}
front_stop_zone_ = {0, 0, 0, 0}; front_stop_zone_ = {0, 0, 0, 0};
rear_stop_zone_ = {0, 0, 0, 0}; rear_stop_zone_ = {0, 0, 0, 0};
left_stop_zone_ = {0, 0, 0, 0}; left_stop_zone_ = {0, 0, 0, 0};