Robotics reference architecture¶
This page outlines the reference architecture of the Canonical robotics stack, detailing the essential components and their roles across development, deployment, and observability phases of a robot development.
Note
This document is intended for developers and engineers working with the Canonical robotics stack, including those involved in the development, packaging, deployment and observability of ROS snap applications. It provides a high-level overview of the architecture and its components, serving as a guide for understanding how they interact within the ecosystem.
Canonical Robotics Stack Overview¶
The Canonical robotics stack streamlines the lifecycle of robotics applications through the following key phases:
Development and Packaging: Developers use Snapcraft to create and package robotics applications into secure, portable snaps, tested in isolated LXD containers.
Distribution: Packaged snaps are uploaded to the Snap Store, serving as the central repository for robot devices and observability systems.
Deployment and Operations: Applications and observability agents run on Ubuntu Core-based robot devices, ensuring a reliable and secure runtime environment.
Observability and Monitoring: The Canonical Observability Stack (COS), managed by Juju, collects and visualizes performance data from robots, enabling effective monitoring and troubleshooting.
Development Phase¶
Snapcraft: The tool used to package applications into snaps. Developers use it to create confined, secure, and portable packages.
LXD Containers: Lightweight containers used to test applications in isolated environments before deployment.
Colcon in-container:
colcon
extension to build, test and release inside a fresh and isolated ROS environment and transfer the results back to the host.
Packaging and Publishing¶
Snap Store: The centralized repository for distributing snaps. Once your ROS apps are packaged with Snapcraft, they are uploaded here. This store serves both the robot devices and the observability stack.
Robot Device (Running Ubuntu Core)¶
Ubuntu Core: A minimal, immutable version of Ubuntu tailored for embedded and IoT devices. It serves as the base OS on the robot.
ROS Snaps: Applications and libraries using the Robot Operating System (ROS), delivered as snaps and running directly on the robot.
Observability Agent Snaps: Monitoring agents also packaged as snaps, deployed on the robot to collect metrics and logs for observability.
Canonical Observability Stack (COS)¶
Important
We have implemented an observability stack (COS for robotics) purposefully for ROS snap applications.
Tutorials can be found in the observability section.
How-to guides for customization can be found in the COS for robotics section.
COS Lite: A set of Juju-managed applications (charms) that provide metrics, logging, and tracing capabilities. It collects and displays data from observability agents running on robots.
Juju: The orchestration engine used to deploy and manage the COS services.
COS Charms: Deployed from Charmhub, these include components like Prometheus, Loki and Grafana. They are deployed on a Kubernetes (k8s) cluster to provide observability infrastructure.
Summary of the entire workflow¶
Developers write and package applications using Snapcraft.
The snaps are uploaded to the Snap Store.
The robot devices fetch ROS snaps and observability agents from the Snap Store.
Observability data is sent to the COS Server, which is deployed via charms from Charmhub.
Juju orchestrates and manages both the robot-side observability agents and the COS backend services.
Conclusion¶
This stack ensures a fully integrated workflow for development, deployment, and monitoring of robotics applications, leveraging Canonical’s ecosystem of snaps, Juju, and Ubuntu Core.