• Stars
    star
    132
  • Rank 274,205 (Top 6 %)
  • Language
    C++
  • License
    Other
  • Created over 11 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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. It uses a keyframe to multi-keyframe loop closing mechanism, based on keypoint clustering, to improve the SLAM corrections on feature-poor environments.

You can see it in action here:

Stereo-SLAM video

Specially designed for underwater scenarios:

Video: ORB-SLAM vs Stereo SLAM (underwater)

More videos...

Video: Stereo SLAM and 3D reconstruction and Video: Stereo SLAM at UIB outdoor pond

Related paper

ICRA'16, nominated for the best student paper award

CITATION:

@INPROCEEDINGS{7487416,
  author={P. L. Negre and F. Bonin-Font and G. Oliver},
  booktitle={2016 IEEE International Conference on Robotics and Automation (ICRA)},
  title={Cluster-based loop closing detection for underwater slam in feature-poor regions},
  year={2016},
  pages={2589-2595},
  keywords={SLAM (robots);autonomous underwater vehicles;feature extraction;image matching;image registration;mobile robots;object detection;path planning;robot vision;AUV navigation;Balearic Islands;autonomous underwater vehicle;cluster-based loop closing detection;feature matching;feature-poor underwater environment;marine environments;sandbanks;seagrass;simultaneous localization and mapping;underwater SLAM;vision-based localization systems;visual features;visual information;visual keypoint clustering;visual registration;Cameras;Feature extraction;Image edge detection;Pipelines;Rocks;Simultaneous localization and mapping;Visualization},
  doi={10.1109/ICRA.2016.7487416},
  month={May}
}

Installation (Ubuntu + ROS Indigo)

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

sudo apt-get install libceres-dev

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

  • odom_topic - Visual odometry topic (type nav_msgs::Odometry).
  • camera_topic - The namespace of your stereo camera.

Other (hard-coded) parameters

  • include/constants.h - Contains the set of node parameters. Default parameters should work.

Run the node

You can run the node using the following launch file (please, for a better performance scale your images if more than 960px width).

<launch>
  <arg name="camera" default="/stereo"/>

  <!-- Run the stereo image proc -->
  <node ns="$(arg camera)" pkg="stereo_image_proc" type="stereo_image_proc" name="stereo_image_proc" />

  <node pkg="viso2_ros" type="stereo_odometer" name="stereo_odometer">
    <remap from="stereo" to="$(arg camera)"/>
    <remap from="image" to="image_rect"/>
  </node>

  <node pkg="stereo_slam" type="localization" name="stereo_slam" output="screen">
    <param name="odom_topic" value="/stereo_odometer/odometry"/>
    <param name="camera_topic" value="$(arg camera)"/>
  </node>
</launch>

Published Topics

  • /stereo_slam/odometry - The vehicle pose (type nav_msgs::Odometry).
  • /stereo_slam/graph_poses - The updated graph poses (type stereo_slam::GraphPoses).
  • /stereo_slam/keyframes - Number of inserted keyframes (type std_msgs::String).
  • /stereo_slam/keypoints_clustering - Image containing the keypoint clusters (type sensor_msgs::Image).
  • /stereo_slam/loop_closing_matchings - Image of the loop closing correspondences. Correspondences are keyframe-to-multi-keyframe (type sensor_msgs::Image).
  • /stereo_slam/loop_closing_queue - Number of keyframes waiting on the loop closing queue. Please monitor this topic, to check the real-time performance: if this number grows indefinitely it means that your system is not able to process all the keyframes, then, scale your images. (type std_msgs::String).
  • /stereo_slam/loop_closings - Number of loop closings found (type std_msgs::String).
  • /stereo_slam/pointcloud - The pointcloud for every keyframe (type sensor_msgs::PointCloud2).
  • /stereo_slam/tracking_overlap - Image containing a representation of the traking overlap. Used to decide when to insert a new keyframe into the graph (type sensor_msgs::Image).
  • /stereo_slam/camera_params - The optimized (calibrated) camera parameters after every loop closure (type stereo_slam::CameraParams).

