Giter VIP home page Giter VIP logo

rgb-d-slam's Introduction

RGB-D-SLAM

My take on a SLAM, based on shape primitive recognition with a RGB-D camera. The system uses depth informations as a connected 2D graph to extract primitive shapes, and use them with 3D points and lines to estimate it's position in space. A map is created with those points, lines and primitive shapes.

The primitive detection is based on Fast Cylinder and Plane Extraction from Depth Cameras for Visua Odometry. See the Doxygen documentation on GitHub Pages.

For now, we are at the state of visual odometry with local mapping.

Process

feature detection & matching

The system starts by splitting the depth image as a 2D connected graph, and run a primitive analysis on it. This analysis extract local planar features, that are merged into bigger planes. Using an iterative RANSAC algorithm, those planar features are fitted to cylinders if possible, providing two kind of high level features. Those high level features are matched on one frame to another by comparing their normals and Inter-Over-Union score.

The system also extract points and lines, to improve reliability of pose extraction. The lines are extracted using LSD. The feature points are tracked by optical flow and matched by their BRIEF descriptors when needed, and every N frames to prevent optical flow drift.

local map

Every features are maintained in a local map, that keep tracks of the reliable local features. Those features parameters (positions, uncertainties, speed, ...) is updated if a map feature is matched, using an individual Kalman filter per feature (no bundle adjustment yet).

New features are maintained in a staged feature container, that behaves exactly like the local map, but as a lesser priority during the matching step.

pose optimization

The final pose for the frame is computed using the local map to detected feature matches. Outliers are filtered out using a simple RANSAC, and the final pose is computed using Levenberg Marquardt algorithm, with custom weighting functions.

The optimized pose is used to update the local map and motion model, in case the features are lost for a moment.

The complete systems runs in real time, between 30FPS and 60FPS for images of 640x480 pixels (depth and RGB images).

To be implemented soon

  • Advanced camera parameter model
  • Point descriptors based on custom neural network
  • Usage of keyframe to separate local maps
  • Loop closing based on multiscale neural network
  • Use a graph between keyframe to represent the trajectory, and close the loop easily (using bundle adjustment)
  • Create a new separate trajectory when loosing track of features, and merge it to the main trajectory when possible

packages

opencv
Eigen
g2o
pugixml

How to build Build

mkdir build && cd build
cmake ..
make

How to use

./slam_freiburg1 desk

Parameters

-h Display the help
-d displays the staged features (not yet in local map)
-f path to the file containing the data (depth, rgb, cam parameters)
-c use cylinder detection 
-j Drop j frames between slam process
-i index of starting frame (> 0)
-l compute line features
-s Save the trajectory in an output file

Check mem errors

valgrind --suppressions=/usr/share/opencv4/valgrind.supp --suppressions=/usr/share/opencv4/valgrind_3rdparty.supp ./slam_freiburg1 desk

References:

Primitive extraction

Pose Optimization

Visual odometry

SLAM

rgb-d-slam's People

Contributors

baptistehudyma avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.