This commit is contained in:
acki
2025-05-29 17:57:24 -04:00
parent d0d414f65f
commit e7d37e5d81
2 changed files with 3 additions and 3 deletions

View File

@@ -146,15 +146,13 @@ namespace Modelec
emergency_msg.theta = 0.0;
close_enemy_pos_pub_->publish(emergency_msg);
RCLCPP_WARN(this->get_logger(), "EMERGENCY CLOSE OBJECT DETECTED at x=%.2f y=%.2f (%.1f mm)", x_global, y_global, range_mm);
// RCLCPP_WARN(this->get_logger(), "EMERGENCY CLOSE OBJECT DETECTED at x=%.2f y=%.2f (%.1f mm)", x_global, y_global, range_mm);
is_enemy_close_ = true;
}
break;
}
is_enemy_close_ = false;
}
// Convert to local robot frame

View File

@@ -580,6 +580,8 @@ namespace Modelec
if (!last_was_close_enemy_)
{
RCLCPP_INFO(node_->get_logger(), "Enemy is close, replanning...");
last_was_close_enemy_ = true;
pathfinding_->OnEnemyPosition(msg);