Cube can now detect orientation.

Includes stub code for planning motion.