##Phero - pheromone simulator of the CosΦ system
###What is Phero ?
Phero is a pheromone simulator and visualizer of the CosΦ system. Together with SwarmCon, Phero constitute the CosΦ artificial pheromone system that is reliable, accurate and uses off-the-shelf components only: an LCD screen and a low-cost USB camera. The Phero system uses a horizontally-positioned LCD displays the spatial distribution of the pheromones, which are sensed by the robots that move on the screen. The pheromones are released according to the robots' positions provided by the SwarmCon system, which uses an overhead camera and circular markers placed on the robots. In contrast to other systems, CosΦ/Phero can simulate several pheromones while precisely controlling their evaporation, diffusion and release rate. The pheromone system is described in a short, late-breaking paper [1] and a full research paper [2].
###Setting it up
- Install and setup the SwarmCon localization system if you did not do so already.
- Download the software from GitHub and go to the Pheromone/src directory.
- Setup your arena: place the robots on a horizontal LCD and fix your camera above it. Make sure that the camera is above the LCD's centre facing straight down. Make sure that it can see the entire LCD area and that the camera is oriented in the same way as the monitor. The set-up should look like on the picture below.
- Open the main/phero.cpp and adjust the system parameters so these conform with your setup - i.e. with your LCD screen dimensions, camera height above the screen, robot dimensions, dual-monitor setup etc.
- After updating the parameters, you can compile the software - just by typing make.
###Running it
- First, run the SwarmCon localization system (e.g. ../../Localization/bin/swarmcon /dev/video0 1. You should see a window displaying the camera view - the entire LCD screen should be visible.
- Then, run the Pheromone simulator itself: ../bin/phero E N, where E is the half-life of the first pheromone (in seconds) and N is the number of robots on the field.
- If you run in dual-monitor mode, the pheromones will appear in a borderless window. You can move this window to the horizontal LCD monitor using ALT+mouse drag. If you run a single-monitor setup, the pheromones will appear in fullscreen.
- At first, the pheromone system will display four patterns at the corners of the screen and request calibration of the SwarmCon system. At this point, you should place your robots on the screen so that the SwarmCon can detect all the robots and calibration patterns.
- Once detected, the system performs calibration and blue circles should appear aroung the individual robots. If these are slightly misaligned, you can press C to re-calibrate again. If the circles are terribly misaligned, then your camera might be oriented opposite to the screen orientation - you can correct it by turning the camera (or the screen) by 180 degrees.
- Pressing SPACE start the pheromone simulation - as the robot with ID 0 moves, a pheromone track appears behind it.
- Recalculation of the pheromones is computationally heavy. On slower machines, there can be a significant lag between the robot position and the displayed pheromone. This can be solved simply by reducing image dimensions / screen resolution in phero.cpp.
###Some additional remarks
- At this point, you can start experimenting with the system by changing evaporation rates, adding diffusion etc.
- We have tried to comment the code so an experienced programmer should be able to alter the system accordingly. However, if you have any questions regarding the code, feel free to contact Tom Krajnik or Farshad
- If you use this system for your research, please don't forget to cite the two papers, that describe the components of this system.
- Have fun!
###References
- F. Arvin, T. Krajník, A. E. Turgut, and S. Yue: COSΦ: Artificial Pheromone System for Robotic Swarms Research.In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2015 [bibtex].
- T. Krajník, F. Arvin, A. E. Turgut, S. Yue, and T. Duckett: COSΦ: Vision-based Artificial Pheromone System for Robotic Swarms. In: International Conference on Robotics and Automation. Late breaking poster session. 2015 [bibtex].