{"id":17632725,"url":"https://github.com/mp3guy/elasticfusion","last_synced_at":"2025-05-15T12:00:19.484Z","repository":{"id":1886046,"uuid":"44748564","full_name":"mp3guy/ElasticFusion","owner":"mp3guy","description":"Real-time dense visual SLAM system","archived":false,"fork":false,"pushed_at":"2022-10-25T20:58:14.000Z","size":1365,"stargazers_count":1843,"open_issues_count":5,"forks_count":594,"subscribers_count":80,"default_branch":"master","last_synced_at":"2025-04-14T19:59:12.930Z","etag":null,"topics":["cuda","reconstruction","slam"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mp3guy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-22T13:54:58.000Z","updated_at":"2025-04-09T06:23:15.000Z","dependencies_parsed_at":"2023-01-11T16:06:27.247Z","dependency_job_id":null,"html_url":"https://github.com/mp3guy/ElasticFusion","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/mp3guy%2FElasticFusion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mp3guy%2FElasticFusion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mp3guy%2FElasticFusion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mp3guy%2FElasticFusion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mp3guy","download_url":"https://codeload.github.com/mp3guy/ElasticFusion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254337612,"owners_count":22054253,"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":["cuda","reconstruction","slam"],"created_at":"2024-10-23T01:45:16.852Z","updated_at":"2025-05-15T12:00:19.325Z","avatar_url":"https://github.com/mp3guy.png","language":"C++","readme":"# ElasticFusion #\n\nReal-time dense visual SLAM system capable of capturing comprehensive dense globally consistent surfel-based maps of room scale environments explored using an RGB-D camera.\n\n# Related Publications #\nPlease cite this work if you make use of our system in any of your own endeavors:\n\n* **[ElasticFusion: Real-Time Dense SLAM and Light Source Estimation](http://www.thomaswhelan.ie/Whelan16ijrr.pdf)**, *T. Whelan, R. F. Salas-Moreno, B. Glocker, A. J. Davison and S. Leutenegger*, IJRR '16\n* **[ElasticFusion: Dense SLAM Without A Pose Graph](http://thomaswhelan.ie/Whelan15rss.pdf)**, *T. Whelan, S. Leutenegger, R. F. Salas-Moreno, B. Glocker and A. J. Davison*, RSS '15\n\n# 1. What do I need to build it? #\n\n## 1.1. Ubuntu ##\n\nUbuntu 22.04 on Xorg, NVIDIA drivers 510.73.05, CUDA driver 11.6, CUDA toolkit 11.5 (essentially whatever is in the Ubuntu repos).\n\n```bash\nsudo apt install -y cmake-qt-gui git build-essential libusb-1.0-0-dev libudev-dev openjdk-11-jdk freeglut3-dev libglew-dev libsuitesparse-dev zlib1g-dev libjpeg-dev\n```\n\n```bash\ngit clone https://github.com/mp3guy/ElasticFusion.git\ncd ElasticFusion/\ngit submodule update --init\ncd third-party/OpenNI2/\nmake -j8\ncd ../Pangolin/\nmkdir build\ncd build\ncmake .. -DEIGEN_INCLUDE_DIR=$HOME/ElasticFusion/third-party/Eigen/ -DBUILD_PANGOLIN_PYTHON=false\nmake -j8\ncd ../../..\nmkdir build\ncd build/\ncmake ..\n```\n\n# 2. How do I use it? #\nThere are two subprojects in the repo:\n\n* The *Core* is the main engine which builds into a shared library that you can link into other projects and treat like an API. \n* The *Tools* where the graphical interface used to run the system on either live sensor data or a logged data file lives.\n\nThe executable (*ElasticFusion*) can take a bunch of parameters when launching it from the command line. They are as follows:\n\n* *-cal \u003ccalibration\u003e* : Loads a camera calibration file specified as *fx fy cx cy*.\n* *-l \u003clogfile\u003e* : Processes the specified .klg log file.\n* *-p \u003cposes\u003e* : Loads ground truth poses to use instead of estimated pose.\n* *-c \u003cconfidence\u003e* : Surfel confidence threshold (default *10*).\n* *-d \u003cdepth\u003e* : Cutoff distance for depth processing (default *3*m).\n* *-i \u003cicp\u003e* : Relative ICP/RGB tracking weight (default *10*).\n* *-ie \u003cerror\u003e* : Local loop closure residual threshold (default *5e-05*).\n* *-ic \u003ccount\u003e* : Local loop closure inlier threshold (default *35000*).\n* *-cv \u003ccovariance\u003e* : Local loop closure covariance threshold (default *1e-05*).\n* *-pt \u003cphotometric\u003e* : Global loop closure photometric threshold (default *115*).\n* *-ft \u003cthreshold\u003e* : Fern encoding threshold (default *0.3095*).\n* *-t \u003ctime\u003e* : Time window length (default *200*).\n* *-s \u003cskip\u003e* : Frames to skip at start of log.\n* *-e \u003cend\u003e* : Cut off frame of log.\n* *-f* : Flip RGB/BGR.\n* *-icl* : Enable this if using the [ICL-NUIM](http://www.doc.ic.ac.uk/~ahanda/VaFRIC/iclnuim.html) dataset (flips normals to account for negative focal length on that data).\n* *-o* : Open loop mode.\n* *-rl* : Enable relocalisation.\n* *-fs* : Frame skip if processing a log to simulate real-time.\n* *-q* : Quit when finished a log.\n* *-fo* : Fast odometry (single level pyramid).\n* *-nso* : Disables SO(3) pre-alignment in tracking.\n* *-r* : Rewind and loop log forever. \n* *-ftf* : Do frame-to-frame RGB tracking. \n* *-sc* : Showcase mode (minimal GUI).\n\nEssentially by default *./ElasticFusion* will try run off an attached ASUS sensor live. You can provide a .klg log file instead with the -l parameter. You can capture .klg format logs using either [Logger1](https://github.com/mp3guy/Logger1) or [Logger2](https://github.com/mp3guy/Logger2). \n\n# 3. How do I just use the Core API? #\nThe libefusion.so shared library which gets built by the Core is what you want to link against.\n\nTo then use the Core API, make sure to include the header file in your source file:\n```cpp\n    #include \u003cElasticFusion.h\u003e\n```\n\nInitialise the static configuration parameters once somewhere at the start of your program:\n```cpp\n    Resolution::getInstance(640, 480);\n    Intrinsics::getInstance(528, 528, 320, 240);\n```\n\nCreate an OpenGL context before creating an ElasticFusion object, as ElasticFusion uses OpenGL internally. You can do this whatever way you wish, using Pangolin is probably easiest given it's a dependency:\n```cpp\n    pangolin::Params windowParams;\n    windowParams.Set(\"SAMPLE_BUFFERS\", 0);\n    windowParams.Set(\"SAMPLES\", 0);\n    pangolin::CreateWindowAndBind(\"Main\", 1280, 800, windowParams);\n```\n\nMake an ElasticFusion object and start using it:\n```cpp\n    ElasticFusion eFusion;\n    eFusion.processFrame(rgb, depth, timestamp, currentPose, weightMultiplier);\n```\n\nSee the source code of MainController.cpp to see more usage.\n\n# 4. Datasets #\n\nWe have provided a sample dataset which you can run easily with ElasticFusion for download [here](http://www.doc.ic.ac.uk/~sleutene/datasets/elasticfusion/dyson_lab.klg). Launch it as follows:\n\n```bash\n./ElasticFusion -l dyson_lab.klg\n```\n\n# 5. License #\nElasticFusion is freely available for non-commercial use only.  Full terms and conditions which govern its use are detailed [here](http://www.imperial.ac.uk/dyson-robotics-lab/downloads/elastic-fusion/elastic-fusion-license/) and in the LICENSE.txt file.\n\n# 6. FAQ #\n***What are the hardware requirements?***\n\nA [very fast nVidia GPU (3.5TFLOPS+)](https://en.wikipedia.org/wiki/List_of_Nvidia_graphics_processing_units#GeForce_900_Series), and a fast CPU (something like an i7). If you want to use a non-nVidia GPU you can rewrite the tracking code or substitute it with something else, as the rest of the pipeline is actually written in the OpenGL Shading Language. \n\n***How can I get performance statistics?***\n\nDownload [Stopwatch](https://github.com/mp3guy/Stopwatch) and run *StopwatchViewer* at the same time as ElasticFusion. \n\n***I ran a large dataset and got assert(graph.size() / 16 \u003c MAX_NODES) failed***\n\nCurrently there's a limit on the number of nodes in the deformation graph down to lazy coding (using a really wide texture instead of a proper 2D one). So we're bound by the maximum dimension of a texture, which is 16384 on modern cards/OpenGL. Either fix the code so this isn't a problem any more, or increase the modulo factor in *Core/Shaders/sample.geom*. \n\n***I have a nice new laptop with a good GPU but it's still slow***\n\nIf your laptop is running on battery power the GPU will throttle down to save power, so that's unlikely to work (as an aside, [Kintinuous](https://github.com/mp3guy/Kintinuous) will run at 30Hz on a modern laptop on battery power these days). You can try disabling SO(3) pre-alignment, enabling fast odometry, only using either ICP or RGB tracking and not both, running in open loop mode or disabling the tracking pyramid. All of these will cost you accuracy. \n\n***I saved a map, how can I view it?***\n\nDownload [Meshlab](http://meshlab.sourceforge.net/). Select Render-\u003eShaders-\u003eSplatting. \n\n***The map keeps getting corrupted - tracking is failing - loop closures are incorrect/not working***\n\nFirstly, if you're running live and not processing a log file, ensure you're hitting 30Hz, this is important. Secondly, you cannot move the sensor extremely fast because this violates the assumption behind projective data association. In addition to this, you're probably using a primesense, which means you're suffering from motion blur, unsynchronised cameras and rolling shutter. All of these are aggravated by fast motion and hinder tracking performance. \n\nIf you're not getting loop closures and expecting some, pay attention to the inlier and residual graphs in the bottom right, these are an indicator of how close you are to a local loop closure. For global loop closures, you're depending on [fern keyframe encoding](http://www.doc.ic.ac.uk/~bglocker/pdfs/glocker2015tvcg.pdf) to save you, which like all appearance-based place recognition methods, has its limitations. \n\n***Is there a ROS bridge/node?***\n\nNo. The system relies on an extremely fast and tight coupling between the mapping and tracking on the GPU, which I don't believe ROS supports natively in terms of message passing. \n\n***This doesn't seem to work like it did in the videos/papers***\n\nA substantial amount of refactoring was carried out in order to open source this system, including rewriting a lot of functionality to avoid certain licenses and reduce dependencies. Although great care was taken during this process, it is possible that performance regressions were introduced and have not yet been discovered.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmp3guy%2Felasticfusion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmp3guy%2Felasticfusion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmp3guy%2Felasticfusion/lists"}