Swarm Shape and Behavior Control
Overview
As a part of my interest in mobile robots, I took the opportunity to learn about swarm robotics. Many robots seen in industry are deployed in distributed systems to drive value in their space, and the lab exploration into these systems provides valuable experience.
In these labs, I was able to implement 3 unique algorithms based on the research papers describing them.
Each lab is simulated using differential drive robots that can move, broadcast information, and change color based on their given constraints for the experiment. These simulations are intended to model the real NU coachbots, so added complications like noise and robots “sticking” are added to more realistically simulate the behavior.
Hopcount Localization
The goal of this project is to create a representation of the Northwestern “N” using robots that may not know their ground truth position and may only localize based on their hopcount from two “seed” robots seen in blue and teal. The first image shows that based on the relative hopcounts the robots can correctly display even and odd hops from each seed robot using LED color.
Using this localization to create a coordinate system, the robots can decide whether to turn purple based on their placement in the coordinate system. As seen in the next pictures, this propogates as the robots correct their accuracy in the coordinate system. Eventually, the robots can make a shape resembling the “N” shown using only their generated coordinate system in spite of the simulated communication noise.
Brazil nut effect spatial sorting
The “Brazil Nut Effect” is a term stemming from scientists noticing that the larger nuts in Muesli cereal would migrate to the top of the box when shaken. This idea using either a vibration table (in the paper) or random motion (in this lab) can be adapted to swarm robotics allowing them to self-sort based on gradient for and relative “size.”
This project implements the algorithm described in the paper using the control points mentioned below. The sum of each vector allows the robots to eventually separate into groups of small (red), medium (green), and large (blue) radius robots. These trials were run with 1, 2, and 3 different sizes to ensure functionality of the algorithm.
Control
The motion of each robot is governed by the following three forces:
- Attraction towards the center of the arena, which emulates the effect of a gravitational pull.
- Random motion, which emulates the effect of vibration.
- Repulsion from nearby robots, which emulates the relative “size” of the robot based on collision radius.
The photos show the sorting with each of the 3 scenarios where the robots are sorted based on their size.
Reynolds flocking
Reynolds flocking is a model aimed at simulating how birds fly in cohesive flocks that can move as a collective unit. This same behavior is seen in schools of fish. This project implements the algorithm described in the paper on the simulated NU coachbots. Unlike the paper that used a large area with fixed wing aircraft, this experiment was run on diff-drive robots programmed to continuously move forward.
Control
Each robot is steered by changing their turn rate proportionally to the error between their current heading and their desired heading. The desired heading is given by the weighted sum of the following vectors:
- Migration: A vector pointing towards the center inversely proportional to their distance from it.
- Cohesion: A vector pulling them towards the center of mass of the robots they can hear.
- Separation: A repulsion vector from all robots within range to ensure they still move as individual robots and minimize collision.
- Alignment: A mean velocity vector of all robots within communication range to keep an even heading.
Source Code
Since this is a class project, the source code can not be provided for now.