A comprehensive laser tag tournament system designed for autonomous robot competitions. This system provides real-time control, game management, IR-based hit detection, and live video streaming capabilities.
The Competition System consists of three primary components:
- Raspberry Pi (Robot) - Onboard control system running motor control, IR weapon/sensor systems, camera streaming, and game state management
- Laptop (Operator Station) - Remote control interface with keyboard input, video feed display, and game status monitoring
- Game Viewer (Tournament Management) - Centralized tournament server managing multiple teams, scoring, match scheduling, and referee controls
┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ Raspberry Pi │◄───────►│ Laptop │◄───────►│ Game Viewer │
│ (On Robot) │ UDP │ (Operator) │ UDP │ (Tournament) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│ │ │
├─ Motor Control ├─ Keyboard Input ├─ Scoring
├─ IR Weapon/Sensor ├─ Video Display ├─ Team Management
├─ Camera Streaming ├─ Status Display ├─ Match Control
├─ Servo Control └─ Game Timer ├─ Leaderboard
└─ GPIO Control └─ Referee Interface
- Pi ↔ Laptop: UDP on port 5005 (control commands) and 5000+ (video streams)
- Laptop ↔ Game Viewer: UDP on port 6000 (game viewer) and 6100+ (laptop listeners)
- Pi → Game Viewer: Direct UDP for hit reports and registration
- All messages use JSON encoding for structured data exchange
Detailed setup instructions are provided in component-specific README files:
- Laptop Setup Instructions - For operators controlling robots
- Raspberry Pi Setup Instructions - For robot onboard systems
- Game Viewer Setup - Requires Laptop setup plus running
GameViewer/game_viewer.py
- Mecanum drive control with keyboard input (WASD)
- Dual servo control for mechanisms
- GPIO control for accessories
- Emergency stop functionality
- Boost speed mode
- IR transmitter for shooting (38kHz modulated)
- IR receiver for hit detection
- Team ID encoding in IR signals
- 10-second disable period after hits
- Automatic hit reporting to Game Viewer
- Team registration and ready checking
- Configurable match duration
- Real-time scoring and leaderboard
- Kill/Death tracking
- Point awards (hits, objectives)
- Match history and statistics export
- H.264 encoded video via GStreamer
- Low-latency UDP streaming
- Multi-camera support (up to 8 teams)
- Embedded camera viewer in Game Viewer
Each component uses JSON configuration files:
- Pi:
team_config.json- Team ID, robot name, network settings, hardware pins - Laptop:
laptop_controls.json- Keyboard mappings (auto-generated) - Game Viewer:
game_viewer_config.json- Match duration, scoring rules, network settings
- Windows 10/11
- Python 3.9 or higher
- GStreamer runtime and development libraries
- Microsoft Visual Studio Build Tools 2022
- 8GB RAM minimum
- Network connectivity to robot and game viewer
- Raspberry Pi 4B (4GB+ recommended)
- Raspbian OS (Bullseye or newer)
- Python 3.9 or higher
- pigpio daemon
- GStreamer libraries
- Camera module (optional for video streaming)
- Same requirements as Laptop
- Additional: PyGObject for embedded video display
[Add your license information here]
[Add contribution guidelines here]
For technical support or questions, contact your team lead.