From 09dccfaf38fe69358861705193aa8e8cd3bdb5fe Mon Sep 17 00:00:00 2001
From: Sergi Hernandez Juan <shernand@iri.upc.edu>
Date: Wed, 2 Nov 2022 17:59:54 +0100
Subject: [PATCH] Solved a bug: when the watchdog time was 0.0, the watchdog
 never got active.

---
 src/watchdog.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/watchdog.cpp b/src/watchdog.cpp
index 78a563c..3f06cbf 100644
--- a/src/watchdog.cpp
+++ b/src/watchdog.cpp
@@ -19,7 +19,7 @@ bool CROSWatchdog::is_active(void)
   ros::Time current_time=ros::Time::now();
 
   pthread_mutex_lock(&this->access_);
-  if((current_time-this->start_time)>this->max_time)
+  if((current_time-this->start_time)>=this->max_time)
   {
     pthread_mutex_unlock(&this->access_);
     return true;
-- 
GitLab