Skip to content

omaria14/sim2localization

Repository files navigation

SIM2LOCALIZATION

Localization method of a mobile robot within prebuilt map. The prebuilt map could be in form of poses and corresponding target scans or a Mesh.

The methodology handles map changes and poor initial guesses, based on segmentation of both source and target scans (simulated target scans in case the map in form of Mesh), matching segments, and ICP refinement.

Demo

Methodology Main Steps:

  1. Generate simulated scans
    Assuming the map is in form of Mesh -> Create simulated scans as target scans to represent the map:

    • Using scan-based representations of the map makes it easier to segment it and match its segments with those of the source scan.
    • To increase the chance of segment matches, generate multiple simulated scans around the initial pose guess with random variations.
  2. Segment both scans
    Segment the source scan and each simulated target scan. Segments are utilized for the localization.

  3. Generate Sets of Matches

    • 1 source segment → 1 target segment is a set that yields to global transformation candidate.
    • 2 source segments → 2 target segments is the used definition for the set as it yields to a more accurate global transformation candidate, avoiding possible overfitting when using 1 segment.
    • Consider all possible permutations.
  4. Get candidates global transformations and Supporters

    • For each set of matches we estimate a global transformation from the set source and target segments and consider it as a global transformation candidate.
    • Apply the transformation, and get other segments that supports this transformation. (A source segment that goes to a target segment after applying a candidate global transformation is a supporter for this candidate global transformation)
  5. Calculate a Score for each global transformation candidate

    • Calculate a score for each global transformation candidate based on its supporters.
    • A supporter source and target segments has a similarity probability: extract features from the source and target segments and classify them to be similar or not using random forest classifier -> similarity probability.
    • The score of a global transformation candidate is the sum of similarity probabilities of supporting source and target pairs.
    • Select the global transformation with highest score among candidates and apply it-
  6. Refine with ICP
    Refine with ICP (using only the source segments that have a high probability of not being new or dynamic).


Build Instructions

Main Requirements:

  • ROS Noetic
  • Open3D

Suggested Steps:

1. Set up the Velodyne simulator (underlay workspace):

# Create and navigate to the Velodyne simulator workspace
mkdir -p ~/velodyne_sim_ws/src
cd ~/velodyne_sim_ws/src

# Clone the Velodyne simulator repository
git clone https://github.com/lmark1/velodyne_simulator

# Build the simulator
cd ~/velodyne_sim_ws
catkin_make

2. Set up the SIM2LOCALIZATION workspace:

# Create and navigate to the sim2localization workspace
mkdir -p ~/sim2localization_ws/src
cd ~/sim2localization_ws/src

# Clone this SIM2LOCALIZATION repository
git clone https://github.com/your_user/sim2localization

3. Source and build:

# Source Velodyne simulator workspace
source ~/velodyne_sim_ws/devel/setup.bash

# Build SIM2LOCALIZATION
cd ~/sim2localization_ws
catkin_make

Usage

roslaunch sim2localization sim.launch

rosrun sim2localization simulated_scans_handler.py 

rosrun sim2localization main.py

About

localization using segmentation, similarity match between segments and ICP.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published