Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ros-ws extension #297

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

agyoungs
Copy link
Contributor

@agyoungs agyoungs commented Oct 30, 2024

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

@agyoungs agyoungs requested a review from tfoote as a code owner October 30, 2024 23:28
@agyoungs agyoungs marked this pull request as draft October 30, 2024 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant