I'm very new to ROS and am [slightly] more versed in python
than C++
, so that's the route I'm currently pursuing in my learning. One option that is shown in the C++
tutorials is how one would set a custom namespace or parent namespace :
You can also specify a parent NodeHandle and a namespace to append:
### adding the initialization call from above
ros::init(argc, argv, "my_node_name");
ros::NodeHandle nh1("ns1");
ros::NodeHandle nh2(nh1, "ns2");
In the python
information, I've only ever seen this used, which I take as equivalent to ros::init()
:
rospy.init_node('my_node_name')
How would one put node my_node_name
into a custom or parent namespace using rospy
?
Originally posted by jwhendy on ROS Answers with karma: 60 on 2017-05-16
Post score: 2