2 Wheel robot attaining straight line motion

Oh, sorry
Basically my motive is to make the robot move in a straight line upto a particular distance.

Say i will command my robot to move 100cm forward. It should move in a straight line till 100cm and then stop.