Skip to content

Implementation of neurobiological SLAM for self-driving car

License

Notifications You must be signed in to change notification settings

ibvandersluis/bioslam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BioSLAM

This repository is one of two parts of my dissertation for my master's at Oxford Brookes University. See also my repository for making FastSLAM, the other part of my dissertation.

Description

This is an implementation of biologically-inspired simultaneous localisation and mapping (SLAM) for a self-driving car.

BioSLAM works through the use of a Kohonen network, a type of neural network used for unsupervised competitive learning that results in a self-organising map (SOM). As a winner-take-all network, only one node (called the best matching unit, or BMU) in the output layer wins at each timestep. The BMU has its weights adjusted the most, and the 'neighbourhood' of nearby nodes have weights adjusted proportionate to their distance from the BMU, where nearby nodes are adjusted considerably and far off nodes are adjusted just barely or not at all.

The design for this implementation was mostly inspired by these sources:

Requirements

  • Assumes an existing ROS 2 installation (Dashing or newer). If you are using a distro other than Dashing, replace 'dashing' in the following terminal commands with your distro name.
  • This package also uses the following Python3 libraries:
    • NumPy
    • Matplotlib

Installation

  1. Open a terminal and source your ROS installation
source /opt/ros/dashing/setup.bash
  1. Create a new directory for your ROS 2 workspace (if you won't be using an existing one). For instance, if you named your workspace ws and placed it in your home directory:
mkdir -p ~/ws/src
  1. Clone this repository into the src directory of your ROS 2 workspace
cd ~/ws/src
git clone https://github.com/ibvandersluis/bioslam.git
  1. Also clone dependent packages
git clone https://gitlab.com/obr-a/integration/ads_dv_msgs.git
git clone https://gitlab.com/obr-a/integration/obr_msgs.git
git clone https://gitlab.com/obr-a/integration/helpers.git
  1. Resolve package dependencies
cd ~/ws
rosdep install -i --from-path src --rosdistro dashing -y
  1. Build (this will take a couple minutes when building packages for the first time)
colcon build --symlink-install

Usage

After you have run colcon build:

  1. By default, this code will plot results but will not output any debugging files. To change this, go to bioslam/bioslam/main.py and set the global variable DEBUGGING to True. Running FastSLAM will then cause the code to make a folder bioslam_debug in the working directory and populate it with debug files. Similarly, plotting can be turned off by setting PLOTTING to False, which will considerably increase the speed of the code.

  2. Open 2 new tabs in your terminal and source the workspace in each

cd ~/ws
. install/setup.bash
  1. In one of the new tabs play the rosbag. Some rosbags are included in the fastslam/bags directory
ros2 bag play <path_to_rosbag>
  1. In the other new tab run the FastSLAM node
ros2 run bioslam main

About

Implementation of neurobiological SLAM for self-driving car

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages