Some designers see Linux and robots as a good match
The teams that wrote their DARPA Grand Challenge software from scratch undertook quite a programming task on a short schedule.
Each vehicle was equipped with a computer to plot its course in real time using input not only from radar, stereo cameras and other sensors, but also from a Global Positioning System receiver and a CD-ROM map of the route.
Most vehicles also had to send signals to jury-rigged devices that controlled steering and braking, as well as to factor in their feedback.
'We had to get the current position of the vehicle into the computer somehow, and we had to determine where we wanted to go,' said David Caldwell, head programmer for the team that called itself the Golem Group. 'We had to have feedback on all the different parts of the controls like the steering, velocity and brakes.'
The Golem Group took only three months to make a used Ford F-150 pickup truck self-navigating, but it turned out to be a surprisingly strong contender. It traveled 5.2 miles over the course, outrun only by three better-funded competitors.
The Golem Group's scratch-written control software ran on an onboard Linux notebook computer, Caldwell said. Most of the code was in C, with some microcontroller interfaces in a fourth-generation language. The team also used publicly available imaging libraries from Intel Corp. to identify the input from the sensors. Caldwell called Linux the natural choice for the vehicle's operating system, because its freely available source code 'offers access to everything,' he said. 'If something was going wrong, we'd pop into the kernel and figure it out.'
Another advantage of Linux was its modular nature, which let the team strip out unneeded code.Others picked Linux
At least two other groups, teams CalTech and CajunBot, also used Linux to control their vehicles. The rest used real-time operating systems, Microsoft Windows or commercial inertial-navigation systems.
Despite the complexity of the task, the OS could be quite small. Warner Williams, who headed Team Phantasm, said the software for his modified all-terrain vehicle took up less than 1M.
The idea was to 'let the GPS fight with the radar for control of the vehicle,' he said.
Williams' team, however, forgot an important software lesson: Always make backups. The team had to forfeit after a faulty radar rendered their vehicle's computer inoperable, and the programmer had neglected to back up the code he wrote for the race.