pioneers / shepherd

baa
Apache License 2.0
2 stars 2 forks source link
PiE Sheep

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.

Running Shepherd

Installing Shepherd

If you don't have Python and/or a terminal, you will need to install it. Refer to the instructions in https://inst.eecs.berkeley.edu/~cs61a/fa20/lab/lab00/#install-a-terminal for installing a terminal and Python.

Next, you will need to clone the repo. Make a folder named pie or something on your computer, then in that folder, run the following:

git clone https://github.com/pioneers/shepherd.git
cd shepherd

At this point, your terminal should be a folder named pie/shepherd (or similar). Now it is time to install dependencies. Run:

python3 -m pip install --upgrade -r requirements.txt

(or pip3 install --upgrade -r requirements.txt if that doesn't work). At this point you are ready to run Shepherd.

Quickstart

Open 3 separate terminal windows, and use cd to navigate them all to pie/shepherd/src.

If this is successful, you should be able to go to any of the urls listed in terminal 2's output, and see a webpage displayed. If so, congrats! You have successfully run Shepherd.

Running Sensors

For talking to sensors, we use an Arduino program and a python script based on termios. This will only work on Linux devices, so only continue if your computer runs Linux.

Game Instructions

To run a full game, you can install tmux, connect the Arduinos to your computer (after flashing), and then run the provided tmux script (in pie/shepherd):

./shepherd_tmux.sh

If you prefer, you can run the game manually instead. First, follow the quickstart instructions, then the sensors instructions.

Architecture

To read about Shepherd in detail, check out the onboarding readme. This is where you will find detailed information about what each component of Shepherd does.