From 222b646d56f9329a5e2b6263ca470deedf8e8e1b Mon Sep 17 00:00:00 2001 From: joanvallve <jvallve@iri.upc.edu> Date: Sat, 20 Jun 2020 16:58:47 +0200 Subject: [PATCH] changed key to type+topic to be unique --- src/node.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node.cpp b/src/node.cpp index 7aed727..686314a 100644 --- a/src/node.cpp +++ b/src/node.cpp @@ -48,7 +48,7 @@ WolfRosNode::WolfRosNode() std::string topic = it["topic"]; std::string sensor = it["sensor_name"]; WOLF_TRACE("From sensor {" + sensor + "} subscribing {" + subscriber + "} to {" + topic + "} topic"); - subscribers_.push_back(FactorySubscriber::create(subscriber, topic, server, problem_ptr_->getSensor(sensor), nh_)); + subscribers_.push_back(FactorySubscriber::create(subscriber, subscriber+topic, server, problem_ptr_->getSensor(sensor), nh_)); } // // ROS VISUALIZER @@ -67,7 +67,7 @@ WolfRosNode::WolfRosNode() for (auto it : server.getParam<std::vector<std::map<std::string, std::string>>>("ROS publisher")) { WOLF_INFO("Pub: ", it["type"]); - publishers_.push_back(FactoryPublisher::create(it["type"], it["topic"], server, problem_ptr_, nh_)); + publishers_.push_back(FactoryPublisher::create(it["type"], it["type"]+it["topic"], server, problem_ptr_, nh_)); } } catch (MissingValueException& e) -- GitLab