Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
brkay54 committed Dec 28, 2023
1 parent 4704073 commit c4f419d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/reaction_analyzer/param/reaction_analyzer.param.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion tools/reaction_analyzer/src/reaction_analyzer_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<ControlBuffer>(&variant)) {
if (!message->second) {
all_topics_reacted_ = false;
Expand All @@ -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<PlanningBuffer>(&messageBuffers_[key]);
if (tmp) tmp->second = message->first;
Expand Down

0 comments on commit c4f419d

Please sign in to comment.