A comprehensive real-time dashboard system for monitoring and controlling RoboCup 3v3 humanoid soccer robots. This system provides live visualization of robot status, field positions, game state, and performance metrics.
The dashboard system consists of two main components:
- Robot Side (C++): Data collection and transmission from robots to dashboard
- Dashboard Side (Python): Data reception, processing, visualization, and remote control
The robots collect and transmit data via UDP to a central dashboard running on a laptop (Mac), which processes and displays all information while providing remote control capabilities.
- Multi-Robot Status: Live display of all connected robots with health indicators
- Field Visualization: 2D field view with robot positions, orientations, and ball tracking
- Game State Tracking: Current game phase, score, and team status
- Performance Analytics: Loop times, resource usage, and system metrics
- Ball Possession Flow: Real-time tracking of ball possession and handovers
- Remote Commands: Send build/start/stop commands to individual robots or groups
- Emergency Stop: Immediate stop command for all robots
- Robot Selection: Target specific robots or broadcast to all
- Connection Monitoring: Automatic detection of connected/disconnected robots
- Robot Status Cards: Individual status panels for each robot showing:
- Connection status and robot name
- Game state and position coordinates
- Current role and ball possession
- Ball detection status and position
- Performance metrics and behavior decisions
- Field Canvas: Interactive field visualization with:
- Accurate RoboCup field dimensions (9m x 6m)
- Robot positions with orientation indicators
- Ball position from multiple robot perspectives
- Goal areas and field markings
- Game State Panel: Overall match information including:
- Current game state (INITIAL, READY, SET, PLAY, END)
- Team score and connected robot count
- Ball possession status
- Python 3.8 or higher
- macOS (primary target), Linux, or Windows
- Network connectivity between robots and laptop
-
Clone or download the dashboard system:
cd /path/to/your/dashboard/directory
-
Install dependencies:
pip install -r requirements.txt
Note:
tkinter
is included with Python by default. -
Configure robot-side communication (C++): Ensure your robots are configured to send data to the dashboard IP and port. Default configuration:
- Dashboard IP:
192.168.4.77
(Mac laptop) - Dashboard Port:
8080
- Dashboard IP:
python main.py
python main.py --port 9090
python main.py --simulate
--port PORT
: UDP port to listen for robot data (default: 8080)--simulate
: Start with simulated robot data for testing--timeout SECONDS
: Robot timeout in seconds (default: 5)
The robots should be configured to send JSON data to the dashboard. You can set environment variables:
export DASHBOARD_IP="192.168.4.77" # Your Mac's IP address
export DASHBOARD_PORT="8080" # Dashboard port
- Ensure all robots and the dashboard laptop are on the same WiFi network
- Find your Mac's IP address:
ifconfig | grep "inet " | grep -v 127.0.0.1
- Update the robot configuration to use your Mac's IP address
- Test connectivity:
# On robot: ping your_mac_ip ping 192.168.4.77
The dashboard expects JSON data from robots in the following format:
{
"robot_id": 0,
"robot_name": "robot1",
"team_id": 1,
"timestamp": 1634567890.123,
"game": {
"state": "PLAY",
"kickoff_side": true,
"score": 2
},
"robot": {
"pose": {
"x": 1.5,
"y": -0.8,
"theta": 0.785
},
"ball": {
"detected": true,
"x": 2.1,
"y": -0.5,
"range": 0.8
}
},
"collaboration": {
"role": "master",
"dynamic_role": 1,
"has_possession": false,
"possession_player": 2,
"ball_cost": 1.2
},
"behavior": {
"decision": "approach_ball",
"ball_location_known": true
},
"performance": {
"avg_loop_time": 0.015,
"max_loop_time": 0.032
},
"head": {
"pitch": -0.2,
"yaw": 0.5
},
"recovery": {
"state": 0,
"available": true
},
"team_count": 2
}
The dashboard interface consists of several main areas:
-
Left Panel:
- Game State: Overall match status and team information
- Robot Status Cards: Individual robot monitoring panels
- Control Panel: Remote robot control commands
-
Right Panel:
- Field View: 2D visualization of the soccer field with robot positions
- Ball Tracking: Real-time ball position from robot sensors
-
Status Bar: Connection status and robot count
- Green Circle (โ): Robot connected and sending data
- Red Circle (โ): Robot disconnected or not responding
- Yellow Robot: Robot has ball possession
- Ball Indicators: Orange circles show detected ball positions
- Select Target: Choose individual robot or "All Robots"
- Send Commands:
- Build: Trigger robot build process
- Start: Start robot systems
- Stop: Stop robot systems
- Emergency Stop: Immediate stop for all robots (confirmation required)
- Check network connectivity between robots and laptop
- Verify robots are sending data to correct IP:PORT
- Check firewall settings on laptop
- Use simulation mode to test dashboard functionality:
python main.py --simulate
- Check WiFi signal strength
- Verify robot timeout settings (default: 5 seconds)
- Increase timeout if needed:
python main.py --timeout 10
- Close other applications to free up resources
- Reduce GUI update frequency if needed
- Check network bandwidth usage
For development and testing without physical robots:
# Run dashboard with simulator
python main.py --simulate
# Or run simulator separately
python robot_simulator.py --robots 3 --port 8080
The simulator generates realistic robot behavior including:
- Movement around the field
- Ball detection and tracking
- Game state transitions
- Performance metrics
- Collaboration behaviors
The modular design allows easy extension:
- Add new data fields: Update
RobotData
class indashboard_core.py
- Create new visualizations: Add widgets to
dashboard_gui.py
- Implement new commands: Extend
ControlPanel
class - Add data processing: Modify
DashboardCore
class
- CPU: Dual-core 2.0 GHz
- RAM: 4 GB
- Network: WiFi 802.11n
- OS: macOS 10.14+, Ubuntu 18.04+, or Windows 10
- CPU: Quad-core 2.5 GHz or better
- RAM: 8 GB or more
- Network: WiFi 802.11ac or Ethernet
- Display: 1920x1080 or larger for optimal viewing
Based on DASHBOARD_FEATURES.md
, planned enhancements include:
- Advanced Analytics: Machine learning integration and predictive maintenance
- 3D Visualization: Three-dimensional field and robot visualization
- Mobile Support: Mobile app for remote monitoring
- Data Logging: Historical data analysis and replay capabilities
- Multi-Monitor Support: Distributed dashboard across multiple displays
- Voice Alerts: Audio notifications and speech synthesis
- Customizable Layouts: Drag-and-drop dashboard configuration
- Follow the existing code structure and documentation style
- Test new features with the robot simulator
- Update this README when adding new features
- Ensure compatibility with the robot-side C++ implementation
This project is part of the RoboCup robot system. Please follow your team's licensing requirements.
For issues or questions:
- Check the troubleshooting section above
- Test with simulation mode to isolate issues
- Verify network connectivity and configuration
- Review robot-side logs for transmission errors
Happy Robotics! ๐คโฝ