Skip to content

HackYourCareer/SmartKickers

Repository files navigation

SmartKickers

Overview

SmartKickers is a project to make your kickers more immersive. It uses Ximea camera to track the ball.

The following repository contains:

  • Golang server for processing the data
  • React client to display game information

Table of contents

Features

  • Keeping track of the score
  • Manually adjusting the score

Prerequisites

Get the following:

  1. Git

  2. Python in version 3.10.5 or higher

  3. Node.js in version 16.16.0 or higher

  4. Access to SmartKickersAI

    NOTE: To get access to the SmartKickersAI repository, contact Team Beavers.

  5. Ximea camera drivers

  6. Docker daemon for example Docker Desktop:

  7. NumPy

    TIP: If you're a macOS user, you can also use brew to install NumPy:

brew install numpy
  1. OpenCV-Python

  2. Imutils

TIP: If you're a macOS user, you can run the requirementsCheck.sh script to check for any missing dependencies. Note that the script looks for OpenCV, NumPy, Imutils, and the Ximea driver only after you have successfully installed Python! If you don't have Python, it doesn't print missing Python-dependent packages except Python itself.

sudo ./requirementsCheck.sh

Installation

  1. Create a new directory and navigate to it in a terminal.

    mkdir smartkickers
    cd smartkickers
  2. Clone the repository.

    git clone https://github.com/HackYourCareer/SmartKickersAI.git
  3. Pull the frontend image from GCR.

    docker pull ghcr.io/hackyourcareer/smartkickers-frontend:latest
  4. Pull the backend image from GCR.

    docker pull ghcr.io/hackyourcareer/smartkickers-backend:latest

Launching

NOTE: The configuration files for the camera view are provided by the developers in the SmartKickersAI repository.

Launching the server and web application

Run the pulled containers to launch the server and web application.

  1. In a terminal run:

    docker run -p 3000:3000 ghcr.io/hackyourcareer/smartkickers-backend:latest
  2. Open a new terminal and run:

    docker run -p 3007:80 ghcr.io/hackyourcareer/smartkickers-frontend:latest

Launching the ball-tracking software

  1. Plug in the camera to the computer.

  2. To launch the application, navigate to the SmartKickersAI repo and double click the start file.

    On successful connection to the Go server, you see the following output:

     {
       url: 'ws://127.0.0.1:3000',
       wsurl: 'ws://127.0.0.1:3000/shot',
       dispatcherlURL: 'ws://127.0.0.1:3000',
       cfURL: 'ws://127.0.0.1:3000/cf',
       tableID: '10',
       token: 'c3d8c29ec43b9eadb8bc80ad1458ab8',
       messageTypes: {
           BallPosition: '615eec77d6be09356891',
           Shot: '2ca34aee4bb3dec060b1',
           BestShotGuid: 'c01b38461a678f3eefa5'
       }
    }
    init
    conn!
    { type: 'utf8', utf8Data: '{"start":"10"}' }
    { start: '10' }
    game id
    10
    connected to IoT Services via wss
  3. In your Internet browser, go to localhost:3007 to open the React application.

You can now play the Smart Kickers game. Enjoy!

React application

Contact Information

Team Beavers members: