Menu

Robotics · Cloud · Software

Building AI-Powered Realtime Systems

Why Cloud Run Was the Right Choice for TerraScanAI

By Sebastian Rychlik · Published

  • TerraScanAI
  • Google Cloud Run
  • Angular
  • Spring Boot
  • Vertex AI
  • NVIDIA Jetson
  • LiDAR
  • Robotics
TerraScanAI illustration: the robotic platform with LiDAR and camera, a Cloud Run cloud with Spring Boot, Vertex AI, Firestore, Artifact Registry and IAM, and the Angular Mission Control dashboard, with a black cat lying in front

When I started building TerraScanAI, I wasn’t really starting from scratch.

Looking back, it feels more like a natural continuation of a journey that began with ASIC and SoC design, continued through FPGA-based telecom systems, embedded software, enterprise web applications, cloud-native platforms, and eventually arrived at AI-powered realtime systems.

The funny part?

After more than two decades of working with increasingly complex technologies, one of the first practical goals of the entire platform was surprisingly simple:

Find and recognize cats in my garden.

At first glance, recognizing a cat in a garden sounds like a relatively simple computer vision problem.

Point a camera at the scene, run an object detection model, draw a bounding box around the cat and call it a day.

Reality turned out to be slightly more complicated.

  • Cats move.
  • Lighting changes.
  • Vegetation creates false positives.
  • The robot itself moves.
  • A single camera often doesn’t provide enough context.

As it turned out, building the AI model was only a small part of the challenge.

Understanding where the cat was, what surrounded it, how the robot should react, and how all of this could be visualized and managed remotely turned out to be a much more interesting systems engineering problem.

Very quickly, what started as a “cat detection project” evolved into a much broader engineering challenge:

How do we build a system capable of collecting data from multiple sensors, processing it in realtime, enriching it with AI models, and presenting meaningful information to a human operator?

Why I Built the Robot

At some point I realized that building software alone was no longer enough.

Real engineering problems rarely exist in isolation.

They emerge when software meets hardware, unreliable environments, physical movement, sensors, networks and real-world constraints.

That was one of the reasons I decided to build the robotic platform itself rather than simulate everything in software.

Nothing generates better engineering lessons than a system that has to operate in the real world.

TerraScanAI Architecture

TerraScanAI is an ongoing engineering project exploring how modern cloud-native software, AI and robotics can be combined into a practical realtime system.

The platform is still evolving.

Some components are already operational, while others are actively being designed, implemented and tested.

The current architecture revolves around three major layers.

1. Edge Layer

An NVIDIA Jetson computer integrates:

  • Livox LiDAR
  • OAK-D Pro AI Camera
  • Telemetry Subsystems
  • Motor Controllers

This is where sensor acquisition, edge processing and low-latency decision making happen.

2. Cloud Layer

Running on Google Cloud:

  • Cloud Run
  • Spring Boot
  • Vertex AI
  • Datastore / Firestore
  • Artifact Registry

This layer provides storage, analytics, model management and remote access capabilities.

3. Mission Control Layer

An Angular-based Mission Control dashboard visualizes:

  • Telemetry
  • AI detections
  • Maps
  • Camera feeds
  • Point cloud data

all in realtime through a browser.

Architecture Overview

TerraScanAI architecture overview: the edge and rover layer (NVIDIA Jetson, Livox LiDAR, OAK-D Pro camera, telemetry subsystems, motor controllers) sends LiDAR, telemetry, AI detections and commands to the Cloud Run layer (Spring Boot, Vertex AI, Datastore/Firestore, Artifact Registry, IAM), which feeds the Angular Mission Control dashboard via SSE, WebSocket and REST API
TerraScanAI architecture overview.

Why Not Kubernetes?

As the platform evolved, it became clear that the cloud layer would play a critical role.

Telemetry streams, mission data, AI inference results, model management, dataset exports and remote access all needed a reliable backend infrastructure.

My first instinct was Kubernetes.

After all, Kubernetes has become the default answer for many modern cloud architectures.

But the more I analyzed the actual requirements, the more I realized I was about to solve a relatively small problem with a very large solution.

What Was the Real Goal?

The primary goal of TerraScanAI was not to build cloud infrastructure.

The primary goal was to build an AI-powered realtime system.

Every hour spent managing:

  • clusters
  • node pools
  • upgrades
  • networking rules
  • infrastructure maintenance

would be an hour not spent improving:

  • robotics
  • telemetry
  • computer vision
  • operator experience

That realization significantly changed the architecture discussion.

Angular and Realtime Operations

The operator dashboard was another important factor.

The platform relies heavily on realtime interaction between the browser and the backend.

Examples include:

  • Telemetry updates
  • Mission state changes
  • AI detections
  • Camera feeds
  • Point cloud visualizations

Angular proved to be an excellent fit for this type of reactive architecture.

Combined with RxJS and streaming-based communication patterns, it allows large amounts of realtime data to be represented in a predictable and maintainable way.

For systems where the user interface becomes part of the operational workflow, responsiveness and predictability matter just as much as backend scalability.

Why Cloud Run Won

In the end, Cloud Run delivered exactly what the project needed:

  • Simple deployments
  • Automatic scaling
  • Low operational overhead
  • Pay-for-use economics
  • Tight integration with the broader Google Cloud ecosystem

Most importantly, it allowed me to focus on building the actual system rather than managing the infrastructure behind it.

And that turned out to be one of the most valuable architectural decisions made during the project.

What’s Next?

In future articles I’ll dive deeper into some of the challenges behind TerraScanAI, including:

  • Realtime Telemetry
  • Angular Mission Control
  • LiDAR Processing
  • Vertex AI Training Pipelines
  • Sensor Fusion
  • Autonomous Decision-Making

The cats, unfortunately, still refuse to cooperate with the testing process.

Comparison of three detections of a decorative vase: YOLOv4 Tiny COCO labels it a cat with 78%, YOLOv8 trained on 17 images detects a vase with 0.36, YOLOv8 trained on 42 images detects a vase with 0.84

Robotics · Software · Cloud

What Matters More: The Model or The Data?

My First Lessons From Training AI Models for a Real Robot

Training YOLOv8 for the TerraScanAI robot to recognize a decorative vase: expanding a custom dataset from 17 to 42 images mattered more than the model change. Notes on data, pipeline and Vertex AI runs.

Read Article →

Screenshot from the OAK-D Pro camera: a decorative flower pot is labelled "cat 78%" with a green bounding box, while a real cat sits unlabelled in the lower right corner

Robotics · Software

When AI Mistakes a Flower Pot for a Cat

From YOLOv4 Tiny to YOLOv8 and Custom AI Training

One of the first AI models on the TerraScanAI robotics platform confidently labelled a flower pot as a cat and ignored the real one. Why better data, not just a different model, is the next step.

Read Article →