{"id":21481919,"url":"https://github.com/methyldragon/svo_ros_docker","last_synced_at":"2025-07-24T14:36:45.130Z","repository":{"id":98740489,"uuid":"206516070","full_name":"methylDragon/svo_ros_docker","owner":"methylDragon","description":"Have a whale of a time running Semi-Direct Visual Odometry (SVO 2.0) for ROS in Docker! 🐳","archived":false,"fork":false,"pushed_at":"2019-09-06T03:17:35.000Z","size":718,"stargazers_count":7,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T04:51:18.638Z","etag":null,"topics":["docker","dockerfile","perception","robotics","ros","visual-odometry"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","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-09-05T08:40:51.000Z","updated_at":"2024-08-05T15:27:57.000Z","dependencies_parsed_at":"2023-03-03T15:45:36.005Z","dependency_job_id":null,"html_url":"https://github.com/methylDragon/svo_ros_docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/methylDragon/svo_ros_docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fsvo_ros_docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fsvo_ros_docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fsvo_ros_docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fsvo_ros_docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/methylDragon","download_url":"https://codeload.github.com/methylDragon/svo_ros_docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/methylDragon%2Fsvo_ros_docker/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266856598,"owners_count":23995712,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["docker","dockerfile","perception","robotics","ros","visual-odometry"],"created_at":"2024-11-23T12:28:55.390Z","updated_at":"2025-07-24T14:36:45.122Z","avatar_url":"https://github.com/methylDragon.png","language":"Dockerfile","funding_links":["https://www.buymeacoffee.com/methylDragon","https://www.paypal.me/methylDragon"],"categories":[],"sub_categories":[],"readme":"# svo_ros Docker Template\nA Docker container for easily running the [Semi-Direct Visual Odometry 2.0 (SVO)](http://rpg.ifi.uzh.ch/svo2.html) visual odometry algorithm by ETHz with ROS!\n\n\n\n## Introduction\n\n![ohgodwhy](assets/ohgodwhy.png)\n\nAs amazing as the [SVO ROS example package](https://github.com/uzh-rpg/rpg_svo_example) is, even detailing installation steps, it's hard to get it set up on some systems, especially since the supported systems are less widely used or straight up deprecated nowadays.\n\nSo why not use Docker to help preserve the environments and allow SVO to run on all sorts of systems and environments with minimal overhead?\n\nCheers!\n\n\n\n## Pre-Requisites\n\n- Docker :whale:\n  - You can find a [tutorial](https://github.com/methylDragon/docker-reference/blob/master/01%20Docker%20Crash%20Course.md) here\n  - And an [installation guide](https://github.com/methylDragon/docker-reference/blob/master/01%20Docker%20Crash%20Course.md#2.2) too!\n- The SVO [Binaries](http://rpg.ifi.uzh.ch/svo2.html)\n  - Specifically the one for x86_64 Ubuntu 16.04\n  - (Named svo_binaries_1604_kinetic)\n  - I'd include it as a wget call in the Dockerfile script, but I don't want to break any licenses\n\n\n\n## Setup\n\n### Pre-Setup\n\nOnce you've downloaded your binaries, do place them in the root of this repository.\n\nSo your file tree should look something like this:\n\n```\nsvo_ros_docker\n├── Dockerfile\n├── README.md\n├── svo_entrypoint.sh\n└── svo_binaries_1604_kinetic/\n   └── rpg_svo_example/\n   └── svo_install_ws/\n   └── ...\n```\n\n\n\n### Build The Image!\n\n```shell\n# Run this in the root of the repository (where the Dockerfile is)\ndocker build -t ros:svo .\n```\n\n\n\n## Validation\n\n### Run the Demo!\n\n![1567671142676](assets/1567671142676.png)\n\nWe'll need to download the [demo bag file](http://rpg.ifi.uzh.ch/svo2/svo_test_short.bag). Save it somewhere accessible on your host computer.\n\n**On Host Computer**\n\nWe didn't enable GUI in the Docker container because some machines (typically with NVIDIA GPUs) can't run the relevant GUIs without bloating the container! (This is mainly because RViz uses OpenGL, and it can get a bit tricky to set up properly. Also, because we didn't install RViz on the container to keep it lean.)\n\nThankfully we can run visualisations on our host machine instead.\n\n```shell\n# In one terminal, ensure your ROS_MASTER_URI is not on localhost,\n# Then start a ROS master first!\nexport ROS_MASTER_URI=http://127.0.0.1:11311\nroscore\n\n# Then in another terminal, navigate to the rpg_svo_example on your host, and run RVIZ\nexport ROS_MASTER_URI=http://127.0.0.1:11311\ncd \u003csvo_ros_docker_repo_dir\u003e/svo_binaries_1604_kinetic/rpg_svo_example/svo_ros\nrviz -d rviz_config.rviz\n```\n\n**In SVO_ROS Docker Container**\n\n```shell\n# Spin up the Docker container and make it ephemeral\n# Remember to set network to host! We'll also just do local for IPs\ndocker run -it \\\n           --rm \\\n           --net=host \\\n           -e ROS_IP=127.0.0.1 \\\n           ros:svo\n\n# Once inside the Docker container we'll source the workspace and run the demo!\nsource svo_ws/devel/setup.bash\nroslaunch svo_ros run_from_topic.launch cam_name:=svo_test_pinhole\n```\n\n**Play Bag!**\n\n```shell\n# Finally, in your host machine, play the bag file\nexport ROS_MASTER_URI=http://127.0.0.1:11311\nexport ROS_IP=127.0.0.1\n\ncd \u003cbagfile_directory\u003e\nrosbag play svo_test_short.bag\n```\n\n\n\n## Deploying svo_ros from the Docker Container\n\nIf you actually want to use the SVO_ROS Docker container in a deployment context, just properly set your `ROS_MASTER_URI` and `ROS_IP` to whatever you need.\n\nThere are also some things to take note of:\n\n- Because using the `svo_ros` package in a deployment context will require you to have certain calibration files handy, we'll need to create a persisting container. Run the `docker run` command **once**.\n\n- While you can do crazy stuff like mount volumes and stuff for your convenience, I won't be going through that here\n\n  - Instead, if you want to make your own customised SVO pipeline, you will need to:\n\n    \u003e 1. Get your own calibration camchain made from [Kalibr](https://github.com/ethz-asl/kalibr) and put it into the container's `/home/svo_ws/src/rpg_svo_example/svo_ros/calib`.\n    \u003e\n    \u003e    ```shell\n    \u003e    # To copy files into a container\n    \u003e    docker cp \u003chost_file_path\u003e \u003ccontainer_name\u003e:\u003ccontainer_file_dest_path\u003e\n    \u003e    ```\n    \u003e\n    \u003e 2. Do the same thing but for the param file in `/home/svo_ws/src/rpg_svo_example/svo_ros/param`.\n    \u003e\n    \u003e 3. Edit the `run_from_topic.launch` launchfile to accept your own camera's topics, and your own special param file, or create your own launchfile based off of it for yourself.\n\n  - If you're really lazy to keep copying files back and forth, you can also just edit the files you've copied in directly. I made sure the container has `nano`.\n\n  - Or if you want to be really efficient, you can just mount a volume in the `docker run` command and point the launchfile to those volumes. Then you can just edit the files on your host, and they should be reflected in the container.\n\n```shell\n# Create the container\n# In this case, we name it svo_rawr\ndocker run -it \\\n           --net=host \\\n           -e ROS_MASTER_URI=http://\u003cYOUR_MASTER_URI_HERE\u003e:11311 \\\n           -e ROS_IP=\u003cYOUR_HOST_IP\u003e \\\n           --name=svo_rawr \\\n           ros:svo\n           \n# For subsequent runs, use docker exec after starting the container\ndocker start svo_rawr\ndocker exec -it svo_rawr bash\n\n# If you need to change the IPs for some reason, inside the container, re-export them\n# Or, alternatively, just remake the container\nexport ROS_MASTER_URI=http://\u003cnew_master_uri\u003e:11311\nexport ROS_IP=\u003cYOUR_HOST_IP\u003e\n\n# After which you can run it as above\nsource svo_ws/devel/setup.bash\nroslaunch svo_ros run_from_topic.launch cam_name:=\u003cyour_cam_calib_file_name\u003e\n```\n\n\n\n## Notes\n\n### Overlay Workspace Naming\n\nThe overlay workspace is called `/home/svo_ws` instead of `svo_install_overlay_ws` like specified in the installation guide for SVO.\n\n\n\n### Running with Specified Hostnames, Master URIs, and IP\n\nSimply pass in the relevant environment variables using the `-e` flag!\n\n![1567668713694](assets/1567668713694.png)\n\n```shell\n# For example, for a custom ROS_MASTER_URI:\ndocker run -it --rm -e ROS_MASTER_URI=RAWR ros:svo\necho $ROS_MASTER_URI\n```\n\n\n\n```\n                            .     .\n                         .  |\\-^-/|  .    \n                        /| } O.=.O { |\\\n```\n\n---\n\n [![Yeah! Buy the DRAGON a COFFEE!](assets/COFFEE%20BUTTON%20%E3%83%BE(%C2%B0%E2%88%87%C2%B0%5E)-1567671281238.png)](https://www.buymeacoffee.com/methylDragon)\n\n[Or leave a tip! ヾ(°∇°*)](https://www.paypal.me/methylDragon)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmethyldragon%2Fsvo_ros_docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmethyldragon%2Fsvo_ros_docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmethyldragon%2Fsvo_ros_docker/lists"}