Skip to content

ckyb63/ppe_gui_package

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GUI Package for PPE Vending Machine

Version Python PyQt5 AVend API ROS2 Ubuntu Status

Table of Contents

Introduction

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.

Features

Detection and Control

  • 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.

Integration and Simulation

  • 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.

User Experience

  • 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.

Management and Reporting

  • 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.

Update Changelog

For a detailed list of changes, bug fixes, new features, and the Latest Release, please refer to the CHANGELOG.

Installation

  1. Create a ROS2 workspace (if you don't have one):

    mkdir -p ~/ros2_ws/src
    cd ~/ros2_ws
  2. Clone this package:

    cd src
    git clone https://github.com/ckyb63/ppe_gui_package.git
  3. Install dependencies using rosdep:

    cd ~/ros2_ws
    rosdep install --from-paths src --ignore-src -r -y
  4. Install additional dependencies:

    sudo apt update
    sudo apt install python3-pyqt5
  5. Build and source the workspace:

    cd ~/ros2_ws
    colcon build --packages-select gui_package --symlink-install
    source install/setup.bash
  6. Run the GUI:

    ros2 launch gui_package main_ppe_gui.launch.py

Usage

Provided Nodes for use with ros2 run

# 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

Provided Launch Files for use with ros2 launch

# 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

Topics

  • 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"

Node and Topic Relationships

The following chart illustrates the current relationship between the nodes and topics in the PPE Vending Machine GUI Package:

Node and Topic Chart

This chart provides a visual representation of how the various nodes communicate through topics which is helpful for understanding what this package is about.

Screenshots

Main Interface
Standard interface with PPE status indicators Dark theme with accessibility features
Safety Gate Override

Override Dialog

Enhanced override page with user authentication and reason tracking

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
Integrated User Help Guide

User Help Guide

Comprehensive user help guide with feature explanations

Author

  • Max Chen

About

This is a ROS2 Package developed for Capstone Team 54 - AI Computer Vision Personal Protective Equiptment Vending Machine

Resources

Stars

Watchers

Forks

Releases

No releases published

Contributors