Do what Pommie suggests. What you can read about PID, I should add, can be "too much information," if you know what I mean. By the time you have this all figured out, you'll be amazed at how simple it all seems then. You might try developing a flow chart to help you organize your thoughts about what your robot will be doing at any given time, and how it will correct for error.
In your last post, you've neglected a detail that I no doubt expect is still important to you. If, for instance, your robot is remote controlled, you'll want to make sure that your control takes into account not just the immediate status of the robot and the necessary compensation for error, but also how to factor whatever the person remotely controlling the robot is trying to effect as the desirable action e.g. the robot is rolled along a path and hits an object, and it starts to fall so it begins to compensate, and at the same time the user sends a message directing the robot in another direction. What should happen?
By the way, the optical sensor robot seems to be using one of the Sharp IR sensors. You should know that these sensors only read at about 20Hz. Also, their output is non-linear, which could complicate things when calculating around the axis of the robot. And you'd need two optical sensors to do the job of one gyro sensor if you wanted your robot to balance on either set of wheels as in the video you've posted. Given the marginally greater expense but much greater precision and ease of use of the gyro sensor, I highly recommend you take that path instead. The Sharp sensors are great for what they are, but the gyro sensors are specifically designed for this type of purpose, albeit balancing R/C helicopters.