Alokkumar Rathava

Articles / Engineering

The Robot Said “Connected.” That Wasn't Enough.

What building an Android controller taught me about communication, trust, and the difference between sending a command and controlling a robot.

It Moved. Then the Real Problem Began.

*Building a robotics platform is one thing. Making it understandable, controllable, and accountable to a human is another.*

**Android · Kotlin RobotSDK · WebSockets · ROS 2 · Nav2 · SLAM · Gazebo**

The first milestone felt almost too simple: I could move a robot in Gazebo from my phone.

An input on Android crossed the network, reached the robot runtime, and produced movement in the simulator. For a moment, that looked like the achievement.

Then I started asking questions that had nothing to do with making the robot move.

**Was it connected—or merely showing an old connection state? Had the robot accepted a destination—or actually arrived? What would happen if localization disappeared halfway through a run? Who would stop motion if the operator let go?**

Those questions changed the project.

What began as **RobotNavigation**, a ROS 2 / Nav2 runtime, grew into a companion project, **Robot-Controller**: a real Android operator application backed by a reusable Kotlin SDK. The goal stopped being *“Can the robot navigate?”* and became **“Can a person operate the whole system with confidence?”**

![Video preview: an Android operator view next to a Gazebo robot simulation](/projects/robot-platform/video-poster.jpg)

*The project is simulation-first. The Android screens throughout this article are captures of the implemented application; the robot motion shown in the demo is from Gazebo.*

A robot that moves is a demo. A robot you can operate is a product.

Nav2 already knows how to plan a path. SLAM Toolbox can build maps. AMCL can estimate where a robot is. My job was not to reimplement those tools; it was to turn them into a system someone could actually operate.

The missing part was the experience around them.

A person standing in front of a tablet should not need to understand ROS topics, action servers, lifecycle nodes, or coordinate transforms just to send a robot somewhere. But hiding that complexity entirely would be dangerous, too. An operator needs to know when the robot is ready, what it is doing, and when it cannot safely continue.

That tension drove the interface. The app brings connection, robot status, map context, navigation, manual control, and diagnostics into one place—not as isolated demo buttons, but as stages of an operator's journey.

![Actual Android Robot-Controller dashboard showing robot state, quick actions and diagnostics](/projects/robot-platform/operator-dashboard.png)

*Actual app screen: the dashboard puts readiness and status beside the actions an operator can take. Values shown are the captured development-session state, not product-wide performance statistics.*

The first important decision was where **not** to put the intelligence.

There was an obvious shortcut: let the Android application speak directly to robot internals and teach each screen what a ROS command means.

It might have been faster for one demo. It would also tie the UI to a particular middleware, scatter connection logic across features, and make the next client repeat the same work.

So I drew a line through the system.

On one side is the human-facing Android app. Beneath it is a framework-neutral **Kotlin RobotSDK** responsible for connections, typed commands, acknowledgements, reconnection, and observable state. A versioned **WebSocket gateway** translates those requests into robot-side ROS topics, services, and actions. On the other side, **RobotNavigation** owns autonomy, localization, mapping, and motion safety.

The robot keeps control of the physical consequences. The app requests intent and shows what the robot reports back.

This boundary is the decision I expect to keep even when the simulator is replaced with sensors and motors.

Connecting was not just a technical step. It was the opening scene.

Before a robot can do anything useful, the operator has to know *which* robot is on the other side of the screen.

The Controller includes a discovery screen and a manual connection path. The SDK manages the socket lifecycle and connection states; the interface exposes practical settings for the robot endpoint and gateway authentication. More importantly, a connected screen becomes the starting point for everything that follows.

![Actual Android Robot-Controller discovery screen](/projects/robot-platform/operator-connect.png)

*Actual app screen: robot discovery and connection entry. The repository documents remaining end-to-end discovery hardening work, so a captured screen is not a claim that every network environment has been qualified.*

The next challenge was subtler: a green connection indicator does not mean a robot is ready to navigate. A socket can be alive while data is stale. Nav2 may still be starting. Localization may not be trustworthy.

The solution was to keep **transport connection**, **robot readiness**, and **live telemetry** as separate truths. The SDK can report whether it is connected; the robot runtime determines whether it is prepared to act.

The most dangerous misunderstanding is a successful button press.

Imagine selecting a destination on the tablet. You press *Start Navigation*. A command is sent. The gateway acknowledges it.

It would be easy—and wrong—to treat that acknowledgement as success.

**Accepted is not arrived.**

The SDK assigns commands identifiers and correlates acknowledgements or errors. Meanwhile, navigation progress and robot pose arrive as separate state updates. The interface can therefore distinguish *“your request was received”* from *“the robot reached the destination.”*

