Template repository to quickly create new Docker-based ROS repositories for USC RoboSub
This template provides a standardized Docker setup for ROS Noetic projects following USC RoboSub conventions.
- 🐳 Docker containerization with ROS Noetic base
- 🚀 Docker Compose for easy container management
- 🔧 Pre-configured catkin workspace ready for ROS packages
- 📦 GitHub Actions for automated Docker image publishing
- 🎯 ARM64 support for Jetson platforms
- 🔒 SSH and Git integration for private repositories
- Docker and Docker Compose installed
- Git configured on your host machine
-
Create a new repository from this template on GitHub
-
Clone your new repository:
git clone https://github.com/usc-robosub/your-repo-name.git cd your-repo-name -
Customize the template:
- Replace
template-repowith your project name in:Dockerfiledocker-compose.ymlentrypoint.sh.github/workflows/docker-publish.yml
- Replace
-
Build and run:
docker-compose up --build
-
Start the container:
docker-compose up -d
-
Access the container:
docker exec -it template-repo bash -
Add your ROS packages to
catkin_ws/src/ -
Build your workspace:
cd /opt/template-repo/catkin_ws catkin_make source devel/setup.bash
-
Test with the example package:
# In one terminal (inside container): roscore # In another terminal (inside container): rosrun example_package example_node.py # Or use the launch file: roslaunch example_package example.launch
/opt/template-repo/
├── catkin_ws/ # ROS workspace
│ ├── src/ # Your ROS packages go here
│ │ └── example_package/ # Example package (remove for actual projects)
│ ├── build/ # Build artifacts (gitignored)
│ └── devel/ # Development space (gitignored)
├── entrypoint.sh # Container startup script
└── ... # Other project files
When using this template for a new project:
- Update project name in all configuration files
- Modify Dockerfile to add project-specific dependencies
- Update entrypoint.sh for custom initialization
- Configure docker-compose.yml volumes and environment as needed
The included workflow automatically builds and publishes Docker images to GitHub Container Registry when changes are pushed to the main branch. Images are built for ARM64 architecture (Jetson compatibility).
Follow USC RoboSub coding standards and ensure all changes are tested in the Docker environment before submitting pull requests.