diff --git a/crazyflie/deps/crazyflie_tools b/crazyflie/deps/crazyflie_tools index 36ea3d401..32218e742 160000 --- a/crazyflie/deps/crazyflie_tools +++ b/crazyflie/deps/crazyflie_tools @@ -1 +1 @@ -Subproject commit 36ea3d40161db8f580dbb8846789bc036a2ccedd +Subproject commit 32218e7429651a681edf573d2ec24006fb07591e diff --git a/crazyflie/src/crazyflie_server.cpp b/crazyflie/src/crazyflie_server.cpp index 6f65df3d5..549438e26 100644 --- a/crazyflie/src/crazyflie_server.cpp +++ b/crazyflie/src/crazyflie_server.cpp @@ -865,9 +865,12 @@ class CrazyflieROS } auto stats = cf_.connectionStatsDelta(); - float ack_rate = stats.sent_count / stats.ack_count; - if (ack_rate < min_ack_rate_) { - RCLCPP_WARN(logger_, "[%s] Ack rate: %.1f %%", name_.c_str(), ack_rate * 100); + + if (stats.ack_count > 0) { + float ack_rate = stats.sent_count / stats.ack_count; + if (ack_rate < min_ack_rate_) { + RCLCPP_WARN(logger_, "Ack rate: %.1f %%", name_.c_str(), ack_rate * 100); + } } if (publish_stats_) {