Table of Contents
The PPE Vending Machine GUI Package is a ROS2-based application designed to provide an intuitive graphical user interface (GUI) for controlling and monitoring Personal Protective Equipment (PPE) vending machines. Built with PyQt5, this package enables real-time interaction with the vending machine hardware, allowing users to efficiently manage PPE dispensing, monitor inventory levels, and ensure safety compliance. The GUI is tailored for ease of use, featuring touchscreen compatibility and accessibility options to accommodate a wide range of users.
- Real-time PPE Detection: Monitor PPE detection status in real-time for immediate feedback.
- Automated Safety Gate Control: Implement logic for automatic control of the safety gate.
- Safety Gate Override System: Allow the safety gate to be overridden provided user and reason information.
- PPE Dispensing System: Send PPE dispense requests to the vending machine hardware based on GUI inputs.
- ROS2 Integration: Seamlessly interface with vending machine hardware and computer vision models using ROS2.
- Simulation Support: Test nodes are provided to simulate and test the GUI for demonstrations.
- Touchscreen Friendly: GUI is developed with a touchscreen in mind with large touch targets and clear text labels.
- Theme Support: The GUI supports a dark theme and a light theme.
- Accessibility Features: The GUI supports a toggle for O/X status indicators, for users with visual impairments.
- ESP32 Safety Gate Controller: An ESP32 microcontroller is used to control the safety gate.
- Inventory Management: Inventory is managed with a JSON file and can be viewed live from the GUI.
- Analytical Reporting: Generate insightful reports with visualizations of PPE dispensing activities, including pie and bar charts, to aid in inventory management and decision-making. A ROS bag file is also recorded for later analysis using services such as AWS S3.
For a detailed list of changes, bug fixes, new features, and the Latest Release, please refer to the CHANGELOG.
-
Create a ROS2 workspace (if you don't have one):
mkdir -p ~/ros2_ws/src cd ~/ros2_ws
-
Clone this package:
cd src git clone https://github.com/ckyb63/ppe_gui_package.git -
Install dependencies using
rosdep:cd ~/ros2_ws rosdep install --from-paths src --ignore-src -r -y
-
Install additional dependencies:
sudo apt update sudo apt install python3-pyqt5
-
Build and source the workspace:
cd ~/ros2_ws colcon build --packages-select gui_package --symlink-install source install/setup.bash
-
Run the GUI:
ros2 launch gui_package main_ppe_gui.launch.py
# Run the main GUI which is a PyQt5-based GUI for controlling and monitoring the PPE vending machine
main_ppe_gui
# Run the dummy inventory publisher which simulates the inventory level of the PPE vending machine
dummy_inventory
# Run the dummy PPE dispenser which simulates random PPE detection
dummy_ppe
# For running with Demo Gate hardware (ESP32 connected with USB over Serial)
safety_gate_controller
# For recording the dispense bag
record_dispense_bag# Launch the main GUI with the gate controller and ros bag recording node
main_ppe_gui.launch.py
# Launch the dummy nodes together
dummy_nodes.launch.py-
ppe_status(std_msgs/String): Receives PPE detection status- Format: "hardhat:true, beardnet:false, gloves:true, glasses:true, earplugs:false"
-
ppeInventoryStatus(std_msgs/String): Receives inventory status updates- Format: JSON string with inventory levels
-
pleaseDispense(std_msgs/String): Sends dispense requests- Values: "hardhat", "beardnet", "gloves", "glasses", "earplugs", "OVERRIDE"
-
gate(std_msgs/Bool): Controls safety gate status- true = locked, false = unlocked
-
ppeInventory(std_msgs/String): Sends inventory update requests- Value: "request"
The following chart illustrates the current relationship between the nodes and topics in the PPE Vending Machine GUI Package:
This chart provides a visual representation of how the various nodes communicate through topics which is helpful for understanding what this package is about.
Settings Interface
![]() |
![]() |
| Main settings configuration panel | Inventory management settings |
![]() |
![]() |
| System timing and delay settings | Override logging and configuration |
![]() |
![]() |
| Settings tab Info | Dispensing report and analytics |
- Max Chen










