Skip to content

Commit 023ff7c

Browse files
authored
Update level selection in launcher
1 parent 3be5c3d commit 023ff7c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

manager/manager/launcher/launcher_o3de_api.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
import logging
1717

18-
1918
class LauncherO3deApi(ILauncher):
2019
display: str
2120
internal_port: int
@@ -38,7 +37,13 @@ def run(self, callback):
3837
xserver_thread = DockerThread(xserver_cmd)
3938
xserver_thread.start()
4039
self.threads.append(xserver_thread)
41-
40+
41+
LevelSelect=f'echo "LoadLevel Levels/{self.launch_file}" > data/workspace/ROS2Demo/autoexec.cfg'
42+
43+
LevelSelect_thread = DockerThread(LevelSelect)
44+
LevelSelect_thread.start()
45+
self.threads.append(LevelSelect_thread)
46+
4247
if ACCELERATION_ENABLED:
4348
# Starts xserver, x11vnc and novnc
4449
self.gz_vnc.start_vnc_gpu(
@@ -56,7 +61,7 @@ def run(self, callback):
5661
gzclient_thread.start()
5762
self.threads.append(gzclient_thread)
5863

59-
process_name = 'data/workspace/ROS2Demo/build/linux/bin/profile/ROS2Demo.GameLauncher --forceAdapter="NVIDIA"'
64+
process_name = 'ROS2Demo.GameLauncher'
6065
wait_for_process_to_start(process_name, timeout=360)
6166

6267
def terminate(self):
@@ -69,7 +74,7 @@ def terminate(self):
6974
self.threads.remove(thread)
7075

7176
# TODO: processes to kill
72-
to_kill = ["launch.py"]
77+
to_kill = ["ROS2Demo.GameLauncher"]
7378

7479
kill_cmd = "pkill -9 -f "
7580
for i in to_kill:

0 commit comments

Comments
 (0)