From f34951a025e90bd9ffac25b0057d256d72a475c5 Mon Sep 17 00:00:00 2001 From: Kanae Kochigami Date: Tue, 14 Feb 2017 13:58:14 +0900 Subject: [PATCH 1/3] [ros_env.hpp] delete std::getenv(ROS_NAMESPACE) --- src/ros_env.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ros_env.hpp b/src/ros_env.hpp index c929b902..4c71c1df 100644 --- a/src/ros_env.hpp +++ b/src/ros_env.hpp @@ -89,8 +89,7 @@ static void setMasterURI( const std::string& uri, const std::string& network_int remap["__master"] = uri; remap["__ip"] = ::naoqi::ros_env::getROSIP(network_interface); // init ros without a sigint-handler in order to shutdown correctly by naoqi - const char* ns_env = std::getenv("ROS_NAMESPACE"); - ros::init( remap, (ns_env==NULL)?(std::string("naoqi_driver_node")):(::naoqi::ros_env::getPrefix()) , ros::init_options::NoSigintHandler ); + ros::init(remap, std::string("naoqi_driver_node"), ros::init_options::NoSigintHandler); // to prevent shutdown based on no existing nodehandle ros::start(); From d38fed474ff45098f00b3c44185f6ed920669e02 Mon Sep 17 00:00:00 2001 From: Kanae Kochigami Date: Wed, 15 Feb 2017 15:42:55 +0900 Subject: [PATCH 2/3] add namespace param to naoqi_driver.launch --- launch/naoqi_driver.launch | 4 ++-- src/ros_env.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/launch/naoqi_driver.launch b/launch/naoqi_driver.launch index fbb04f83..a89a0957 100644 --- a/launch/naoqi_driver.launch +++ b/launch/naoqi_driver.launch @@ -4,7 +4,7 @@ - - + + diff --git a/src/ros_env.hpp b/src/ros_env.hpp index 4c71c1df..23acc502 100644 --- a/src/ros_env.hpp +++ b/src/ros_env.hpp @@ -89,7 +89,7 @@ static void setMasterURI( const std::string& uri, const std::string& network_int remap["__master"] = uri; remap["__ip"] = ::naoqi::ros_env::getROSIP(network_interface); // init ros without a sigint-handler in order to shutdown correctly by naoqi - ros::init(remap, std::string("naoqi_driver_node"), ros::init_options::NoSigintHandler); + ros::init( remap, (::naoqi::ros_env::getPrefix()) , ros::init_options::NoSigintHandler ); // to prevent shutdown based on no existing nodehandle ros::start(); From 106c98c01dd894484e198da04739e5ee1e7ae024 Mon Sep 17 00:00:00 2001 From: Kanae Kochigami Date: Fri, 17 Feb 2017 11:50:17 +0900 Subject: [PATCH 3/3] delete optenv --- launch/naoqi_driver.launch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/launch/naoqi_driver.launch b/launch/naoqi_driver.launch index a89a0957..06560635 100644 --- a/launch/naoqi_driver.launch +++ b/launch/naoqi_driver.launch @@ -4,7 +4,7 @@ - +