I am the lead programmer for my First Tech Challenge team. Our robot picksup balls and launches them at a goal. This devlog runs up until our first qualifier (I forgot to post devlogs before this, so this is insanely large, but there are VERY frequent commits in the repository + I plan to post devlogs more frequently after this, woopsy, and I needed to start somewhere so that future devlogs aren’t so egregiously large).
this devlog is accurate up to the code in the branch freeze/qual1 on https://github.com/Nobles-Robotics/20748-Decode/tree/freeze/qual1
What I worked on:
Drive (4 motors + mecanum wheels, which basically is a form of movement that allows turning while moving; however, this makes the code a little more complex)
- A heading lock to always face one corner of the field (based on encoder data supplied by odometry wheels + onboard calculations (inverse tangent of x and y to determine angle))
- Autonomous control using an external library
Intake (Motor + spinning wheels to pick up balls)
- basically 3 states -> either the motor is spinning forward, stopped, or backward
Storage (Motor + space to store 3 balls)
- 2 commands (run to intake + run to intake, using data from the motor encoder to properly calculate turns of 120 degrees (empirically measured as ~186.66 ticks per 120 degrees))
- Challenge: the motor encoder isn’t very accurate and after a lot of thinking one way to run this was to run to intake positions clockwise, and outtake positions counterclockwise, that way the error atleast doesn’t accumulate and atleast stays constant throughout the course of a match (the intake and outtake are on opposite sides of the robot ie. offset by 180 degrees so some basic math is sufficient to determine the ticks to next position)
Outtake (Motor + flywheel)
- 2 commands (spin up to 2100 ticks/s using a PIDF controller (Proportional Integral Derivative Feedforward and run down to let the flywheel, well, run down and stop)