This repository was created as part of the VEX VRC Change Up Competition for the 2020-2021 competition season, using PROS V5 as our coding platform. Mainly, the programming aspect of the competition consists of coding:
- driver control (including macros for driving); and
- a reliable drive pathway for the autonomous sequence and programming skills.
The purpose of this project is to achieve the above criteria for the code successfully, which means to ensure reliability, simplicity and ensure that everything works well during the competition. This is the code that will be used by team 2381C for the competition season.
This repository belongs to team 2381C from Colonel By Secondary School (Ottawa, Canada). If you have any questions or concerns regarding 2381C, please feel free to contact our team captain, Allen Tao, at [email protected]. For information regarding the codebase itself, reach out to our lead developer, Ayan Hafeez at [email protected]
Team 2381C is a small team from Colonel By Secondary School, in Ottawa, Ontario. To learn more about us, you can contact our team captain [email protected] or go through these links that you may find useful:
- https://2381.ca/ (organization website)
- https://vexdb.io/teams/view/2381C (our VEX DB profile)
- https://www.robotevents.com/teams/VRC/2381C (our RobotEvents profile)
- https://www.youtube.com/channel/UCHB6SeUT8tRKPbdgq9At18w (our YouTube channel)
All the mathematics behind our custom motion algorithm state function, as well as odometry, is documented in extensive detail in our paper, located in the documentation folder, docs
.
Our main goal with programming this year was to implement robot position tracking to ameliorate our performance in the autonomous and programming skills periods. We’d like to thank team 5225A for open-sourcing their odometry code from In The Zone, which was tremendously helpful for the creation of this codebase. Here’s a 115 points programming skills run we were able to achieve with odometry (Note: we have been improving our programming skills since then, and in our submission videos it is a 120 points run):
Our odometry loop relies on the modelling of robot motion as 2 distinct arcs, and mapping motions through vector motion on a 2d coordinate plane. For more insight into the function, please check the posTracking.cpp file in our /src
folder.
Our autonomous routines rely on a combination of odometry and motion profiling, the latter of which is reliant on PID (Proportional Integral Derivative) loops to control our regular/strafe motion.
The top level repository structure is as follows:
.
├── docs # Documentation files
├── firmware # Generated by PROS V5
├── include # Combination of custom and generated headers
├── src # Source files
├── .gitattributes
├── .gitignore
├── Makefile
├── README.md # (you're here)
├── common.mk
└── project.pros
Source code files we have added ourselves to this projected are distributed among the /include
and /src
folders. Our documentation is contained within the /docs
folder. The remaining files and folders are generated entirely by the PROS software. The directory structure for this repository is as follows:
.
├── ...
├── include
│ ├── ...
│ ├── api.h # PROS API generated file
│ ├── globals.hpp # Global variables
│ ├── main.h # PROS generated file
│ └── pid.hpp # PID class header
└── ...
.
├── ...
├── src
│ ├── autonomous.cpp # Macros, movement functions, autonomous path and *programming skills*
│ ├── global.cpp # Definition of global variables
│ ├── opcontrol.cpp # Driver control
│ ├── pid.cpp # Definition of the PID class
│ └── posTracking.cpp # Odometry
└── ...
We are not accepting any community contributions. If you run through our code and see there are things we can improve, feel free to contact us or to open an issue. For new 2381C members, or for reference, here’s a link to the contribution guide: docs/CONTRIBUTING.md
.