Ask Your Question

Docker or snap for ROS projects

asked 2019-09-06 13:35:45 -0500

mugetsu gravatar image

Hi guys, recently I had to deal with issues in my project with different computers having slightly different environment.

Ideally I want all the developers and robot to have the identical environment for both development and production. I read a little about docker as well as snap but kind of confused on which one is better fit for this.

What does the general ROS community use? Is there any gotchas and limitations to either? I'm concerned it may require significant work to reconfigure my setup.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-09-06 22:26:53 -0500

updated 2019-09-07 01:32:59 -0500

This sentence alone

I want all the developers and robot to have the identical environment for both development and production

Docker. I'm a fan of snaps for deployment of certain assets but you cannot develop inside of a snap, they're read only and take a bunch of time to generate each snap (think 20-30 minutes).

Snaps are for deployment (usually in the cloud, but also on robots/IoT) and cannot be used for development from their read-only state packaging up the entire code/dependencies around Ubuntu Core. The general community uses Docker by in large and OSRF even provides base images on DockerHub to pull from for base, desktop, and specialty installs

Docker is pretty easy to get started with, here's an example of building one of my packages in docker: As you can see, its < 25 lines. Launch the container and then you can run your ROS packages (and/or create an entry point so its automatic).

Edit: More info on snaps and ROS can be found here Analogous to my docker example, here's a snapcraft yaml I use for deployment of the same project Feel free to use those two as testing grounds to get the hang of it since I happen to use both in this particular case

edit flag offensive delete link more


so basically, docker for dev and snap for deployment. Why use snap for deployment over docker?

mugetsu gravatar image mugetsu  ( 2019-09-09 18:49:08 -0500 )edit

If you want to use docker to deploy as well, theres nothing stopping you. Its just a different philosophy

stevemacenski gravatar image stevemacenski  ( 2019-09-09 19:04:27 -0500 )edit

The snapcraft yaml link is a 404, would be helpful if still available :)

abhishek47 gravatar image abhishek47  ( 2021-04-05 09:05:27 -0500 )edit

how can snap be installed inside the docker container and what benefit does it provides for deployment purpose.

dinesh gravatar image dinesh  ( 2021-04-08 12:31:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-09-06 13:35:45 -0500

Seen: 628 times

Last updated: Sep 07 '19