Provide CLI roslaunch with XML <group> tag.
I would like to perform a roslaunch from the command line which replicates the < group> tag from the XML roslaunch syntax.
Is this possible?
For example, say I wanted to run the a launch file, spawn_mavros_instance.launch, which creates the following topics:
/topic1
/topic2
...
With the roslaunch XML format I could create a launch file with the <group> tag:
<launch>
<group ns="uav1">
<include file="$(find ardupilot_gazebo)/launch/spawn_mavros_instance.launch">
<arg name="fcu_url" value="udp://127.0.0.1:14551@" />
</include>
</group>
</launch>
which creates topics with the following namespace:
/uav1/topic1
/uav1/topic2
...
I am using ROS Melodic on Ubuntu 18.04.
are you asking how to
roslaunch
a.launch
file in a namespace?If so: you should be able to do that using
ROS_NAMESPACE=<your_namespace> roslaunch ...
.Yes that works for my use case.
Thank You
Alternatively you could also add an argument to the launch file for the namespace.
You could just do
roslaunch ardupilot_gazebo mavros_namespace_instance.launch name:=uav1
and just replace the argument in the command line.