Skip to main content
Anthony Cavin
Data Scientist - ML/AI, Python, TypeScript

A data scientist specializing in machine learning, AI, Python, and TypeScript, with a strong interest in applying these technologies to data-driven projects and innovative AI solutions.

View all authors

How to Store Images in ROS2

· 11 min read
Anthony Cavin
Data Scientist - ML/AI, Python, TypeScript

 

ROS2 is widely used for building robotic systems with sensors like cameras, LiDAR, and IMUs. While it's great for communication (e.g., publishing and subscribing to topics), it lacks a built-in solution for storing large amounts of unstructured data, such as images.

Bag files are commonly used to store data in ROS2, but they aren't a good fit for long-term storage or real-time streaming. They're mainly meant for recording and replaying mission data or episodes, not for managing large volumes of unstructured data.

Addressing this challenge, this blog post will guide you through setting up ROS2 with ReductStore a high-performance storage and streaming solution optimized for unstructured, time-series data.

We will focus specifically on image data, but if you are interested in a more general overview you can read How to Store and Manage Robotic Data which covers the challenges and strategies for storing and managing robotic data in general.

For the full code example, we will be using the reduct-ros-example repository, which provides a complete implementation of the concepts discussed in this article.

How to Choose the Right MQTT Database

· 16 min read
Anthony Cavin
Data Scientist - ML/AI, Python, TypeScript

Photo by Jan Antonin Kolar

Photo by Jan Antonin Kolar on Unsplash.

At a previous company, we used MQTT to send industrial data, such as vibration readings, images and log files. However, maintaining a history of this data proved challenging. Initially, we used a combination of a time-series database and an object store, but we struggled to ingest blob data quickly enough, and the system was difficult to maintain.

To help you avoid a similar experience, this article will recommend the most suitable database for your IoT or Industrial IoT (IIoT) project. We will look at different ways of storing data from IoT devices that communicate with each other via MQTT.

MQTT stands for Message Queuing Telemetry Transport and is a lightweight messaging protocol designed to be efficient, reliable, and scalable, making it ideal for collecting and transmitting data from sensors in real time.

Why is this important when choosing a database?

Well, MQTT is format-agnostic, but it works in a specific way. We should therefore be aware of its architecture, how it works, and its limitations to make the right choice. This is what this article is about, we will try to cut through the fog and explore some key factors to consider when selecting the right option.

Let's get started!

How to Store and Manage ROS Data

· 29 min read
Anthony Cavin
Data Scientist - ML/AI, Python, TypeScript

ROS 2 Data Storage Tutorial

In this tutorial, we will create a custom ROS 2 Humble package called rosbag2reduct that records incoming ROS 2 topics into MCAP bag files on a Raspberry Pi and automatically uploads those files to a ReductStore instance with metadata labels. We'll walk through setting up ROS 2 Humble on the Pi, interfacing a USB camera using the v4l2_camera driver, deploying a lightweight YOLOv5 (nano) object detection node (using ONNX Runtime) to produce detection metadata, and implementing the rosbag2reduct node to capture data and offload it. We will also cover installing ReductStore on the Pi, configuring replication of labeled data to a central storage on your laptop (using label-based filters via the web console). This end-to-end guide is structured with clear steps, code examples, and configuration snippets to help you build and deploy the system.