Hey everyone, I have some questions about parts selection for a robot I am building for a competition. The competition has a 2m2m square with a 44 grid inside of it. The start point must be on the edge of the square, at intervals of 25cm per side, meaning there are 16 start points along the perimeter of the square. The end point is in the center of one of the squares on the 44 grid. The midpoint of the front of your robot must be as close to the end point as possible, and there will be a time between 50-70 seconds set by the competition supervisor which the competitors must get as close to as possible by the end of their run. 2-3 of the boxes in the 44 grid will be "gate zones", which will award a point bonus for passing through. You must always have the front of the robot pass through the gate zone when entering. 4-6 of the edges of the boxes in the 44 grid will be obstacles, which give a penalty for collision. The robot must be powered by 6 non-lithium AA or AAA batteries, and fit within a 3030cm area. It must perform all actions without outside input once it is in motion. You are allowed to program the robot for 10 minutes once you see the track. You get multiple runs, and your competition block ends once you have completed either 2 successful runs or 3 failed ones, and the best run is taken. The robot is not allowed to stop moving for more than 3 seconds.
TL;DR need to figure out good way to correct yaw and measure distance of a robot.
So far, I have a robot using 2 wheel differential drive controlled by an 2 low-quality dc motors, an l298 bridge and an arduino mega 2560, along with a free-moving ball caster for support. The robot uses an ultrasonic sensor to trigger it with motion, and delays the action by a few seconds to allow the user to move the object out of the way. I am trying to figure out how to make the turning and straight line driving of the robot more precise, and as of now the only ideas I have are to get higher quality motors with encoders like these: Micro DC Geared motor w/Encoder- 6V 155RPM 100:1 - DFRobot, or to get a magnetometer and measure the absolute yaw of the robot. The problem is, that I may not always be able to easily calibrate the robot at the competition site, and seeing as I will be traveling all around the country for this competition, the magnetometer readings aren't going to always be completely precise, even with calibration. So now it feels like I'm at a wall, because I don't know anybody with extensive arduino knowledge, and I need to figure this out within a month or two, but have no idea where to go when it comes to the parts selection or what is or isn't the best option. I also have a limited budget as of now, so I can't overspend to try a ton of different things. I am willing to try a few different things, but it feels as if I am overwhelmed with all of the technical challenges and possible problems with almost every solution I have come up with. If anybody has any recommendations for my problem or is willing to message extensively about the project to help me figure out where I'm going, I would be much appreciative. Sorry for long post.