Unique namespace for a robot using the launch file.
Hi! I am trying to develop a multi-robot system using Qbots. For that I need to assign different namespaces to each robot in the network. (As Qbot1, Qbot2 etc.) As my previous question, and the answers I got, I wrote a single launch file and tried to push all of my topics under a given namespace. For this process, I used "ns" variable in include tag. Although there was a lot of issues in the results, I decided to make this question simpler by providing a small code, which I think includes the root of those problems.
This is a very simple launch file which can launch a kobuki core and then operate it manually by executing keyop program.
Here is my first launch file without including the namespace.
<launch>
<!-- Run the Kobuki base -->
<include file="$(find kobuki_node)/launch/minimal.launch"/>
<!-- Run the Keyop controller -->
<include file="$(find kobuki_keyop)/launch/keyop.launch"/>
</launch>
This is the rqt_graph I obtained by running the above program.
This is the second launch file I wrote by including the namespace variable.
<launch>
<!-- Run the Kobuki base -->
<include ns="qbot1" file="$(find kobuki_node)/launch/minimal.launch"/>
<!-- Run the Keyop controller -->
<include ns="qbot1" file="$(find kobuki_keyop)/launch/keyop.launch"/>
</launch>
And this is the relevant rqt graph
Although both of the launch files work without a problem, I can see that there are differences in two rqt graphs. Instead of a single mobile_base_nodelet_manager topic (when there is no namespace), the second rqt_graph displays a node and a topic under the name of mobile_base_nodelet_manager. Due to this reason, the more advanced launch files in my program does not work properly.
Can anyone explain me what is wrong with the second launch file, and how can I make it work like the first one. (I already tried writing a single namespace for the whole launch file, and also the group tag)
I use ROS Kinetic version on Ubuntu 16.04.
Please attach your imaged directly to your question instead of linking to your google drive. I've given you sufficient karma for that.