Lab Report: Swarm Behavior

Plan

Project Description

After discussion, we decided to implement a intelligent clustering behavior among robots. The swarm will calculate the shortest distance among the distances between each two robots. Then the two which the shortest distance will gather together first and become a group to act as a single robot. This process will repeat until all the robots are clustered.

Equipment and sources

Hardware:

Microbit x 5
Robotbit set x 4 (optional)
HD 920c Logitech camera
Aruco markers

Software:

Aruco marker detection software
Serial communication module between laptop and microbit
Microbit wireless communication module
Locomotion module

Modelling

We decided to use a camera on the celling. It will take dynamically measuring the special identification cards stuck on each robot’s back, which, after computation, can show the robots’ coordinates as well as the angle their heads point.[1]

Then the instruction is send to one of the robot in the two [2]. It will first turn until the head faces the other robot; then it will move forward until it is in a certain range with the other one [3]. The two then form a group to repeat the process.

1. The codes and hardware for image recognition part is already provided. The Aruco marker is a asymmetric square picture made up of small black and white squares. Each Aruco marker is unique. The camera set a 0 coordinate and use pattern match AI to get the location of each marker. The asymmetry enables the algorithm to analyze the angle.

2. We programmed a microbit and connect it to a laptop. It will receive the serial message send from laptop command line and repost it via wireless UDP communication to the target microbit.

3. After receiving instructions, the robot will act as coded. at the same time, the camera keeps observing and updating the information. So the robot will change its behavior when necessary.

Code

Published on GitHub:
https://github.com/krawc/arUco
https://github.com/todocono/arUco
https://github.com/todocono/birs2019s

Reflection

The swarm behavior is more difficult then it seems to be. And we learned a lot. As the robot cannot really self organize and handle different exceptions as real humans do. We have to consider and program every detailed case. For example, the first time when two robot gather, they faces different directions, so they cannot move together to find the third robot. It reminds me of the swarm intelligence paper read in class. In the paper, the math formulas didn’t directly describe motions and behaviors; but they set a structure of goals, errors, states, changes etc. which is more fundamental then behavior. I think it is where our improvement and research should focus on if we want to further implement swarm behavior.

Leave a Reply