Ask Your Question
0

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
0

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 https://hub.docker.com/_/ros.

Docker is pretty easy to get started with, here's an example of building one of my packages in docker: https://github.com/SteveMacenski/slam.... 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 https://snapcraft.io/docs/catkin-plugin. Analogous to my docker example, here's a snapcraft yaml I use for deployment of the same project https://github.com/SteveMacenski/slam.... 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

Comments

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

mugetsu gravatar imagemugetsu ( 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 imagestevemacenski ( 2019-09-09 19:04:27 -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

1 follower

Stats

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

Seen: 24 times

Last updated: Sep 07