This paper studies self-organized flocking in a swarm of mobile robots. We present Kobot, a mobile robot platform developed specifically for swarm robotic studies, briefly describing its sensing and communication abilities. In particular, we describe a scalable method that allows the robots to sense the orientations of their neighbors using a digital compass and wireless communication. Then we propose a behavior for a swarm of robots that creates self-organized flocking by using heading alignment and proximal control. The flocking behavior is observed to operate in three phases: alignment, advance, and avoidance. We evaluate four variants of this behavior by setting its parameters to extreme values and analyze the performance of flocking using a number of metrics, such as order and entropy. Our results show that, the flocking behavior obtained under appropriate parameter values, is quite robust and generates successful selforganized flocking in constraint environments. Categories and ...