From 049430f72bd52a6b03a94a7d422722af6e678794 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20del=20Pino?= <idelpino@iri.upc.edu> Date: Wed, 4 May 2022 14:14:04 +0200 Subject: [PATCH] changed assert for warning in time supervisor, since it is not a critical function --- src/time_supervisor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/time_supervisor.cpp b/src/time_supervisor.cpp index ff16147..8fba8e8 100644 --- a/src/time_supervisor.cpp +++ b/src/time_supervisor.cpp @@ -130,7 +130,9 @@ CFunctionMonitor::~CFunctionMonitor() { final_time_ = ros::Time::now().toSec(); time_expended_ = final_time_ - initial_time_; - assert(time_expended_ >= 0.0 && "Error in CFunctionMonitor: time negative!!"); - my_supervisor_->addData(function_name_, time_expended_); - + //assert(time_expended_ >= 0.0 && "Error in CFunctionMonitor: time negative!!"); + if(time_expended_ < 0.0) + std::cout << "WARNING in CFunctionMonitor: time negative!!" << std::endl; + else + my_supervisor_->addData(function_name_, time_expended_); } -- GitLab