Gui launcher tweaks
This commit is contained in:
parent
69589259e1
commit
b99f617166
|
@ -17,6 +17,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
# X11 socket
|
# X11 socket
|
||||||
- /tmp/.X11-unix:/tmp/.X11-unix
|
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||||
|
- ${XAUTHORITY:-~/.Xauthority}:/root/.Xauthority
|
||||||
# Wayland socket
|
# Wayland socket
|
||||||
- ${XDG_RUNTIME_DIR}/wayland-0:${XDG_RUNTIME_DIR}/wayland-0
|
- ${XDG_RUNTIME_DIR}/wayland-0:${XDG_RUNTIME_DIR}/wayland-0
|
||||||
# Allow access to the host's GPU
|
# Allow access to the host's GPU
|
||||||
|
@ -26,7 +27,7 @@ services:
|
||||||
- /dev/dri:/dev/dri
|
- /dev/dri:/dev/dri
|
||||||
# network_mode: host
|
# network_mode: host
|
||||||
ipc: host
|
ipc: host
|
||||||
user: "${UID}:${GID}"
|
#user: "${UID}:${GID}"
|
||||||
privileged: true # Allow privileged access if necessary (e.g., for GPU access)
|
privileged: true # Allow privileged access if necessary (e.g., for GPU access)
|
||||||
# restart: unless-stopped
|
# restart: unless-stopped
|
||||||
# command: /bin/bash -c "source /opt/ros/foxy/setup.bash && rvis2" # Replace with the actual command to run Gazebo Ignition
|
# command: /bin/bash -c "source /opt/ros/foxy/setup.bash && rvis2" # Replace with the actual command to run Gazebo Ignition
|
||||||
|
|
|
@ -3,9 +3,11 @@ import subprocess
|
||||||
|
|
||||||
# Dictionary of applications: key is the button text, value is the command to execute
|
# Dictionary of applications: key is the button text, value is the command to execute
|
||||||
applications = {
|
applications = {
|
||||||
|
"Launch Terminal": ['qterminal'],
|
||||||
"Launch rqt": ["rqt"],
|
"Launch rqt": ["rqt"],
|
||||||
"Launch rviz2": ["rviz2"],
|
"Launch rviz2": ["rviz2"],
|
||||||
"Launch Terminal": ['qterminal'],
|
"Launch Gazebo": "gz sim -v4 -g".split(),
|
||||||
|
"Launch Gazebo Standalone": "gz sim -v4".split(),
|
||||||
# Add more applications here if needed
|
# Add more applications here if needed
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,6 +22,9 @@ def launch_app(command):
|
||||||
root = tk.Tk()
|
root = tk.Tk()
|
||||||
root.title("Spiri SDK Launcher")
|
root.title("Spiri SDK Launcher")
|
||||||
|
|
||||||
|
label = tk.Label(root, text="Spiri Robotics SDK", font=("Arial", 14))
|
||||||
|
label.pack(pady=10)
|
||||||
|
|
||||||
# Create and place buttons dynamically based on the dictionary
|
# Create and place buttons dynamically based on the dictionary
|
||||||
for app_name, command in applications.items():
|
for app_name, command in applications.items():
|
||||||
button = tk.Button(root, text=app_name, command=lambda cmd=command: launch_app(cmd), width=20, height=2)
|
button = tk.Button(root, text=app_name, command=lambda cmd=command: launch_app(cmd), width=20, height=2)
|
||||||
|
|
Loading…
Reference in New Issue