Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is probably my most used extension (besides the internal ones already provided with rocker). This makes standing up a ROS (todo ROS2) workspace in a clean docker environment. You can target different ROS distros with relative ease. You can specify an existing directory with ROS packages on your system, or a
.workspace
file and this extension will install all the required rosdeps for you. It's a great tool if you're constantly working in ROS1 noetic environments on a modern OS.This PR needs a fair bit of work to clean up before it's ready for serious review, but I wanted to get your feedback first @tfoote. I don't want to put a ton of effort into cleaning this PR up if you have major reservations on this one or if you have an alternative more effective workflow. I recognize this isn't as generic of an extension, so if you feel like it's better as a 3rd party extension, I can release it that way instead.
One oddity that you may notice is that if you specify a local directory, it adds all the relevant ros packages to the build context (so it can build the workspace), however at runtime it mounts the workspace as a volume as well. I've found this useful for my personal use so I don't lose any development work if I shutdown a container I'm actively developing in. I can make some of these things optional, but I probably just need another person's perspective/potential use case.
Note: A design choice I've made is to copy ROS packages into the Docker build context and parse the package.xml files for dependencies. This is not the standard way you would stand up a ROS workspace, but this allows you to specify private repos that require an SSH key since the
docker-py
program doesn't use the BuildKit API that allows for a safe and standard way to forward the SSH agent to the build. An annoyance of this approach is that adding files to the build context can be costly in terms of time (and it's not going to cache until after the files are added and compared). I've managed to