Skip to content

Tom-Notch/ROS-Repository-Template

Repository files navigation

New Docker Repository

pre-commit Continuous Integration

This template uses Docker for easy deployment and testing. It also includes GitHub Actions for CI/CD.

Dependencies

Usage Guidelines

Base Repo

  1. Change LICENSE if necessary

  2. Modify .pre-commit-config.yaml according to your need

  3. Modify/add GitHub workflow status badges in README.md

Docker Config

  1. Modify DOCKER_USER, IMAGE_NAME in .env

  2. Modify the service name from default to your service name in docker-compose.yml

  3. Update Dockerfile

    • Your Docker image must contain a complete ROS installation as the ROS node will run inside the container
  4. build.sh to build and test the image locally in your machine's architecture

  5. push.sh to push the multi-arch image to the registry

ROS Config

The template ROS package has both C++ and Python entrypoints. You can modify the package to suit your needs.

  1. 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:

    1. package.xml
    2. CMakeLists.txt
    3. setup.py
    4. Python sources under scripts and src (both under the package directory)
    5. C++ sources under include and src (both under the package directory)
    6. launch files
    7. shell script launch.sh to launch docker container and the ROS node
  2. 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:

    1. package directory
    2. Python library directory under src
    3. C++ library directory under include
  3. Update name of launch files and their content, modify launch.sh accordingly since this will be the entry point of the ROS node from outside the container

  4. Update name of ROS msg/action/srv files and update them in the corresponding CMakeLists.txt, C++, and Python source files

  5. Update the package dependencies in package.xml and CMakeLists.txt

  6. Find all occurrences of new_project namespace in C++ source files and replace them with your project name

  7. Update ROS_MASTER_URI and ROS_IP in .env

Developer Quick Start

Note

  • 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

About

Template for creating new ROS repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published