Skip to content

Commit e74744a

Browse files
mergify[bot]lsy3ahcorde
authored
Add XML/YAML launch equivalents for large project tutorial (backport #6021) (#6087)
* Add XML/YAML launch equivalents for large project tutorial (#6021) Signed-off-by: Luke Sy <[email protected]> Signed-off-by: Katherine Scott <[email protected]> Co-authored-by: Katherine Scott <[email protected]> (cherry picked from commit 536c723) # Conflicts: # source/Tutorials/Intermediate/Launch/Using-ROS2-Launch-For-Large-Projects.rst * docs: resolve merge conflicts in launch tutorial (#6091) Remove conflict markers, keep multi-format references, and fix PushRosNamespace capitalization. Signed-off-by: Luke Sy <[email protected]> --------- Signed-off-by: Luke Sy <[email protected]> Co-authored-by: lsy3 <[email protected]> Co-authored-by: Alejandro Hernández Cordero <[email protected]>
1 parent 86e9c7c commit e74744a

18 files changed

+477
-49
lines changed

source/Tutorials/Intermediate/Launch/Using-ROS2-Launch-For-Large-Projects.rst

Lines changed: 277 additions & 49 deletions
Large diffs are not rendered by default.

source/Tutorials/Intermediate/Launch/launch/broadcast_listener_launch.py renamed to source/Tutorials/Intermediate/Launch/launch/broadcaster_listener_launch.py

File renamed without changes.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<launch>
3+
<arg name="target_frame" default="turtle1" description="Target frame name." />
4+
<node pkg="turtle_tf2_py" exec="turtle_tf2_broadcaster" name="broadcaster1">
5+
<param name="turtlename" value="turtle1" />
6+
</node>
7+
<node pkg="turtle_tf2_py" exec="turtle_tf2_broadcaster" name="broadcaster2">
8+
<param name="turtlename" value="turtle2" />
9+
</node>
10+
<node pkg="turtle_tf2_py" exec="turtle_tf2_listener" name="listener">
11+
<param name="target_frame" value="$(var target_frame)" />
12+
</node>
13+
</launch>
14+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
%YAML 1.2
2+
---
3+
launch:
4+
- arg:
5+
name: "target_frame"
6+
default: "turtle1"
7+
description: "Target frame name."
8+
- node:
9+
pkg: "turtle_tf2_py"
10+
exec: "turtle_tf2_broadcaster"
11+
name: "broadcaster1"
12+
param:
13+
- name: "turtlename"
14+
value: "turtle1"
15+
- node:
16+
pkg: "turtle_tf2_py"
17+
exec: "turtle_tf2_broadcaster"
18+
name: "broadcaster2"
19+
param:
20+
- name: "turtlename"
21+
value: "turtle2"
22+
- node:
23+
pkg: "turtle_tf2_py"
24+
exec: "turtle_tf2_listener"
25+
name: "listener"
26+
param:
27+
- name: "target_frame"
28+
value: "$(var target_frame)"
29+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<launch>
3+
<arg name="node_prefix" default="$(env USER '')_" description="prefix for node name" />
4+
<node pkg="turtle_tf2_py" exec="fixed_frame_tf2_broadcaster" name="$(var node_prefix)fixed_broadcaster" />
5+
</launch>
6+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
%YAML 1.2
2+
---
3+
launch:
4+
- arg:
5+
name: "node_prefix"
6+
default: "$(env USER '')_"
7+
description: "prefix for node name"
8+
- node:
9+
pkg: "turtle_tf2_py"
10+
exec: "fixed_frame_tf2_broadcaster"
11+
name: "$(var node_prefix)fixed_broadcaster"
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<launch>
3+
<include file="$(find-pkg-share launch_tutorial)/launch/turtlesim_world_1_launch.xml" />
4+
<include file="$(find-pkg-share launch_tutorial)/launch/turtlesim_world_2_launch.xml" />
5+
<include file="$(find-pkg-share launch_tutorial)/launch/broadcaster_listener_launch.xml">
6+
<let name="target_frame" value="carrot1" />
7+
</include>
8+
<include file="$(find-pkg-share launch_tutorial)/launch/mimic_launch.xml" />
9+
<include file="$(find-pkg-share launch_tutorial)/launch/fixed_broadcaster_launch.xml" />
10+
<include file="$(find-pkg-share launch_tutorial)/launch/turtlesim_rviz_launch.xml" />
11+
</launch>
12+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
%YAML 1.2
2+
---
3+
launch:
4+
- include:
5+
file: "$(find-pkg-share launch_tutorial)/launch/turtlesim_world_1_launch.yaml"
6+
- include:
7+
file: "$(find-pkg-share launch_tutorial)/launch/turtlesim_world_2_launch.yaml"
8+
- include:
9+
file: "$(find-pkg-share launch_tutorial)/launch/broadcaster_listener_launch.yaml"
10+
let:
11+
- name: "target_frame"
12+
value: "carrot1"
13+
- include:
14+
file: "$(find-pkg-share launch_tutorial)/launch/mimic_launch.yaml"
15+
- include:
16+
file: "$(find-pkg-share launch_tutorial)/launch/fixed_broadcaster_launch.yaml"
17+
- include:
18+
file: "$(find-pkg-share launch_tutorial)/launch/turtlesim_rviz_launch.yaml"
19+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<launch>
3+
<node pkg="turtlesim" exec="mimic" name="mimic">
4+
<remap from="/input/pose" to="/turtle2/pose" />
5+
<remap from="/output/cmd_vel" to="/turtlesim2/turtle1/cmd_vel" />
6+
</node>
7+
</launch>
8+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
%YAML 1.2
2+
---
3+
launch:
4+
- node:
5+
pkg: "turtlesim"
6+
exec: "mimic"
7+
name: "mimic"
8+
remap:
9+
- from: "/input/pose"
10+
to: "/turtle2/pose"
11+
- from: "/output/cmd_vel"
12+
to: "/turtlesim2/turtle1/cmd_vel"
13+

0 commit comments

Comments
 (0)