Software:
Without software, Calculon would be like a brainless rabbit, unable to do much more than drive around randomly. Since brainless random rabbits aren't much use (to us I mean - wolves might find brainless rabbits tasty), Calculon needs software to fill in. The end result is we have a brainy robot rabbit that gathers information about the world, processes this data, and decides what to do. One day we hope the software on Calculon will advance to the level of a trained dog. In the mean time, we do the best we can. Just as a brain has specific areas to control different behaviors of the human body, Calculon has many software systems. Each system has an area of expertise, such as interfacing to sensors, building maps, planning where to go, or saying "STOP, WE ARE GOING TO HIT SOMETHING!"
To run the software, Calculon has a pretty hefty laptop (3.4 GHz P4 processor with 1 GB RAM) loaded with Windows XP. Much of Calculon's code will run on Linux with minor changes. All the software for Calculon is written in C or C++ for the fastest possible overall system (anybody who mentions the word "Java" will be taken outside and beaten up as thoroughly as possible - you have been warned).
So how much code does it take to make an autonomous robot? Obviously the number varies, but consider Calculon. Within a year, we had developed just over 100,000 lines of code for Calculon. Because we don't use commercial packages (or many packages in general) such as OpenCV or LabView that would automatically take care of robot vision or control, that number is probably on the high side. Of course, with such an large amount of code, it makes sense to break it down into multiple systems for each specific part of Calculon. Additionally, this means that commenting, following code standards, and documentation is extremely important for other people who want to use or understand our code.
Calculon has 5 major software components:
  1. The Server serves (pun intended) as the go-between for the vehicle hardware and the software. It handles anything related to driving. It also provides data such as GPS position, compass heading, wheel encoder data, and joystick information. Anybody can connect to it over TCP/IP and get this information or tell it to drive.
  2. Machine Vision grabs images from the camera and takes a look around to see what's out there and what it shouldn't run into. It tries to find obstacles such as orange construction cones, barricades, white 5 gallon buckets, and white painted lines on grass or concrete. All this data goes to the mapping system.
  3. The Mapping is responsible for combining all the information from the Machine Vision and SICK Laser sensors into a map. This combining allows Calculon to see it's surrounding environment with a quick glance.
  4. From the mapping information and the vehicle information, the Path Planning takes over and figures out what goal needs to be accomplished (go to that point, avoid that cone, stop, slow down, speed up, etc) and gives commands to the vehicle through the Server.
  5. The final and highest level software component of Calculon is the Client. Although it doesn't really do anything by itself, it is an umbrella for all the other modules. It gives a GUI interface to the different systems so a user of Calculon control settings such as max speed, what GPS points to go to, etc. The Client also controls the high level functions such as start competition, stop competition, and switch between competitions (Navigation or Autonomous). Finally, the Client shows the status of all the other software systems except for the Server. So camera input from the Machine Vision and Mapping and the output of the Path Planning are displayed to the user. This is very handy when Calculon runs into a cone (oh, the camera didn't see the cone) or when Calculon starts spinning in circles (oh, the path planning got messed up).




lincolnelectric.png, 6 kB

frog_legs.jpg, 36 kB