-
Notifications
You must be signed in to change notification settings - Fork 93
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
prevent calling ros::init without name; use node_name command option instead of namespace #44
prevent calling ros::init without name; use node_name command option instead of namespace #44
Conversation
k-okada@9425caa is another implementation for this issue. |
why not using the ROS variable |
9f36290
to
0166089
Compare
@vrabaud Thanks for advice. I agree that using |
("network_interface,i", po::value<std::string>()->default_value("eth0"), "set the network interface over which to connect"); | ||
|
||
all_desc.add_options() | ||
("node_name,n", po::value<std::string>()->default_value("naoqi_driver"), "this node name"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need for that line anymore right ?
@furushchev , node_name is not a command line argument anymore right ? As we use the |
as far as I know, there is no real API for fetching the That being said, here is a little function which parses the argc/argv pair for the
|
@vrabaud Yes. It is actually hidden option, that's why I use 2 |
ping |
1 similar comment
ping |
i think this PR contains two different things, to prevent error when no ◉ Kei Okada On Fri, Oct 30, 2015 at 10:57 AM, Furushchev notifications@github.com
|
The PR got merged, so there is an official ros method |
Does that PR still make sense ? Please rebase first. |
ping? |
i think we can use #58 for ◉ Kei Okada On Fri, Jan 8, 2016 at 4:28 PM, Karsten Knese notifications@github.com
|
Currently launching
naoqi_driver_node
without--namespace
option causes mis-registering node name to ros master.e.g. when launching by
roslaunch pepper_bringup pepper_full.launch
(ros_naoqi_driver
is executed without--namespace
option and underns="pepper_robot"
), the node name ofros_naoqi_driver
is shown as//pepper_robot
and ROS master cannot resolve address of this illegal ros node name.Looking more deeply, I found that the value of command line option
--namespace
(https://github.com/ros-naoqi/naoqi_driver/blob/master/src/external_registration.cpp#L45) is passed toros::init
(https://github.com/ros-naoqi/naoqi_driver/blob/master/src/ros_env.hpp#L92) whose name must NOT be empty, so I added exception handler.Also I'd like to point out that argument name
--namespace
is inappropriate and it is better to rename it to--node_name
because the value of this option is passed toros::init
.