The main tasks required for completion in Performance Test 3 were to pick up the wrench and to deposit it in the garage. Points were awarded for touching the wrench, controlling the wrench, transporting the wrench to the upper level, and depositing the wrench in the garage. The bonus task was to touch any part of the fuel pump.
In this stage, much of the actual construction of the robot had been taken care of. A real mount for the Proteus was constructed out of a wood block so the Proteus would stay secure during each run, rather than affixing it with tape. Initially, the mount was just a block sitting on top of the motor wires coming up from the bottom of the chassis. To make this more organized, channels were cut into the bottom of the Proteus mount for the wires to run through. This allowed the Proteus mount to sit well on top of the chassis, and kept most of the robot’s wiring hidden. Once this was done, the block was affixed to the chassis with wood glue.
The Robot Position System (RPS) was activated for the first time during the testing for Performance Test 3. For the robot to correctly utilize this, a QR code needed to be mounted approximately 9 inches above the ground. For this, a mount was created out of a panel of scrap wood and thin dowel rods. This was affixed to the Proteus mount using wood glue. Then, the QR code for the robot was placed on a 3-inch square acrylic panel and taped to the top of the mount. The robot could then successfully utilize RPS by using the QR code to locate itself.
An arm for an electromagnet was also constructed for the robot. The initial arm was made of scrap wood, with the wiring hidden inside the hollow arm and running down to the Proteus. This was attached to the chassis with a Fitec servo motor to allow it to rotate up and down.
During testing, it was discovered that the initial design of the magnet arm was set around half an inch lower than the top of the wrench. Because of this, the arm could not line up the electromagnet flat on top of the wrench. This made picking up the wrench significantly more challenging, and extremely inconsistent. Thus, a new arm was designed. The new arm was made of thin wood chips and wood glue, but was made with the correct dimensions so that the magnet was flat with the top of the wrench. The electromagnet was then affixed to the arm with electrical tape. Initially, the arm was designed to use a transistor to turn the electromagnet on and off from its power source, a nine-volt battery. However, this was initially wired incorrectly, and the electromagnet would stay on all of the time, rather than switching on and off. This would heat the electromagnet and drain the batteries very quickly. By this time the issue was solved, the transistor idea was scrapped and the electromagnet was just kept on. It was decided that the robot would just scrape the wrench off into the garage, rather than deactivate the electromagnet.
The performance test was then run unofficially with RPS being used to rotate the robot and to check its coordinates. Initially, the coordinates used for the checks were just based on the starting position of the robot. However, this proved to be inaccurate. The robot needed to be very precise in order to successfully pick up the wrench. To fix this, a calibration function was written for the robot to be moved around the course, to store coordinates of various course elements before each run. This way, the RPS checks would check to a specific coordinate that is defined before each run, for additional precision. After this change, the RPS checks became much more accurate. However, they would occasionally still fail and the checks would create an infinite loop, never reaching the desired point. After adding print statements in multiple parts of the code, this was determined to be an issue with storing the coordinates. Sometimes, when the screen would be pressed to save the coordinates, the y coordinate would be saved as a dead store with a random value. A check was added in the code to then fix this.
As these checks became more and more precise, one of the remaining issues was getting up the ramp. Initially, the robot would move up the ramp until an RPS check verified that it was on the upper level. However, this would only work on and off. Eventually, this code was scrapped. A new function was put in to determine whether the robot cleared the ramp based on an accelerometer check. This would determine whether the robot was flat on the upper level or not based on whether or not the robot’s vertical acceleration was equal to gravity, 0.98, or less than that, and it worked successfully and quite consistently.
Official performance test runs were done between these checks and failed, for some of the reasons described above. However, the fourth official run ran completely successfully, including some of the available bonus points.