https://github.com/methyldragon/mgm_ros
ROS Nodelet package for doing disparity stereo-matching with the More Global Matching (MGM) algorithm!
https://github.com/methyldragon/mgm_ros
3d disparity-map image-processing point-cloud ros stereo-vision
Last synced: about 1 month ago
JSON representation
ROS Nodelet package for doing disparity stereo-matching with the More Global Matching (MGM) algorithm!
- Host: GitHub
- URL: https://github.com/methyldragon/mgm_ros
- Owner: methylDragon
- License: agpl-3.0
- Created: 2019-08-01T13:29:48.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-02T06:28:29.000Z (over 5 years ago)
- Last Synced: 2025-01-23T18:50:13.427Z (3 months ago)
- Topics: 3d, disparity-map, image-processing, point-cloud, ros, stereo-vision
- Language: C++
- Homepage:
- Size: 1.42 MB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mgm_ros
Author: methylDragon
ROS Nodelet package for doing disparity stereo-matching with the [More Global Matching (MGM) algorithm]()!
## Demonstration
[]()
## Introduction

[Image Source]()
MGM is meant to be an improvement over the standard Semi-Global Matching (SGM) algorithm used by the `stereo_image_proc` algorithm. The paper and code that implements it reports better generated disparity images with little additional overhead.
This package wraps the functionality as a ROS nodelet that takes in rectified images, and can be used to generate point clouds.
## Features
The nodelet:
- Is implemented as a nodelet!
- Has dynamically reconfigurable parametersAdditionally, MGM does not actually require camera parameters, just rectified images. But this ROS nodelet requires some level of message synchronisation between rectified images and camera information.
## Setup
This package depends on the ROS wrapped mgm library found [here]().
(I'm linking the fork of the original code because the branch has yet to be merged into the original repository.)
Run these commands in the root directory of a ROS workspace of your choice
```shell
cd src
git clone https://github.com/methylDragon/mgm.git
git clone https://github.com/methylDragon/mgm_ros.gitcd mgm
git checkout multiscale
cd ..catkin build # Or you can use catkin_make
```## Usage
Make sure you run this AFTER you have valid streams of stereo-camera images and camera info.
Simply use the included launch file!
You might need to do some remaps. The original topic entry points are:
- `left/image_raw` and `right/image_raw`
- `left/camera_info` and `right/camera_info`Outputs are:
- `left/downsampled/image_rect` and `right/downsampled/image_rect`
- `downsampled/disparity`
- `downsampled/points````shell
# Run the launchfile!
$ roslaunch mgm_ros mgm_ros.launch# You can visualise them with rviz!
$ rviz# Just make sure that you configure rviz to use an appropriate fixed frame
# As well as a relevant topic visualiser!
```You may want to reconfigure the nodelet dynamically as well!
```shell
$ rosrun rqt_reconfigure rqt_reconfigure
```Alternatively, you may use the nodelet in your own launch files.
```xml
```
## Limitations and Caveats
It is suspected that due to SGBM and BM's inclusion into OpenCV, that there have been additional optimisations that lead SGBM and BM to be much, much faster than MGM (about 30x faster.)
Because of this, the MGM demo runs at a much slower rate, and sometimes might not even produce any point clouds at all if incoming camera info messages are not throttled. (This is possibly due to strict synchronisation requirements in the `stereo_image_proc` nodelet responsible for converting disparity messages to point clouds.)
Additionally, due to this issue, it is important to ensure that the MGM disparity nodelet (and possibly the disparity to point cloud conversion nodelet) are running in **separate processes**. Otherwise there might be issues with topic subscriptions.
It is also because of this limitation that I suspect the MGM algorithm cannot be pushed to its utmost maximum to produce fuller, more comprehensive disparity images to surpass the performance of SGBM.
Unrelated caveat:
Publish rate is not implemented even though it is exposed as a parameter.
**Pull requests and improvements will be greatly appreciated with regards to these!**
- For ROS improvements, kindly **send a PR to this repo**.
- For MGM related improvements, **send a PR to the [original repo]()**.
## Credits
This ROS package leverages the [More Global Matching (MGM) stereo matching algorithm]() by G. Facciolo, C. de Franchis, and E. Meinhardt
```
G. Facciolo and C. de Franchis and E. Meinhardt,
"MGM: A Significantly More Global Matching for Stereovision",
in British Machine Vision Conference, BMVC 2015.Site : http://dev.ipol.im/~facciolo/mgm/
Email: [email protected]
```It uses the [implementation]() as a library.
The actual ROS nodelet is written by methylDragon, but is based off of the nodelets in the `stereo_image_proc` package.