This template uses Docker for easy deployment and testing. It also includes GitHub Actions for CI/CD.
-
Change LICENSE if necessary
-
Modify .pre-commit-config.yaml according to your need
-
Modify/add GitHub workflow status badges in README.md
-
Modify DOCKER_USER, IMAGE_NAME in .env
-
Modify the service name from default to your service name in docker-compose.yml
-
Update Dockerfile
- Your Docker image must contain a complete ROS installation as the ROS node will run inside the container
-
build.sh to build and test the image locally in your machine's architecture
-
push.sh to push the multi-arch image to the registry
The template ROS package has both C++ and Python entrypoints. You can modify the package to suit your needs.
-
Find all occurrences of new_package in code using your IDE's global search feature and replace them with your new ROS package name, must follow underscore_naming_convention, these include:
- package.xml
- CMakeLists.txt
- Python sources under scripts and src (both under the package directory)
- C++ sources under include and src (both under the package directory)
- launch files
- shell script launch.sh to launch docker container and the ROS node
-
Find all occurrences of new_package or NewPackage in the naming of folders and source files and replace them with your package name, must follow underscore_naming_convention for python files and UpperCamelCase for non-entrypoint C++ files, these include:
- package directory
- Python library directory
- C++ library directory under include
-
Update name of launch files
-
(Optional) In ROS 2 Humble, definitions of msg, action, and srv file have to be put in a dedicated standalone package, otherwise it'll cause conflict with the python portion of new_package, check out this GitHub issue for more info
-
Update the package dependencies in package.xml and CMakeLists.txt
-
Find all occurrences of new_project namespace in C++ source files and replace them with your project name
- Run scripts/dev-setup.sh to setup the development environment
- This template currently only supports docker image for amd64 and arm64, if you want to support other architectures, please modify the build.sh script and docker-compose.yml accordingly