Skip to content

Commit fc086e8

Browse files
Refactor launcher_o3de_api.py to work with O3DE executable
1 parent 75868bb commit fc086e8

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

robotics_application_manager/manager/launcher/launcher_o3de_api.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,30 +42,24 @@ def run(self, callback):
4242
xserver_thread.start()
4343
self.threads.append(xserver_thread)
4444

45-
LevelSelect = f'echo "LoadLevel Levels/{self.launch_file}" > data/workspace/ROS2Demo/autoexec.cfg'
46-
47-
LevelSelect_thread = DockerThread(LevelSelect)
48-
LevelSelect_thread.start()
49-
self.threads.append(LevelSelect_thread)
50-
5145
if ACCELERATION_ENABLED:
5246
# Starts xserver, x11vnc and novnc
5347
self.gz_vnc.start_vnc_gpu(
5448
self.display, self.internal_port, self.external_port, DRI_PATH
5549
)
5650
# Write display config
57-
o3decmd = f'export DISPLAY={self.display}; data/workspace/ROS2Demo/build/linux/bin/profile/ROS2Demo.GameLauncher --forceAdapter="NVIDIA"'
51+
o3decmd = f'export DISPLAY={self.display}; data/workspace/o3de/gme_o3de/bin/Linux/release/Monolithic/MySimulationProject2.GameLauncher +LoadLevel "{self.launch_file}" --forceAdapter="NVIDIA"'
5852
else:
5953
# Starts xserver, x11vnc and novnc
6054
self.gz_vnc.start_vnc(self.display, self.internal_port, self.external_port)
6155
# Write display config
62-
o3decmd = f'export DISPLAY={self.display}; data/workspace/ROS2Demo/build/linux/bin/profile/ROS2Demo.GameLauncher --forceAdapter="NVIDIA"'
56+
o3decmd = f'export DISPLAY={self.display}; data/workspace/o3de/gme_o3de/bin/Linux/release/Monolithic/MySimulationProject2.GameLauncher +LoadLevel "{self.launch_file}" --forceAdapter="NVIDIA"'
6357

6458
gzclient_thread = DockerThread(o3decmd)
6559
gzclient_thread.start()
6660
self.threads.append(gzclient_thread)
6761

68-
process_name = "ROS2Demo.GameLauncher"
62+
process_name = "MySimulationProject2.GameLauncher"
6963
wait_for_process_to_start(process_name, timeout=360)
7064

7165
def terminate(self):
@@ -78,7 +72,7 @@ def terminate(self):
7872
self.threads.remove(thread)
7973

8074
# TODO: processes to kill
81-
to_kill = ["ROS2Demo.GameLauncher"]
75+
to_kill = ["MySimulationProject2.GameLauncher"]
8276

8377
kill_cmd = "pkill -9 -f "
8478
for i in to_kill:

0 commit comments

Comments
 (0)