From 16b02ce9ad4b6f534066bfcccbb6bd27ed392782 Mon Sep 17 00:00:00 2001
From: fbailly <fbailly@laas.fr>
Date: Mon, 14 Jan 2019 17:26:01 +0100
Subject: [PATCH] [homogenized warning msg] when passing RobotUtil pointer to
 base-estimator.cpp and example.cpp

---
 src/base-estimator.cpp | 4 +---
 src/example.cpp        | 6 ++++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/base-estimator.cpp b/src/base-estimator.cpp
index 52858fb..628921e 100644
--- a/src/base-estimator.cpp
+++ b/src/base-estimator.cpp
@@ -17,10 +17,8 @@
 #include <sot/talos_balance/base-estimator.hh>
 #include <sot/core/debug.hh>
 #include <dynamic-graph/factory.h>
-
 #include <sot/talos_balance/utils/commands-helper.hh>
 #include <sot/talos_balance/utils/stop-watch.hh>
-
 #include "pinocchio/algorithm/frames.hpp"
 
 namespace dynamicgraph
@@ -282,7 +280,7 @@ namespace dynamicgraph
           }
           else
           {
-            SEND_MSG("You should have an entity controller manager initialized before",MSG_TYPE_ERROR);
+            SEND_MSG("You should have a robotUtil pointer initialized before",MSG_TYPE_ERROR);
             return;
           }
 
diff --git a/src/example.cpp b/src/example.cpp
index 4e7f97d..2739967 100644
--- a/src/example.cpp
+++ b/src/example.cpp
@@ -74,15 +74,17 @@ namespace dynamicgraph
         if(!m_secondAddendSIN.isPlugged())
           return SEND_MSG("Init failed: signal secondAddend is not plugged", MSG_TYPE_ERROR);
 
-        std::string & robotName_nonconst = const_cast<std::string &>(robotName);
+        /*std::string & robotName_nonconst = const_cast<std::string &>(robotName);*/
+        std::string robotName_nonconst(robotName);
 
         if (!isNameInRobotUtil(robotName_nonconst))
         {
-          m_robot_util = createRobotUtil(robotName_nonconst);
+          SEND_MSG("You should have a robotUtil pointer initialized before",MSG_TYPE_ERROR);
         }
         else
         {
           m_robot_util = getRobotUtil(robotName_nonconst);
+          std::cerr << "m_robot_util:" << m_robot_util << std::endl;
         }
 
         m_initSucceeded = true;
-- 
GitLab