Skip to content

Commit e58c526

Browse files
authored
Merge pull request #191 from CWRUbotix/three-monitor
Three monitor display, needs testing
2 parents f1f2d18 + 7300c0d commit e58c526

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/surface/gui/gui/pilot_app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ class GuiType(enum.Enum):
3535
# Use 1 or 2 to launch fullscreen on the corresponding monitor
3636
# Use `None` to launch in windowed mode
3737
TWO_MONITOR_CONFIG: dict[GuiType, int | None] = {
38-
GuiType.PILOT: None,
39-
GuiType.LIVESTREAM: 1,
38+
GuiType.PILOT: 1,
39+
GuiType.LIVESTREAM: None,
4040
GuiType.DEBUG: None,
4141
}
4242
THREE_MONITOR_CONFIG: dict[GuiType, int | None] = {
43-
GuiType.PILOT: 2,
44-
GuiType.LIVESTREAM: 1,
43+
GuiType.PILOT: 1,
44+
GuiType.LIVESTREAM: 2,
4545
GuiType.DEBUG: None,
4646
}
4747

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
from pathlib import Path
22

33
from ament_index_python.packages import get_package_share_directory
4-
from launch.actions import IncludeLaunchDescription
4+
from launch.actions import GroupAction, IncludeLaunchDescription
55
from launch.launch_description import LaunchDescription
66
from launch.launch_description_sources import PythonLaunchDescriptionSource
7+
from launch_ros.actions import PushRosNamespace
78

89

910
def generate_launch_description() -> LaunchDescription:
1011
surface_path = get_package_share_directory('surface_main')
12+
gui_path = get_package_share_directory('gui')
1113

1214
all_launch = IncludeLaunchDescription(
1315
PythonLaunchDescriptionSource(
1416
[str(Path(surface_path) / 'launch' / 'surface_all_nodes_launch.py')]
1517
),
18+
)
19+
20+
livestream_launch = IncludeLaunchDescription(
21+
PythonLaunchDescriptionSource([str(Path(gui_path) / 'launch' / 'pilot_launch.py')]),
1622
launch_arguments=[('gui', 'livestream')],
1723
)
1824

25+
namespace_launch = GroupAction(actions=[PushRosNamespace('surface'), livestream_launch])
26+
1927
return LaunchDescription(
2028
[
2129
all_launch,
30+
namespace_launch,
2231
]
2332
)

0 commit comments

Comments
 (0)