Lightweight fullscreen kiosk for MageDok 7" display: **Architecture:** - Cage: Minimal Wayland compositor (replaces GNOME) - Chromium: Fullscreen kiosk browser for SaltyFace web UI - PulseAudio: HDMI audio routing (from Issue #369) - Touch: HID input from MageDok USB device **Memory Savings:** - GNOME desktop: ~650MB RAM - Cage + Chromium: ~200MB RAM - Net gain: ~450MB for ROS2 workloads **Files:** - config/cage-magedok.ini — Cage display settings (1024×600@60Hz) - config/wayland-magedok.conf — Wayland output configuration - scripts/chromium_kiosk.sh — Cage + Chromium launcher - systemd/chromium-kiosk.service — Auto-start systemd service - launch/cage_display.launch.py — ROS2 launch configuration - docs/CAGE_CHROMIUM_KIOSK.md — Complete setup & troubleshooting guide **Next:** Issue #370 (Salty Face as web app in Chromium kiosk) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
79 lines
2.2 KiB
Python
79 lines
2.2 KiB
Python
#!/usr/bin/env python3
|
|
"""
|
|
Cage Wayland + Chromium kiosk launch configuration for MageDok 7" display.
|
|
|
|
Lightweight alternative to X11 desktop environment:
|
|
- Cage: Minimal Wayland compositor (replaces GNOME/Mutter)
|
|
- Chromium: Fullscreen kiosk browser for SaltyFace web UI
|
|
- PulseAudio: HDMI audio routing
|
|
|
|
Memory savings vs GNOME:
|
|
- GNOME + Mutter: ~650MB RAM
|
|
- Cage + Chromium: ~200MB RAM
|
|
- Savings: ~450MB RAM for other ROS2 workloads
|
|
|
|
Issue #374: Replace GNOME with Cage + Chromium kiosk
|
|
"""
|
|
|
|
from launch import LaunchDescription
|
|
from launch_ros.actions import Node
|
|
from launch.actions import DeclareLaunchArgument, ExecuteProcess
|
|
from launch.substitutions import LaunchConfiguration
|
|
|
|
def generate_launch_description():
|
|
"""Generate ROS2 launch description for Cage + Chromium kiosk."""
|
|
|
|
# Launch arguments
|
|
url_arg = DeclareLaunchArgument(
|
|
'kiosk_url',
|
|
default_value='http://localhost:3000',
|
|
description='URL for Chromium kiosk (SaltyFace web app)'
|
|
)
|
|
|
|
debug_arg = DeclareLaunchArgument(
|
|
'debug',
|
|
default_value='false',
|
|
description='Enable debug logging'
|
|
)
|
|
|
|
ld = LaunchDescription([url_arg, debug_arg])
|
|
|
|
# Start touch monitor (from Issue #369 - reused)
|
|
# Monitors MageDok USB touch device availability
|
|
touch_monitor = Node(
|
|
package='saltybot_bringup',
|
|
executable='touch_monitor.py',
|
|
name='touch_monitor',
|
|
output='screen',
|
|
)
|
|
ld.add_action(touch_monitor)
|
|
|
|
# Start audio router (from Issue #369 - reused)
|
|
# Routes HDMI audio to built-in speakers via PulseAudio
|
|
audio_router = Node(
|
|
package='saltybot_bringup',
|
|
executable='audio_router.py',
|
|
name='audio_router',
|
|
output='screen',
|
|
)
|
|
ld.add_action(audio_router)
|
|
|
|
# Start Cage Wayland compositor with Chromium kiosk
|
|
# Replaces X11 server + GNOME desktop environment
|
|
cage_chromium = ExecuteProcess(
|
|
cmd=[
|
|
'/opt/saltybot/scripts/chromium_kiosk.sh',
|
|
'--url', LaunchConfiguration('kiosk_url'),
|
|
],
|
|
condition_condition=None, # Always start
|
|
name='cage_chromium',
|
|
shell=True,
|
|
)
|
|
ld.add_action(cage_chromium)
|
|
|
|
return ld
|
|
|
|
|
|
if __name__ == '__main__':
|
|
print(generate_launch_description())
|