Commit e98ea808 authored by Sergi Hernandez's avatar Sergi Hernandez
Browse files

Solved a problem in the namespace generation. Now the modules action and...

Solved a problem in the namespace generation. Now the modules action and service clients require the full namespace as a parameter.
parent f88bd47b
......@@ -252,7 +252,7 @@ CModule<ModuleCfg>::CModule(const std::string &name,const std::string &name_spac
this->module_thread_id=name+"_module_thread";
this->thread_server->create_thread(this->module_thread_id);
this->thread_server->attach_thread(this->module_thread_id,this->module_thread,this);
this->name=this->module_nh.getNamespace()+"/"+name;
this->name=this->module_nh.getNamespace();
}
catch (CException &ex)
{
......
......@@ -501,7 +501,7 @@ class CModuleAction
};
template<class action_ros>
CModuleAction<action_ros>::CModuleAction(const std::string &name,const std::string &name_space):nh(ros::this_node::getName()+"/"+name_space)
CModuleAction<action_ros>::CModuleAction(const std::string &name,const std::string &name_space):nh(name_space)
{
this->name=this->nh.getNamespace()+"/"+name;
this->status=ACTION_IDLE;
......
......@@ -169,7 +169,7 @@ class CModuleService
};
template<class service_msg>
CModuleService<service_msg>::CModuleService(const std::string &name,const std::string &name_space):nh(ros::this_node::getName()+"/"+name_space)
CModuleService<service_msg>::CModuleService(const std::string &name,const std::string &name_space):nh(name_space)
{
this->current_num_retries=0;
this->max_num_retries=DEFAULT_SERVICE_MAX_RETRIES;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment