Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ros_env.hpp] delete std::getenv(ROS_NAMESPACE) #81

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions launch/naoqi_driver.launch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<arg name="nao_port" default="$(optenv NAO_PORT 9559)" />
<arg name="roscore_ip" default="127.0.0.1" />
<arg name="network_interface" default="eth0" />

<node pkg="naoqi_driver" type="naoqi_driver_node" name="naoqi_driver" required="true" args="--qi-url=tcp://$(arg nao_ip):$(arg nao_port) --roscore_ip=$(arg roscore_ip) --network_interface=$(arg network_interface)" output="screen" />
<arg name="namespace" default="naoqi_driver_node" />
<node pkg="naoqi_driver" type="naoqi_driver_node" name="naoqi_driver" required="true" args="--qi-url=tcp://$(arg nao_ip):$(arg nao_port) --roscore_ip=$(arg roscore_ip) --network_interface=$(arg network_interface) --namespace=$(arg namespace)" output="screen" />

</launch>
3 changes: 1 addition & 2 deletions src/ros_env.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, (::naoqi::ros_env::getPrefix()) , ros::init_options::NoSigintHandler );
// to prevent shutdown based on no existing nodehandle
ros::start();

Expand Down