frc1418 / 2018-robot

:robot: Code for our 2018 competition robot, Panthera.
MIT License
3 stars 2 forks source link

2018 Robot Code

Robot Code | Dashboard | Vision

Build Status

Code for Team 1418's 2018 competition robot, Panthera.

Robot code features

Lessons Learned

We had fun with this year's robot and in our competitions using it. Each and every member of our team grew in their skillset and life experience during our 2018 season, and we performed well in competition. However, to quote pragmatist and American educational philosopher John Dewey:

Failure is instructive. The person who really thinks learns quite as much from his failures as from his successes.

In accordance with this precept, here are several mistakes we made this year, which we will work to next year not make again.

Here's to an even better 2019.

Deploying onto the robot

Before deploying, you must install robotpy on your robot.

You may then deploy code at any time:

python3 robot.py deploy

During development of this year's robot code, we created a Bash script deploy.sh to automate some tasks related to code deploy. The script's featureset swelled significantly, and we elected to spin the tool off into a season-independent command line tool. You can find that tool, dep, here. We recommend that you make use of it to simplify your deploy process and remove pesky steps like manually changing your WiFi network.

Testing/Simulation

You may run the pyfrc simulator to test this code thus:

python3 robot.py sim

Controls

We use three total joysticks to control the robot:

Setting up git hooks:

git hooks change the process of committing by adding processes before or after the process of committing. After cloning, you should run

./setup.sh

This will set up hooks to run tests before committing to help avoid easy-to-fix errors in the code.

File Structure

robot/
    The robot code lives here.
    automations/
        Automatic scripts for performing common functions.
    autonomous/
        Autonomous modes.
    common/
        New robotpy components.
    components/
        Abstractions for major robot systems.
    controllers/
        Software implementations not corresponding to physical robot components.
tests/
    py.test-based unit tests that test the code and can be run via pyfrc.

Authors

Special thanks goes to Tim Winters, former 1418 Programming Captain, who tirelessly worked as a mentor to help us reach new heights with this year's robot code.

Licensing

In-season, use of this software is restricted by the FRC rules. After the season ends, the MIT License applies instead.