This repository contains some code I wrote to implement BreezySLAM on the KheperaIV robots in ARGoS.(A multi-physics robot simulator)
This code allows you to simulate and manually control the KheperaIVs in ARGoS and generate LIDAR and Oodmetry readings as a .dat file. To get a map, you should call log2pgm ( In BreezySLAM ) along with the .dat file. ( This is currently an offline version of BreezySLAM, I will soon create a repo for the online version where the map is created in ARGoS itself! )
BreezySLAM is created for the Mines Rover developed by Paris Mines Tech. To adapt it for the Khepera, you need to change a few parameters in log2pgm.cpp. In class Rover, change wheelRadiusMillimeters to 21 mm and halfAxleLengthMillimeters to 52.7 mm ( From the KheperaIV manual )
BreezySLAM can create a map in 3 ways.
- Only using Odometry
- Only with a particle filter
- With Odometry and particle filter
Through trail and error I found that creating a map only with Odometry is the best.
- Install ARGoS through source
- Install BreezySLAM (for C++)
- Create an ARGoS workspace
- Clone this repo into your argos_ws and build the repo.
- Run the controller with "$ DRI_PRIME=1 argos3 -c experiments/offline_slam.argos" and the ARGoS simulator will start with a simulated KheperaIV in an arena.
- To select the robot, hold SHIFT and left click on it.
- Move the Khepera with i,j,k,l --> i - Move forward && j - Rotate left && l - Rotate right && k - rotate in place ( Anticlockwise )
- The odometry and LIDAR will be collected in slamData.dat.
- Copy slamData.dat to the BreezySLAM/examples and run "$ ./log2pgm slamData.dat 1" for the best map ( Usage : ./log2pgm <use_odometry> <random_seed> )
- A map ( slamData.pgm ) will be created in the examples folder.