diff --git a/tools/reaction_analyzer/param/reaction_analyzer.param.yaml b/tools/reaction_analyzer/param/reaction_analyzer.param.yaml index 957fa0faf5b78..497a2dbe3adfb 100644 --- a/tools/reaction_analyzer/param/reaction_analyzer.param.yaml +++ b/tools/reaction_analyzer/param/reaction_analyzer.param.yaml @@ -20,7 +20,7 @@ topic_name: /control/command/control_cmd message_type: autoware_auto_control_msgs::msg::AckermannControlCommand observer: - timer_period: 0.1 # s + timer_period: 0.033 # s spawn_distance_threshold: 15.0 control_cmd_buffer_time_interval: 1.0 min_number_descending_order_control_cmd: 8 diff --git a/tools/reaction_analyzer/src/reaction_analyzer_node.cpp b/tools/reaction_analyzer/src/reaction_analyzer_node.cpp index f12fa9f32d742..cd2ada570cfb2 100644 --- a/tools/reaction_analyzer/src/reaction_analyzer_node.cpp +++ b/tools/reaction_analyzer/src/reaction_analyzer_node.cpp @@ -296,6 +296,7 @@ void ReactionAnalyzerNode::onTimer() if (spawn_cmd_time && !all_topics_reacted_) { all_topics_reacted_ = true; for (const auto & [key, variant] : messageBuffers) { + const auto current_time = this->now(); if (auto * message = std::get_if(&variant)) { if (!message->second) { all_topics_reacted_ = false; @@ -322,7 +323,7 @@ void ReactionAnalyzerNode::onTimer() if (zero_vel_idx) { std::cout << key << " found: nearest_idx: " << nearest_idx << " zero_vel_idx: " << zero_vel_idx.value() - << " size: " << message->first.points.size() << " stamp: " << message->first.header.stamp.nanosec << std::endl; + << " size: " << message->first.points.size() << " stamp: " << current_time.nanoseconds() << std::endl; mutex_.lock(); auto * tmp = std::get_if(&messageBuffers_[key]); if (tmp) tmp->second = message->first;