In this paper, we study self-organized flocking in a swarm of mobile robots. We present Kobot, a mobile robot platform developed specifically for swarm robotic studies. We describe its infrared-based short range sensing system, capable of measuring the distance from obstacles and detecting kin robots, and a novel sensing system called the virtual heading system (VHS) which uses a digital compass and a wireless communication module for sensing the relative headings of neighboring robots. We propose a behavior based on heading alignment and proximal control that is capable of generating self-organized flocking in a swarm of Kobots. By self-organized flocking we mean that a swarm of mobile robots, initially connected via proximal sensing, is able to wander in an environment by moving as a coherent group in open space and to avoid obstacles as if it were a "super-organism". We propose a number of metrics to evaluate the quality of flocking. We use a default set of behavioral para...