Gui launcher tweaks
This commit is contained in:
parent
69589259e1
commit
b99f617166
|
@ -17,6 +17,7 @@ services:
|
|||
volumes:
|
||||
# X11 socket
|
||||
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||
- ${XAUTHORITY:-~/.Xauthority}:/root/.Xauthority
|
||||
# Wayland socket
|
||||
- ${XDG_RUNTIME_DIR}/wayland-0:${XDG_RUNTIME_DIR}/wayland-0
|
||||
# Allow access to the host's GPU
|
||||
|
@ -26,7 +27,7 @@ services:
|
|||
- /dev/dri:/dev/dri
|
||||
# network_mode: host
|
||||
ipc: host
|
||||
user: "${UID}:${GID}"
|
||||
#user: "${UID}:${GID}"
|
||||
privileged: true # Allow privileged access if necessary (e.g., for GPU access)
|
||||
# restart: unless-stopped
|
||||
# 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
|
||||
applications = {
|
||||
"Launch Terminal": ['qterminal'],
|
||||
"Launch rqt": ["rqt"],
|
||||
"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
|
||||
}
|
||||
|
||||
|
@ -20,6 +22,9 @@ def launch_app(command):
|
|||
root = tk.Tk()
|
||||
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
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue