Traveled distance measure

I need to measure the distance the robot has traveled or get the path the robot’s been traveling on this vex robot.

Is there a way to do so?

Thank you.

all you need is an optical shaft encoder ->which vex sells, then read the inventors guide, dont worry it’s easy