I get a question about colcon and I could not find relevant information about it elsewhere.
For any colcon workspace, after a successful build, you will get an “install” folder with all the built binaries inside. I was wondering if it’s possible to pack the “install” folder and distribute it to different robots with the same hardware/software setup so that I don’t have to set up the workspace and build the code (then delete the source) on each of the robots. How is this generally handled to allow the “deployment” process to scale up?
By the way, I know how to deploy a ROS application with Docker. I just want to explore if there is any “native” way to achieve the the same goal.
AFAIK the install folder should be transferable if the other robots have the same FS layout, OS version and hardware.
You will also need to call rosdep to install the dependencies if there were any new ones between the deployments. I tested that it also works from install space:
Other than that, you can also have a look at the bloom tool to build .deb packages and distribute those afterwards. But that would install the workspace into /opt/ros/${ROS_DISTRO}.
Yes, it’s safe to copy the install folder, under the condition that the consumers also have the same dependencies installed. If you properly declare you dependencies in your package.xml, then this makes it easy to distribute.
I have copied the install folder in a docker environment to install only the binaries and leave source code behind in a build layer to a deploy layer.
While building debians with bloom is great and standard ROS practice, it requires more infrastructure to maintain than just copying the entire install tree.
The by far best solution to deploy ROS based Software is to use a proper embedded linux like yocto and create an image / distro. That of course only if you intent to create a real product, not some “toy” project. Just my 2 cents.