{"id":21481929,"url":"https://github.com/methyldragon/mgm_ros","last_synced_at":"2026-05-17T21:02:33.965Z","repository":{"id":98740173,"uuid":"200056096","full_name":"methylDragon/mgm_ros","owner":"methylDragon","description":"ROS Nodelet package for doing disparity stereo-matching with the More Global Matching (MGM) algorithm!","archived":false,"fork":false,"pushed_at":"2019-08-02T06:28:29.000Z","size":1484,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T18:50:13.427Z","etag":null,"topics":["3d","disparity-map","image-processing","point-cloud","ros","stereo-vision"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/methylDragon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-01T13:29:48.000Z","updated_at":"2019-08-09T07:19:10.000Z","dependencies_parsed_at":"2023-03-03T15:45:30.912Z","dependency_job_id":null,"html_url":"https://github.com/methylDragon/mgm_ros","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fmgm_ros","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fmgm_ros/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fmgm_ros/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fmgm_ros/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/methylDragon","download_url":"https://codeload.github.com/methylDragon/mgm_ros/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244006395,"owners_count":20382443,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["3d","disparity-map","image-processing","point-cloud","ros","stereo-vision"],"created_at":"2024-11-23T12:28:58.925Z","updated_at":"2026-05-17T21:02:28.926Z","avatar_url":"https://github.com/methylDragon.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mgm_ros\n\nAuthor: methylDragon\n\nROS Nodelet package for doing disparity stereo-matching with the [More Global Matching (MGM) algorithm](\u003chttp://dev.ipol.im/~facciolo/mgm/\u003e)!\n\n\n\n## Demonstration\n\n[![Click to watch video!](assets/1564724964192.png)](\u003chttps://www.youtube.com/watch?v=Gz7ItewldX8\u003e)\n\n\n\n## Introduction\n\n![Example results from the paper](assets/fig.png)\n\n[Image Source](\u003chttp://dev.ipol.im/~facciolo/mgm/\u003e)\n\n\n\nMGM 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.\n\nThis package wraps the functionality as a ROS nodelet that takes in rectified images, and can be used to generate point clouds.\n\n\n\n## Features\n\nThe nodelet:\n\n- Is implemented as a nodelet!\n- Has dynamically reconfigurable parameters\n\nAdditionally, 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.\n\n\n\n## Setup\n\nThis package depends on the ROS wrapped mgm library found [here](\u003chttps://github.com/methylDragon/mgm/tree/multiscale\u003e).\n\n(I'm linking the fork of the original code because the branch has yet to be merged into the original repository.)\n\n\n\nRun these commands in the root directory of a ROS workspace of your choice\n\n```shell\ncd src\ngit clone https://github.com/methylDragon/mgm.git\ngit clone https://github.com/methylDragon/mgm_ros.git\n\ncd mgm\ngit checkout multiscale\ncd ..\n\ncatkin build # Or you can use catkin_make\n```\n\n\n\n## Usage\n\nMake sure you run this AFTER you have valid streams of stereo-camera images and camera info.\n\nSimply use the included launch file!\n\nYou might need to do some remaps. The original topic entry points are:\n\n- `left/image_raw` and `right/image_raw`\n- `left/camera_info` and `right/camera_info`\n\nOutputs are:\n\n- `left/downsampled/image_rect` and `right/downsampled/image_rect`\n- `downsampled/disparity`\n- `downsampled/points`\n\n```shell\n# Run the launchfile!\n$ roslaunch mgm_ros mgm_ros.launch\n\n# You can visualise them with rviz!\n$ rviz\n\n# Just make sure that you configure rviz to use an appropriate fixed frame\n# As well as a relevant topic visualiser!\n```\n\nYou may want to reconfigure the nodelet dynamically as well!\n\n```shell\n$ rosrun rqt_reconfigure rqt_reconfigure\n```\n\n\n\nAlternatively, you may use the nodelet in your own launch files.\n\n```xml\n\u003c!-- Managed --\u003e\n\u003cnode pkg=\"nodelet\" type=\"nodelet\" name=\"downsampled_disparity_mgm\" args=\"load mgm_ros/mgm point_manager\" output=\"screen\"\u003e\n    \u003cremap from=\"left/image_rect\" to=\"left/downsampled/image_rect\"/\u003e\n    \u003cremap from=\"right/image_rect\" to=\"right/downsampled/image_rect\"/\u003e\n    \u003cremap from=\"left/camera_info\" to=\"left/downsampled/camera_info\"/\u003e\n    \u003cremap from=\"right/camera_info\" to=\"right/downsampled/camera_info\"/\u003e\n\n    \u003cremap from=\"disparity\" to=\"downsampled/disparity\"/\u003e\n\u003c/node\u003e\n\n\u003c!-- Standalone --\u003e\n\u003cnode pkg=\"nodelet\" type=\"nodelet\" name=\"downsampled_disparity_mgm\" args=\"standalone mgm_ros/mgm\" output=\"screen\"\u003e\n    \u003cremap from=\"left/image_rect\" to=\"left/downsampled/image_rect\"/\u003e\n    \u003cremap from=\"right/image_rect\" to=\"right/downsampled/image_rect\"/\u003e\n    \u003cremap from=\"left/camera_info\" to=\"left/downsampled/camera_info\"/\u003e\n    \u003cremap from=\"right/camera_info\" to=\"right/downsampled/camera_info\"/\u003e\n\n    \u003cremap from=\"disparity\" to=\"downsampled/disparity\"/\u003e\n\u003c/node\u003e\n```\n\n\n\n## Limitations and Caveats\n\nIt 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.)\n\nBecause 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.)\n\nAdditionally, 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.\n\nIt 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.\n\n\n\nUnrelated caveat:\n\nPublish rate is not implemented even though it is exposed as a parameter.\n\n\n\n**Pull requests and improvements will be greatly appreciated with regards to these!**\n\n- For ROS improvements, kindly **send a PR to this repo**.\n\n- For MGM related improvements, **send a PR to the [original repo](\u003chttps://github.com/gfacciol/mgm\u003e)**.\n\n\n\n## Credits\n\nThis ROS package leverages the [More Global Matching (MGM) stereo matching algorithm](\u003chttp://dev.ipol.im/~facciolo/mgm/\u003e) by G. Facciolo, C. de Franchis, and E. Meinhardt\n\n```\nG. Facciolo and C. de Franchis and E. Meinhardt,\n\"MGM: A Significantly More Global Matching for Stereovision\",\nin British Machine Vision Conference, BMVC 2015.\n\nSite : http://dev.ipol.im/~facciolo/mgm/\nEmail: gabriele.facciolo@cmla.ens-cachan.fr\n```\n\nIt uses the [implementation](\u003chttps://github.com/gfacciol/mgm\u003e) as a library.\n\nThe actual ROS nodelet is written by methylDragon, but is based off of the nodelets in the `stereo_image_proc` package.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmethyldragon%2Fmgm_ros","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmethyldragon%2Fmgm_ros","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmethyldragon%2Fmgm_ros/lists"}