Coder Social home page Coder Social logo

stereo_slam's Introduction

Stereo SLAM

stereo_slam is a ROS node to execute Simultaneous Localization And Mapping (SLAM) using only one stereo camera. The algorithm was designed and tested for underwater robotics. This node is based on the G2O library for graph optimization and uses the power of libhaloc to find loop closures between graph nodes. The workflow of the stereo_slam node is as follows:

alt tag

You can see it in action here:

Alt text for your video

More videos... Stereo SLAM and 3D reconstruction and Stereo SLAM at UIB outdoor pond

Installation (Ubuntu + ROS Indigo)

  1. Install the dependencies
sudo apt-get install ros-<your ros distro>-libg2o

Install libhaloc as specified here: libhaloc.

You also need to setup a stereo visual odometer (e.g. viso2 or fovis).

  1. Download the code, save it to your ROS workspace enviroment and compile.
roscd
git clone https://github.com/srv/stereo_slam.git
cd stereo_slam
rosmake

Parameters

Most important

  • odom_topic - Visual odometry topic (type nav_msgs::Odometry).
  • left_topic - Left image camera topic (type sensor_msgs::Image).
  • right_topic - Right image camera topic (type sensor_msgs::Image).
  • left_info_topic - Left info camera topic (type sensor_msgs::CameraInfo).
  • right_info_topic - Right info camera topic (type sensor_msgs::CameraInfo).
  • min_displacement - Min displacement between graph vertices (in meters).
  • min_matches - Minimun number of descriptor matches to consider a matching as possible loop closure. If you don't have loop closings, try to decrease this parameter (minimum value = 8).
  • min_inliers - Minimum number of inliers between loop closing candidates. If you don't have loop closings, try to decrease this parameter (minimum value = 7).

Other parameters (do not touch by default)

G2O Library

  • g2o_algorithm - Set to 0 for LinearSlam Solver with gauss-newton. Set to 1 for LinearSlam Solver with Levenberg (Default 1).
  • g2o_opt_max_iter - Maximum number of g2o alogirthm iterations (typically between 10-50)

Graph

  • min_neighbor - Minimum number of neighbors to considerate for loop closing.

Stereo vision

  • desc_type - Can be SIFT or SURF (SIFT by default).
  • desc_thresh - Descriptor threshold (for SIFT typically between 0.8-0.9).

Topics

  • pose_frame_id - Frame name where pose will be published.
  • pose_child_frame_id - Child frame name of the pose.

Run the node

You can run the node using the launch file located at launch/demo.launch:

roslaunch stereo_slam demo.launch

Online graph viewer

The node provides a python script to visualize the results of the stereo_slam during the execution: scripts/graph_viewer.py:

usage: 	graph_viewer.py [-h]
	ground_truth_file visual_odometry_file
	graph_vertices_file graph_edges_file

The odometry file can be recorded directly from ros using:

rostopic echo -p /your_odometry_topic/odometry > odometry.txt

The ground truth file must have the same format than the odometry.

Post processing

The node provides a python script to evaluate the results of the stereo_slam once the execution finishes: scripts/slam_evaluation.py:

usage: slam_evaluation.py [-h]
	ground_truth_file visual_odometry_file
	graph_vertices_file graph_edges_file

This script perform a set of operations in order to evaluate the performance of the stereo_slam algorithm:

  1. Align all the curves (ground truth, visual_odometry and graph vertices) to the same origin.

  2. Compute the average translation error.

  3. Plot the error vs trajectory distance.

stereo_slam's People

Watchers

 avatar  avatar

Forkers

qxqxzzz

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.