![Actual Android navigation screen with map and saved waypoints](/projects/robot-platform/operator-navigation.png)

*Actual app screen: destinations, live map context, localization and docking are visible together. Current ground-navigation commands use **x, y, and yaw**; full six-degree-of-freedom navigation is future work.*

This difference matters beyond the UI. It changes how failures should feel. A rejected goal is not a broken button; it is the system refusing a request it cannot responsibly execute.

Then the map stopped being a background image.

A map looks static in a screenshot. In a running robot, it has a lifecycle.

You create it with SLAM, save it, activate it, relocalize against it, and sometimes switch away from it. Each transition can temporarily invalidate assumptions about where the robot is. The system cannot safely keep following yesterday's plan while today's map is being replaced.

So maps live in persistent runtime storage, outside the source code. Map changes are managed by the robot-side runtime, with navigation holds during transitions and readiness checks before autonomous motion resumes.

During Gazebo validation, an intermediate restart exposed a localization-readiness problem. The system canceled unsafe progress instead of forcing navigation through it. That failure informed a change to recovery behavior during map activation. After correction, the documented restart and map-switch scenarios completed successfully.

I value that moment more than a perfect-looking path animation: **the system was allowed to say “not ready.”**

![Actual Android Map Management screen with occupancy grid and active map](/projects/robot-platform/operator-maps.png)

*Actual app screen: map lifecycle is an operator workflow, not a static drawing. The robot runtime owns map data, localization transitions and navigation admission.*

A stop button is useful. A stop strategy is essential.

Manual control raises a different question. What if the operator releases the control? What if the network goes quiet? What if autonomous navigation is active when manual control takes over?

I did not want the answer to depend on the Android view still being open.

On the robot side, manual and autonomous velocity requests pass through arbitration, smoothing, collision monitoring, and a final software safety supervisor. Dead-man behavior, stale-command checks, map-transition holds, and software emergency-stop gating are part of the runtime rather than decorations on a screen.

![Actual Android Manual Control screen with directional controls and emergency brake](/projects/robot-platform/operator-manual-control.png)

*Actual app screen: motion controls and emergency-brake action. The software E-stop is **not** a substitute for a physical, appropriately engineered emergency-stop circuit.*

This was one of the project's clearest architectural lessons: **the place where a user asks for safety is not necessarily the place where safety must be enforced.**

I needed receipts, not just a working demo.

A smooth video can show that a path was followed once. It cannot prove what happens during a restart, a stale sensor stream, a map switch, or a lost localization estimate.

The RobotNavigation repository's **October 12, 2026** validation record documents **69 passing regression tests and 86 subtests** for the robot-side software. Live Gazebo/WebSocket scenarios also exercised saved-map recovery, manual takeover, cancellation, readiness gating, and safety transitions.

In one recorded scenario, manual control produced **0.376 metres of simulated displacement**. In another, `NavigateToPose` and `NavigateThroughPoses` completed in **1.872 seconds** and **1.984 seconds** respectively. A pending-navigation software E-stop request was acknowledged in **0.111 seconds** during the final safety rerun.

These are observations from specified Gazebo runs—not broad latency guarantees, hardware braking measurements, or evidence that every Android screen has passed full end-to-end acceptance.

The same validation record documents what remains unfinished: broader fault injection, some native shutdown behavior, dedicated collision-boundary scenarios, and independent Android-client acceptance. The Kotlin SDK also has legacy adapter paths that still need feature-by-feature verification.

That does not weaken the story. It tells the reader where the engineering boundary actually is.

What the robot taught me about software.

I started with motion. I ended up thinking about **authority**.

Who is allowed to say the robot is ready? Who knows which map is active? Who decides a goal is complete? Who has the last word on velocity when an operator, navigation stack, and safety system disagree?

The architecture became clearer each time those responsibilities moved to the layer that could truthfully answer them.

Today, this is a **simulation-first mobile robotics software platform**: a real Android operator experience, a reusable Kotlin client SDK, a versioned WebSocket boundary, and a ROS 2/Nav2 runtime exercised in Gazebo. The interface is implemented; the robot runtime has documented simulation validation; physical hardware integration and safety qualification remain future work.

The next chapter is taking that boundary onto an SBC-powered mobile robot, replacing simulated sensors and actuators with real drivers, and extending the platform carefully—not adding complexity just because it looks impressive on a roadmap.

The moment the robot moved was exciting. But the moment it knew when **not** to move is the part I am most proud of.

Watch the system in motion