/KheperaIV-SLAM

This repository contains some code I wrote to implement BreezySLAM on the KheperaIV robots in ARGoS.

Primary LanguageC++MIT LicenseMIT

KheperaIV-SLAM

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! )

Initial Configurations

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 )

Tidbits on BreezySLAM

BreezySLAM can create a map in 3 ways.

  1. Only using Odometry
  2. Only with a particle filter
  3. With Odometry and particle filter

Through trail and error I found that creating a map only with Odometry is the best.

Instructions

  1. Install ARGoS through source
  2. Install BreezySLAM (for C++)
  3. Create an ARGoS workspace
  4. Clone this repo into your argos_ws and build the repo.
  5. 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.
  6. To select the robot, hold SHIFT and left click on it.
  7. Move the Khepera with i,j,k,l --> i - Move forward && j - Rotate left && l - Rotate right && k - rotate in place ( Anticlockwise )
  8. The odometry and LIDAR will be collected in slamData.dat.
  9. Copy slamData.dat to the BreezySLAM/examples and run "$ ./log2pgm slamData.dat 1" for the best map ( Usage : ./log2pgm <use_odometry> <random_seed> )
  10. A map ( slamData.pgm ) will be created in the examples folder.