Skip to content
Snippets Groups Projects
Commit 745ef276 authored by Joan Perez Ibarz's avatar Joan Perez Ibarz
Browse files

updating alg_core and examples to move cfg file at the impl_algorithm layer

parent 820b26e1
No related branches found
No related tags found
No related merge requests found
......@@ -198,14 +198,15 @@ class IriBaseAlgorithm : public AbstractAlgorithmNode
* \brief dynamic reconfigure server callback
*
* This method is called whenever a new configuration is received through
* the dynamic reconfigure.
* the dynamic reconfigure. The derivated generic algorithm class must
* implement it.
*
* \param config an object with new configuration from all algorithm
* parameters defined in the config file.
* \param level integer referring the level in which the configuration
* has been changed.
*/
void reconfigureCallback(Config &config, uint32_t level);
virtual void reconfigureCallback(Config &config, uint32_t level) = 0;
/**
* \brief add diagnostics
......@@ -257,11 +258,11 @@ class IriBaseAlgorithm : public AbstractAlgorithmNode
template <class Algorithm>
IriBaseAlgorithm<Algorithm>::IriBaseAlgorithm() :
private_node_handle_("~"),
public_node_handle_(ros::this_node::getName()),
private_node_handle_("~"),
loop_rate_(DEFAULT_RATE),
dsrv_(private_node_handle_),
diagnostic_(),
loop_rate_(DEFAULT_RATE)
diagnostic_()
{
// create thread server instance
this->thread_server_ = CThreadServer::instance();
......@@ -284,11 +285,11 @@ IriBaseAlgorithm<Algorithm>::~IriBaseAlgorithm()
this->thread_server_->kill_thread(this->main_thread_id_);
}
template <class Algorithm>
void IriBaseAlgorithm<Algorithm>::reconfigureCallback(Config &config, uint32_t level)
{
this->alg_.config_ = config;
}
// template <class Algorithm>
// void IriBaseAlgorithm<Algorithm>::reconfigureCallback(Config &config, uint32_t level)
// {
// this->alg_.config_ = config;
// }
template <class Algorithm>
void IriBaseAlgorithm<Algorithm>::addDiagnostics(void)
......
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