Skip to content
Snippets Groups Projects
Commit 16b02ce9 authored by François Bailly's avatar François Bailly
Browse files

[homogenized warning msg] when passing RobotUtil pointer to base-estimator.cpp and example.cpp

parent c570bbe1
No related branches found
No related tags found
No related merge requests found
...@@ -17,10 +17,8 @@ ...@@ -17,10 +17,8 @@
#include <sot/talos_balance/base-estimator.hh> #include <sot/talos_balance/base-estimator.hh>
#include <sot/core/debug.hh> #include <sot/core/debug.hh>
#include <dynamic-graph/factory.h> #include <dynamic-graph/factory.h>
#include <sot/talos_balance/utils/commands-helper.hh> #include <sot/talos_balance/utils/commands-helper.hh>
#include <sot/talos_balance/utils/stop-watch.hh> #include <sot/talos_balance/utils/stop-watch.hh>
#include "pinocchio/algorithm/frames.hpp" #include "pinocchio/algorithm/frames.hpp"
namespace dynamicgraph namespace dynamicgraph
...@@ -282,7 +280,7 @@ namespace dynamicgraph ...@@ -282,7 +280,7 @@ namespace dynamicgraph
} }
else 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; return;
} }
......
...@@ -74,15 +74,17 @@ namespace dynamicgraph ...@@ -74,15 +74,17 @@ namespace dynamicgraph
if(!m_secondAddendSIN.isPlugged()) if(!m_secondAddendSIN.isPlugged())
return SEND_MSG("Init failed: signal secondAddend is not plugged", MSG_TYPE_ERROR); 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)) if (!isNameInRobotUtil(robotName_nonconst))
{ {
m_robot_util = createRobotUtil(robotName_nonconst); SEND_MSG("You should have a robotUtil pointer initialized before",MSG_TYPE_ERROR);
} }
else else
{ {
m_robot_util = getRobotUtil(robotName_nonconst); m_robot_util = getRobotUtil(robotName_nonconst);
std::cerr << "m_robot_util:" << m_robot_util << std::endl;
} }
m_initSucceeded = true; m_initSucceeded = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment