Knowing where your robot is on the field at all times is important for an autonomous routine. The process of tracking position is known as localization. There are a few ways to handle localization.
Dead Reckoning: The simplest and least accurate. This is where a robot is told to move at a certain power for a certain amount of time. The problem with this is f the battery is low or the robot bumps into something, it will end up in the wrong spot.
Deterministic / Absolute Sensing: Using Distance Sensors, AI Vision Sensors, or
AprilTags to detect certain landmarks on the field (like a goal post or wall) to calculate position.
Odometry (
Odom): This is the use of motion sensors to continuously calculate how far and in what direction a robot has moved from its starting point.