When the period begins, the robot will move forward until it senses a stone, using the softwares Vuforia and TensorFlow Lite, after it senses the stone, the chassis stops. Then the chassis will strafe right among the stones until it senses a skystone, using the softwares mentioned earlier, and the chassis will stop. Once the chassis stops, it’ll then crash into the blocks and start the intake so that the stone will become more perpendicular to the chassis, allowing the stone to enter our robot. Then the robot will move backwards and turn 90 degrees so that the robot is facing the timer. Then the robot will move forward until it senses the navigation target at a specific value, stopping the chassis. Then the robot will turn another 90 degrees so that the servos are facing the platform. The robot will then move backwards towards the platform and will only stop once the touch sensor activates. Then the robot will activate its servos so that it turns 90 degrees and grasps the platform. Then the chassis will move back and turn 90 degrees once more so that the platform will be fully in the building site. Then the robot initializes its servos, letting go of the platform. Finally, the robot moves backward until it senses the colored line, bringing the chassis to a stop, parking the robot and ending the Autonomous period.
This code is used during TeleOp, we have two controllers one of which controls the linear slides, the arm, and the intake while the other controls the basic movements of the robot such as moving forward, backwards, strafing left, and strafing right. This control also has the platform servos programmed to it. We also have the ability of picking up the block and dropping it mapped to control elements.
This code shows how the team learned how to use the Gyro Sensor and an example of how the correction code works. A major obstacle that the team faced was that their robot tended to drift because one of the wheels stopped later than others. The robot commences to turn 90 degrees. The gyro sensor must be calibrated before the robot runs. Then the angle is reset. The robot moves forward a little and then the imu finds the angle it needs to correct in order for the chassis to move straight ahead without drifting. The correction is either subtracted or added to the power given to the wheels. The team uses the gyroscope correction code in their Autonomous code and TeleOp code in order to ensure that the robot moves forward and doesn’t drift off course.
The team is using Vuforia and Tensorflow lite to recognize the skystone during the autonomous period. In autonomous mode, the team can detect and distinguish between a stone and the SkyStone. They are also able to measure the distance to the SkyStone from the Chassis before deploying the intake.