  This paper presents a novel approach that allows a swarm of heterogeneous
robots to produce simultaneously segregative and flocking behaviors using only
local sensing. These behaviors have been widely studied in swarm robotics and
their combination allows the execution of several complex tasks, ranging from
surveillance and reconnaissance, to search and rescue, to transport, and to
foraging. Although there are several works in the literature proposing
different strategies to achieve these behaviors, to the best of our knowledge,
this paper is the first to propose an algorithm that emerges simultaneously
behaviors and do not rely on global information or communication. Our approach
consists of modeling the swarm as a Gibbs Random Field (GRF) and using
appropriate potential functions to reach segregation, cohesion and consensus on
the velocity of the swarm. Simulations and proof-of-concept experiments using
real robots are presented to evaluate the performance of our methodology in
comparison to some of the state-of-the-art works that tackle segregative
behaviors.
