There are two sensors that come to mind to easily control the position of a robot: Encoders and Ultrasonic sensors.
Encoders typically attach to the gearboxes or wheels and measure shaft rotation. You can use them to measure the distance your robot travels as it moves forwards. More details can be found here:
http://wpilib.screenstepslive.com/s/...using-encoders
An ultrasonic sensor measures the distance from the sensor to a surface in front of it. You could use an ultrasonic sensor to measure your distance from the wall, although it would be susceptible to other objects (such as a goalie bot) sitting in between the sensor and the wall. Details can again be found in the docs:
http://wpilib.screenstepslive.com/s/...asonic-sensors
If you would like to see an example of how to use dead reckoning in autonomous, feel free to check out my team's code from last year (shameless self plug):
https://github.com/LuNaTeCs-316/SureShotSAM-Java. In particular,
this autonomous mode used dead reckoning for driving.