- Optical Distance Sensor (ODS)
- Our Optical Distance Sensor is a critical component to all of our scoring. To be able to sense the white line, the sensor is at the bottom of our robot, pointed towards the ground. Our first instance of this technique the ODS to our advantage is our initial backup. When we line up at an angle, our play button will start driving until it senses the white line, which is possible by grabbing the raw white light from the it.
- Gyro Sensor
- When we initialize autonomous, our gyro sensor is set to calibrate. Until this is done, our telemetry displays a message saying autonomous is not ready to be ran. Once calibrated, we know we can now use the gyro readings accurately. We use the Integrated Z Value inside of the Gyro Sensor to see how far we've turned left or right. This method applies opposite powers to the motors, then uses a while() loop to check if the target heading we want to be facing is not yet approached. Once it is, the robot stops and executes the next task.
- Color Sensor
- The color sensor that we use is mounted on the same side of the robot as our beacon pusher. Once done aligning with the beacon, we use the color sensor to determine which color we’re currently looking at. If we determine we’re looking at the same color that our alliance is, we immediately strafe into our beacon button, which is made possible by our mecanum wheels and beacon pusher. If we see that our color is that of the opposite alliance, we back up the distance between the two buttons before we do our strafe.
proportional integral derivative (piD)
PID is the most important algorithm we use during our autonomous period. During any of our gyro turns, we can choose to use a PID control loop which will run our error and delta time through a PID controller. Once completed, this controller will give us an output power that is relative to how much of an error we have. The larger the error we have, the faster the motors move, but as we approach our target our power will start to decrease.
Driver controlled Enhancements
- Split controls across two gamepads
- Currently to enhance our drivers' control on the field, we have the controls split across two gamepads that thins and balances the responsibilities of them. The controls for the four wheels on the chassis of our robot belong on gamepad 1. To control the robot, the driver uses on joystick for all lateral movement. This means the robot can move forward, backwards, strafe left or right, or go diagonal, all based off the direction the right joystick is pushed. The left joystick of gamepad 1 is used for rotating the robot on the center axis. It accomplishes this by taking the amount the joystick is being pushed in either direction, and apply that power to one side of the motors, while also applying the opposite power to the motors on the other side. Gamepad 2 is used to control our pitching machine speed, switch directions on our conveyor, and toggle our pitching servo. In TeleOp, our main goal is to shoot at least five particles in the center vortex. To do this the gamepad 2 driver will first need to collect particles into our conveyor by using the left joystick.
- Pitching servo
- The pitching servo on our robot gets triggered by the right bumper. The limitations of our pitching machine mechanism only lets a ball get shot if two are on the conveyor belt. This is because of the conveyor not reaching the pitching machine. To fix this, we positioned a servo so we could bring up a single particle and shoot it. This gets triggered by the right bumper, it has the option to automatically go back down, if the driver requests.