Coder Social home page Coder Social logo

shepherd's Introduction

Shepherd

Shepherd is the team that is in charge of field control. Shepherd brings together all the data on the game field into one centralized location, where it keeps track of score, processes game-specific actions, keeps track of time, and informs the scoreboard.

Architecture

Shepherd is essentially a Flask web app that communicates with:

  • Arduino devices on the field over USB serial.
  • Each robot's Runtime instance using MessagePack remote procedure calls over TCP.
  • Each driver station's Dawn instance.
  • Each scoreboard client, which is rendered with jQuery. Typically, there is a scoreboard on each side of the field, a projection for spectators, and a fourth for the field control staff.
  • Each perk selection tablet (specific to Sugar Blast).

Installing dependencies

Python dependencies

Run the following

pip install -r requirements.txt

LCM

Linux

Run the installlcm script

./installlcm

Mac

  1. Set the Java Version to 8
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
  1. Run the installlcm script
./installlcm

Running Shepherd

Instructions for 2018-2019, aka Sugar Blast:

This year, we ran Shepherd on Ajax, one of the computers owned by PiE. In order to make it easier to run Shepherd on various machines, we added needed dependencies to a Pipfile. This allows you to work in a virtual environment with all necessary dependencies (except for LCM, which must be installed beforehand) by issuing the following commands in PieCentral/shepherd:

pipenv install
pipenv shell

Next, open a terminal pane for each of the below (using tmux) and run the following commands in PieCentral/shepherd directory.

1:

export FLASK_APP=server.py
flask run

2:

export FLASK_APP=scoreboard_server.py
flask run

3:

export FLASK_APP=dawn_server.py
flask run

4:

python3 Shepherd.py

5:

python3 Sensors.py

6:

export FLASK_APP=perks_server.py
flask run

shepherd's People

Contributors

awli avatar kevinmasd avatar matthew-zhao avatar brandonxxlee avatar akumaraguru avatar karthik-shanmugam avatar yizow avatar kevinji avatar nikitakit avatar bodiddles avatar jonathan-j-lee avatar jhgzhou avatar zentner-kyle avatar baby-bell avatar lizatre avatar arjunsridhar1 avatar dhutchings avatar tingtingchiang avatar dependabot[bot] avatar akshitdewan avatar fostertim avatar danellenachum avatar yidingjiang avatar onibrow avatar arjunmehta94 avatar dhe95 avatar firedog5 avatar jerryycheng avatar rohityelamanchili avatar cduck avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.