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

Add ROS2 Rust Development Environment and Supporting Scripts #435

Closed
wants to merge 9 commits into from

Conversation

roboticswithjulia
Copy link

@roboticswithjulia roboticswithjulia commented Nov 24, 2024

Description:

The aim of this PR is to endow the repository with useful tools to work with ROS2 Rust with docker and devcontainers.
This pull request introduces a complete setup for a ROS2 Rust development environment, including Docker configuration, helper scripts, and a development container configuration for VS Code. The added files and their purposes are as follows:

Added Files:

  1. build.sh:
  • Automates the Docker image build process.
  • Builds the ros2_rust:latest image using BuildKit for caching and efficiency.
  1. start.sh:
  • Starts the Docker container for the ROS2 Rust environment.
  • Configures user ID mappings, X11 forwarding for GUI applications, and privileged network access.
  1. shell.sh:
  • Provides an easy way to access an interactive shell within the running container as the user cuser avoiding issues when building using the root user.
  1. README.rst:
  • Detailed documentation for setting up, building, starting, and accessing the Dockerized ROS2 Rust environment.
  1. devcontainer.json:
  • Defines the development container configuration for Visual Studio Code.
  • Enables seamless use of the ROS2 Rust environment with pre-configured settings such as workspace folder, environment variables, and Docker arguments.
  1. Dockerfile:
  • Creating an user in the container to operate as unprivileged.
  • Use the same user to run the docker image.

Key Features:

  1. Dockerized Environment:
  • Encapsulates all dependencies and configurations for working with ROS2 and Rust.
  • Facilitates reproducible builds and consistent development environments.
  1. VS Code Integration:
  • Supports Development Containers via devcontainer.json, allowing developers to use VS Code seamlessly in the containerized environment.
  1. Ease of Use:
  • Scripts ( build.sh , start.sh , shell.sh ) simplify the build, start, and interaction processes with the container.
  1. Cross-Platform Compatibility:
  • X11 forwarding and user ID mapping enable graphical application support and correct permission handling on host systems.

Testing:

  • Ensure the Dockerfile is located as expected (relative to the scripts).
  • Test the build.sh , start.sh , and shell.sh scripts for proper functionality.
  • Verify VS Code development container integration works as intended.

Next Steps:

  • Review the Dockerfile for compatibility with additional ROS2 and Rust versions.
  • Expand the README.rst with troubleshooting tips and customization options.

@roboticswithjulia
Copy link
Author

I think that it is not useful for the community, so will close it then.

@maspe36
Copy link
Collaborator

maspe36 commented Dec 18, 2024

Thank you for your work on this Julia. Sorry for the delay on our end. I wonder if these types of things may actually make more sense in another repo? I'm not sure what rclcpp or rclpy does, or even what we want to do about our repo organization in general.

@roboticswithjulia
Copy link
Author

Hello @maspe36 yes, I think that you are right, better to have here the basic instructions and add this to another repo. Thank you for taking your time to answer even being the PR closed!

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.

2 participants