Help in keeping robot within the track!

Hi!

I need to keep my robot within a specific path with one side to be wall and on the other side is a divider solid line (much like a highway). It should not touch either of these and it also need to maintain speed, besides this there are bridges and under-passes with rotations.
now i need help regarding the:

  1. technique of sensing the rotations while not touching the side barriers …
  2. which type of motors should i use to keep in the speed with power …
    .
    .
    .
    => I will be obliged to know the solid and implementable way-out. Plzz do help!!!
  1. We sell distance sensors that would allow your robot to control its distance from the wall.

Optical distance sensors:
pololu.com/search/compare/79

Sonar range finders:
pololu.com/search/compare/78

Example project that uses Sharp distance sensors to follow a wall:
pololu.com/docs/0J26

  1. Without knowing how massive your robot is and how fast you want it to go, it’s hard to recommend a motor.

-David