Skip to content
Snippets Groups Projects
Commit 46ea0df7 authored by Johannes Mey's avatar Johannes Mey
Browse files

fix node naming problem

parent 1ac2914c
No related branches found
No related tags found
No related merge requests found
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#include "ccf/connection/NngConnection.h" #include "ccf/connection/NngConnection.h"
#include "ccf/util/NodeUtil.h" #include "ccf/util/NodeUtil.h"
std::string NODE_NAME; std::string NODE_NAME = "dummy_cgv_controller";
using CetiRosToolbox::getParameter; using CetiRosToolbox::getParameter;
using CetiRosToolbox::getPrivateParameter; using CetiRosToolbox::getPrivateParameter;
...@@ -28,8 +28,8 @@ int main(int argc, char **argv) { ...@@ -28,8 +28,8 @@ int main(int argc, char **argv) {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
NODE_NAME = ros::this_node::getName();
ros::init(argc, argv, NODE_NAME); ros::init(argc, argv, NODE_NAME);
NODE_NAME = ros::this_node::getName();
ros::NodeHandle n("connector_node_ros_cgv"); // namespace where the connection_address is ros::NodeHandle n("connector_node_ros_cgv"); // namespace where the connection_address is
...@@ -50,6 +50,7 @@ int main(int argc, char **argv) { ...@@ -50,6 +50,7 @@ int main(int argc, char **argv) {
ROS_INFO_STREAM("[" << NODE_NAME << "] Connecting to client at " << client << "."); ROS_INFO_STREAM("[" << NODE_NAME << "] Connecting to client at " << client << ".");
std::unique_ptr<NngConnection> client_connection = std::make_unique<NngConnection>(client, false); std::unique_ptr<NngConnection> client_connection = std::make_unique<NngConnection>(client, false);
client_connection->setSendTopic(getParameter<std::string>(n, "topics/selection", "selection")); client_connection->setSendTopic(getParameter<std::string>(n, "topics/selection", "selection"));
client_connection->setReceiveTopic("client_scene");
connector.addConnection(std::move(client_connection)); connector.addConnection(std::move(client_connection));
} }
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "ccf/connection/NngConnection.h" #include "ccf/connection/NngConnection.h"
#include "ccf/util/NodeUtil.h" #include "ccf/util/NodeUtil.h"
std::string NODE_NAME; std::string NODE_NAME = "moveit_cgv_controller";
using CetiRosToolbox::getParameter; using CetiRosToolbox::getParameter;
using CetiRosToolbox::getPrivateParameter; using CetiRosToolbox::getPrivateParameter;
...@@ -27,8 +27,8 @@ int main(int argc, char **argv) { ...@@ -27,8 +27,8 @@ int main(int argc, char **argv) {
GOOGLE_PROTOBUF_VERIFY_VERSION; GOOGLE_PROTOBUF_VERIFY_VERSION;
NODE_NAME = ros::this_node::getName();
ros::init(argc, argv, NODE_NAME); ros::init(argc, argv, NODE_NAME);
NODE_NAME = ros::this_node::getName();
ros::NodeHandle n("connector_node_ros_cgv"); // namespace where the connection_address is ros::NodeHandle n("connector_node_ros_cgv"); // namespace where the connection_address is
...@@ -49,6 +49,7 @@ int main(int argc, char **argv) { ...@@ -49,6 +49,7 @@ int main(int argc, char **argv) {
ROS_INFO_STREAM("[" << NODE_NAME << "] Connecting to client at " << client << "."); ROS_INFO_STREAM("[" << NODE_NAME << "] Connecting to client at " << client << ".");
std::unique_ptr<NngConnection> client_connection = std::make_unique<NngConnection>(client, false); std::unique_ptr<NngConnection> client_connection = std::make_unique<NngConnection>(client, false);
client_connection->setSendTopic(getParameter<std::string>(n, "topics/selection", "selection")); client_connection->setSendTopic(getParameter<std::string>(n, "topics/selection", "selection"));
client_connection->setReceiveTopic("client_scene");
connector.addConnection(std::move(client_connection)); connector.addConnection(std::move(client_connection));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment