Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion manager/manager/launcher/launcher_o3de.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from typing import List, Any
from manager.ram_logging.log_manager import LogManager


class LauncherO3de(ILauncher):
running: bool = False
threads: List[Any] = []
Expand Down Expand Up @@ -50,7 +51,7 @@ def unpause(self):
pass

def reset(self):
#TODO: add reset
# TODO: add reset
pass

def get_dri_path(self):
Expand Down
13 changes: 7 additions & 6 deletions manager/manager/launcher/launcher_o3de_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

import logging


class LauncherO3deApi(ILauncher):
display: str
internal_port: int
Expand All @@ -31,19 +32,19 @@ def run(self, callback):
DRI_PATH = self.get_dri_path()
ACCELERATION_ENABLED = self.check_device(DRI_PATH)

#TODO: add run here
# TODO: add run here

xserver_cmd = f"/usr/bin/Xorg -quiet -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./xdummy.log -config ./xorg.conf :0"
xserver_thread = DockerThread(xserver_cmd)
xserver_thread.start()
self.threads.append(xserver_thread)
LevelSelect=f'echo "LoadLevel Levels/{self.launch_file}" > data/workspace/ROS2Demo/autoexec.cfg'

LevelSelect = f'echo "LoadLevel Levels/{self.launch_file}" > data/workspace/ROS2Demo/autoexec.cfg'

LevelSelect_thread = DockerThread(LevelSelect)
LevelSelect_thread.start()
self.threads.append(LevelSelect_thread)

if ACCELERATION_ENABLED:
# Starts xserver, x11vnc and novnc
self.gz_vnc.start_vnc_gpu(
Expand All @@ -61,7 +62,7 @@ def run(self, callback):
gzclient_thread.start()
self.threads.append(gzclient_thread)

process_name = 'ROS2Demo.GameLauncher'
process_name = "ROS2Demo.GameLauncher"
wait_for_process_to_start(process_name, timeout=360)

def terminate(self):
Expand Down
9 changes: 4 additions & 5 deletions manager/manager/launcher/launcher_rviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ def run(self, config_file, callback):
config = "ros2 run rviz2 rviz2"

if config_file != None:
config = f'ros2 launch {config_file}'
config = f"ros2 launch {config_file}"

print(config)
if ACCELERATION_ENABLED:
self.console_vnc.start_vnc_gpu(
Expand Down Expand Up @@ -69,7 +69,6 @@ def terminate(self):
def died(self):
pass


# rviz_node_full = Node(
# package="rviz2",
# executable="rviz2",
Expand All @@ -80,7 +79,7 @@ def died(self):
# robot_description,
# robot_description_semantic,
# kinematics_yaml,

# pilz_planning_pipeline_config,

# joint_limits,
Expand All @@ -92,4 +91,4 @@ def died(self):
# move_group_capabilities,
# {"use_sim_time": True},
# ]
# )
# )
2 changes: 1 addition & 1 deletion manager/manager/launcher/launcher_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class LauncherTools(BaseModel):
def run(self, consumer):
for tool in self.tools:
if tool == "simulator":
if self.world_type is None:
if self.world_type is None or self.world_type == "physical":
continue
tool = simulator[self.world_type]["tool"]
module = tools[tool]
Expand Down
11 changes: 10 additions & 1 deletion manager/manager/launcher/launcher_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,16 @@
}
],
},
"physical": {},
"physical": {
"2": [
{
"type": "real",
"module": "ros2_api",
"parameters": [],
"launch_file": [],
}
],
},
}


Expand Down
8 changes: 4 additions & 4 deletions manager/manager/vnc/vnc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ def start_vnc(self, display, internal_port, external_port):
wait_for_xserver(display)

certs = ""

if os.path.isfile("/etc/certs/cert.pem"):
certs = "--cert /etc/certs/cert.pem --key /etc/certs/privkey.pem"
certs = "--cert /etc/certs/cert.pem --key /etc/certs/privkey.pem"

# Start noVNC with default port 6080 listening to VNC server on 5900
if self.get_ros_version() == "2":
Expand Down Expand Up @@ -89,9 +89,9 @@ def start_vnc_gpu(self, display, internal_port, external_port, dri_path):
wait_for_xserver(display)

certs = ""

if os.path.isfile("/etc/certs/cert.pem"):
certs = "--cert /etc/certs/cert.pem --key /etc/certs/privkey.pem"
certs = "--cert /etc/certs/cert.pem --key /etc/certs/privkey.pem"

# Start noVNC with default port 6080 listening to VNC server on 5900
if self.get_ros_version() == "2":
Expand Down
Loading