RoboRacing is a project mainly written in Java, it's free.
Basic outline for RoboRacing code with theNelson motor shield
basic code outline for xcj robo racing based on theNelson H-Bridge shield