k8s_ros_sample icon indicating copy to clipboard operation
k8s_ros_sample copied to clipboard

Kuberenetes / ROS&ROS2 Cluster Samples

build-docker-images

ROS Kubernetes / KubeEdge

Abstract

This repository provides tutorials how to use ROS and ROS 2 with Kubernetes and KubeEdge Cluster System. User might need to have knowledge about Kubernetes to understand what is really going on the cluster system.

Motivation

The primary goal for this repository is that everyone can try ROS and ROS 2 with Kubernetes and KubeEdge Cluster. Using container images and container orchestration allows application developer to be agnostic from system platform but only application logic. ROS and ROS 2 provides good isolation between nodes, so that we can take the most advantage of application runtime framework and container orchestration.

To share the information and experience for this can bring more use cases and requirements, so that we can develop more robotics and robot requirements for container orchestration. The concept to bring Cloud Native Container Orchestration to edge IoT devices are already topic and discussed in Kubernetes Edge IoT WG. But key point here is robot and robotics, which can be much more complicated than usual edge IoT devices such as complicated and special devices, hardware acceleration and so on. To break down the requirements for robot and robotics would be very much useful for ROS and ROS 2 user, also Kubernetes container orchestration for edge IoT use cases.

Supported ROS / ROS 2 Distribution

Since Kubernetes uses container images and agnostic from it, any distribution should be supported. But the following is primary supported distribution of ROS and ROS 2.

Cluster System Configuration

We can use either Physical Host System or Virtualized Instance.

  • Host System

This is practical environment for robot and robotics in general. This will set up Kubernetes cluster on host system as followings.

Hostname IP Address OS architecture
tomoyafujita 192.168.1.248 Ubuntu 22.04 (Ubuntu 20.04) amd64
ubuntu 192.168.1.79 Ubuntu 20.04 aarch64 (Raspberry Pi4)
  • Virtualized Instance

This is virtualized Kubernetes cluster environment which can be established on single physical host. We can use this environment if container requires pure computation resource but hardware or physical sensor devices. This environment is very much useful to try or test your container images or services to make sure if those work as expected, and easy to break down whole Kubernetes cluster with one command.

Tutorials

  • Install Kubernetes Packages
  • Build ROS / ROS 2 Full Docker Multi-Arch Images
    • ROS Noetic Container Build
    • ROS Rolling Container Build
  • Setup Kuberenetes Cluster
    • Container Network Interface (CNI)
    • Setup Kubernetes API Server
    • Join Cluster from Worker Node
    • Deploy Container Network Interface
    • Deploy Kubernetes Dashboard
  • Setup KubeEdge Cloud/Edge Node
    • Setup Kubernetes API server
    • Setup KubeEdge Cloudcore and Edgecore
  • Setup Virtualized Kuberenetes Cluster
    • What is Kubernetes IN Docker
    • Single Node Cluster Setup
    • Multiple Nodes Cluster Setup
  • ROS Deployment Demonstration
    • ROS DaemonSet Deployment
    • ROS Multi-Node Deployment
    • ROS Multi-Node Deployment with Host Network
  • ROS 2 Deployment Demonstration
    • ROS 2 Simple Distributed System
    • ROS 2 Localhost Only
    • ROS 2 Logical Partition / Multiple RMW Implementation
  • ROS 2 Deployment Intermediate
    • ROS 2 GUI Display Access
    • ROS 2 Zero Copy Data Sharing
    • ROS 2 Fast-DDS Discovery Server
    • ROS 2 Security Enclaves with ConfigMap
  • Robotics System General
    • Reserve Resources for Host System
    • Assign Resources to Pods/Containers

Slides / Talks

Watch the video

Reference

Author