Skip to content
Snippets Groups Projects
Commit 3fe19acc authored by Olivier Stasse's avatar Olivier Stasse
Browse files

sot_loader_basic: Put initializeRosNode as virtual.

sot_laoder: calls the real time control loop after initializeRosNode.
parent c66ffb32
No related branches found
No related tags found
No related merge requests found
......@@ -89,6 +89,8 @@ public:
SotLoader();
~SotLoader() {};
// \brief Create a thread for ROS and start the control loop.
void initializeRosNode(int argc, char *argv[]);
// \brief Compute one iteration of control.
// Basically calls fillSensors, the SoT and the readControl.
......
......@@ -93,8 +93,8 @@ public:
void Initialization();
// \brief Create a thread for ROS.
void initializeRosNode(int argc, char *argv[]);
virtual void initializeRosNode(int argc, char *argv[]);
// \brief Callback function when starting dynamic graph.
bool start_dg(std_srvs::Empty::Request& request,
......
......@@ -73,7 +73,11 @@ void SotLoader::startControlLoop()
boost::thread thr(workThreadLoader, this);
}
void SotLoader::initializeRosNode(int argc, char *argv[])
{
SotLoaderBasic::initializeRosNode(argc, argv);
startControlLoop();
}
void
SotLoader::fillSensors(map<string,dgs::SensorValues> & sensorsIn)
......
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