Saved data

The node stores some data into the stereo_slam directory during the execution:

  • haloc - A folder containing all the files needed for the libhaloc library, which is responsible for loop closing detection. You do not need this folder at all.
  • keyframes - Stores the left stereo image for every keyframe (with the possibility of drawing the keypoint clustering over the image).
  • loop_closures - Stores all the images published in the topic /stereo_slam/loop_closing_matchings.
  • pointclouds - Stores all the pointclouds published in the topic /stereo_slam/pointcloud.

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

or (automatically detect the graph files):

roscd stereo_slam
./scripts/graph_viewer.py

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.

More Repositories

1

viso2

A ROS wrapper for libviso2, a library for visual odometry
C++
237
star
2

srv_tools

ROS-Stack with some tools
Python
63
star
3

libhaloc

ROS library for HAsh-based LOop Closure
C++
48
star
4

pointcloud_web_viewer

PHP
42
star
5

fovis

ROS wrapper for fovis, a visual odometry library
C++
23
star
6

avt_vimba_camera

ROS Driver for AVT cameras using VIMBA SDK
C++
23
star
7

image_preprocessing

Underwater image preprocessing: Vignetting ellimination, color correction and dehazing
C++
18
star
8

laser_stripe_reconstruction

C++
16
star
9

6dof_stereo_ekf_slam

6 DOF Stereo Visual EKF Slam
MATLAB
15
star
10

auv_framework

ROS stack for control and navigation of autonomous underwater vehicles
C++
12
star
11

libfovis

Fork of the original libfovis (Fast Odometry from VISion)
C++
12
star
12

pointcloud_registration

Different examples on point cloud registration using PCL
C++
11
star
13

pcl_feature_extraction

C++
8
star
14

multirobot_visual_graph_slam

2D Multi Robot Visual Graph SLAM. This approach is specially addressed to underwater or marine surface vehicles with cameras pointing downwards to the seabed. Althought not tested, It could be also applied to terrestrial vehicles with a camera facing the ground. Non suitable for vehicles moving with 6 DoF.
MATLAB
8
star
15

camera1394stereo

ROS driver for Firewire stereo cameras
C++
6
star
16

NetHALOC_Keras_Python

NetHALOC: A Neural Network for Learned Global Image Descriptors based on HALOC (HAsh-based LOop Closure- github.com/srv/libhaloc)
Python
5
star
17

pg_spinnaker_camera

C++
5
star
18

jf_object_detection

jellyfish object detection
Python
5
star
19

arsea

Unity app to remotely view and control an ROV using ROS
C#
4
star
20

pozyx_drivers

ROS driver to work with Pozyx
Python
4
star
21

Underwater_Dataset

Dataset of Underwater images
4
star
22

merbots_ibvs

SRV package for image-based visual servoing
C++
4
star
23

HALOC_Python

HALOC algorithm for image hashing and comparison. See https://github.com/srv/libhaloc for the original HALOC
Python
3
star
24

usbl_position

Python
3
star
25

ccny_vision

Fork of http://robotics.ccny.cuny.edu/git/ccny-ros-pkg/ccny_vision.git with some fixes
C
3
star
26

desktop_3d_scanner

Python
2
star
27

object_detection

C++
1
star
28

pcl_texture_mapping

C++
1
star
29

acoustic_link

C++
1
star
30

visual_altimeter

C++
1
star
31

survey_uwsim

Make a predefined survey in UWSim
C++
1
star
32

srv_ecto_vision

Computer Vision Algorithms packed into ecto cells & scripts
C++
1
star
33

merbots_tracking

SRV package for object tracking
C++
1
star
34

loop_closing_detector

C++
1
star
35

imagenex_echosounder

ROS driver for the Eco Sounder Imagenex model 852-000-140
C++
1
star
36

target_icp_registration

A ROS package to register an input pointcloud against a target or a model
C++
1
star
37

pose_twist_meskf_ros

C++
1
star