-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch1.launch
More file actions
44 lines (39 loc) · 2.45 KB
/
launch1.launch
File metadata and controls
44 lines (39 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<launch>
<!-- A Launch file is a `.launch` file (XML format) that can execute multiple commands by a single call -->
<!-- More info about XML tags here: https://wiki.ros.org/roslaunch/XML -->
<!-- Launch the rqt_console node -->
<!-- More about <node> here: https://wiki.ros.org/roslaunch/XML/node -->
<node pkg="rqt_console" type="rqt_console" name="rqt_console" required="true" />
<!-- Load environment variables -->
<!-- More about <env> here: https://wiki.ros.org/roslaunch/XML/env -->
<env name="ROSCONSOLE_CONFIG_FILE" value="$(find cpp_basic_nodes)/config/launch1.config" />
<!-- Create a group for publisher and subscriber -->
<!-- More about <group> here: https://wiki.ros.org/roslaunch/XML/group -->
<group ns="l1/ps"> <!-- ns: Napespace for all topics -->
<!-- Launch the publisher node -->
<node pkg="cpp_basic_nodes" type="launch1_publisher" name="cppl1_publisher" >
<!-- Set publishing frequency to 0.5 Hz -->
<!-- More about <param> here: https://wiki.ros.org/roslaunch/XML/param -->
<param name="l1pub_PubFreq" value="0.5" type="double" />
<!-- Remap (rename) the topic to the namespace 'l1/ps'-->
<!-- More about <remap> here: https://wiki.ros.org/roslaunch/XML/remap -->
<remap from="~/pub_topic" to="topic" /> <!-- The topic name will finally be /l1/ps/topic -->
</node>
<!-- Launch the Subscriber node -->
<node pkg="cpp_basic_nodes" type="launch1_subscriber" name="cppl1_subscriber">
<!-- Remap the topic name (to match the publisher topic name) -->
<remap from="~/subs_topic" to="topic" /> <!-- Topic remapped to /l1/ps/topic -->
</node>
</group>
<!-- Create a group for creating parameters in the launch -->
<group ns="l1/params">
<!-- Load parameters from a YAML file -->
<!-- More about it here: https://wiki.ros.org/roslaunch/XML/param#Parameters_from_YAML_output -->
<param name="set1" type="yaml" command="cat '$(find cpp_basic_nodes)/yaml/l1_params1.yaml'" />
<!-- Launch the parameter scanning node -->
<node pkg="cpp_basic_nodes" type="launch1_parameters" name="cppl1_parameters" />
</group>
<!-- Global parameters -->
<!-- It is advisable to given them a name so that they do not shadow other parameters -->
<param name="global" type="yaml" command="cat '$(find cpp_basic_nodes)/yaml/l1_params2.yaml'" />
</launch>