<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shreyansh Chauhan</title>
    <description>The latest articles on DEV Community by Shreyansh Chauhan (@cshraiyansh).</description>
    <link>https://dev.to/cshraiyansh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4159751%2Fff26806f-fc0a-4992-8d5c-c37fa6298578.jpeg</url>
      <title>DEV Community: Shreyansh Chauhan</title>
      <link>https://dev.to/cshraiyansh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cshraiyansh"/>
    <language>en</language>
    <item>
      <title>RoboDoctor: A Local AI Debugging Companion for Robotics</title>
      <dc:creator>Shreyansh Chauhan</dc:creator>
      <pubDate>Sun, 04 Oct 2026 13:27:57 +0000</pubDate>
      <link>https://dev.to/cshraiyansh/robodoctor-a-local-ai-debugging-companion-for-robotics-89m</link>
      <guid>https://dev.to/cshraiyansh/robodoctor-a-local-ai-debugging-companion-for-robotics-89m</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgd2w8ekt1eeohh8k3v60.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgd2w8ekt1eeohh8k3v60.png" alt=" " width="800" height="410"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;Debugging robotics software has a particular kind of pain.&lt;br&gt;
You don't just have one terminal.&lt;br&gt;
You might have a ROS2 launch running in one terminal, a controller in another, a sensor node somewhere else, RViz open on the side, and a Python script running in another window.&lt;br&gt;
Then something breaks.&lt;br&gt;
You get a wall of logs, a stack trace, or a ROS2 error, and the real question becomes:&lt;br&gt;
"Okay... but why did it actually break?"&lt;br&gt;
I built RoboDoctor for a friend who works with robotics and spends far too much time chasing these errors across terminals.&lt;br&gt;
RoboDoctor is a local AI debugging companion that sits quietly on the desktop until something goes wrong.&lt;br&gt;
It can monitor multiple RoboDoctor-managed terminal sessions, detect failed commands, associate an error with the correct terminal/session, and surface the problem through a small desktop robot companion.&lt;br&gt;
When I double-click the robot, it takes me directly to the problematic session and starts an investigation.&lt;br&gt;
Instead of simply sending the error message to an LLM, RoboDoctor can gather additional diagnostic evidence through its own restricted diagnostic terminal and give that context to Gemma 3 4B running locally through Ollama.&lt;br&gt;
The goal is simple:&lt;br&gt;
Don't make the developer hunt for the error. Bring the solution to the developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/05caVysqXt8" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
Here you can watch how the whole code works!&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;The complete project is open source:&lt;br&gt;
GitHub: &lt;a href="https://github.com/Shreyansh08-bit/RoboDoctor.git" rel="noopener noreferrer"&gt;https://github.com/Shreyansh08-bit/RoboDoctor.git&lt;/a&gt;&lt;br&gt;
The repository contains the backend, frontend, desktop companion, diagnostic logic, examples, tests, and startup scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  ## How I Built It
&lt;/h2&gt;

&lt;p&gt;RoboDoctor is built around a simple idea:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;the AI shouldn't be the entire application.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Gemma is the reasoning layer inside a larger debugging system.&lt;/p&gt;

&lt;p&gt;The architecture looks roughly like this:&lt;/p&gt;

&lt;p&gt;Developer Terminals&lt;br&gt;
↓&lt;br&gt;
Terminal Session Manager&lt;br&gt;
↓&lt;br&gt;
Execution + Error Detection&lt;br&gt;
↓&lt;br&gt;
Diagnostic Blackboard&lt;br&gt;
↓&lt;br&gt;
Deterministic Diagnostics&lt;br&gt;
↓&lt;br&gt;
Gemma 3 4B&lt;br&gt;
↓&lt;br&gt;
Diagnostic Investigation&lt;br&gt;
↓&lt;br&gt;
Diagnosis&lt;br&gt;
↓&lt;br&gt;
RoboDoctor Companion&lt;/p&gt;

&lt;h3&gt;
  
  
  Multi-terminal debugging
&lt;/h3&gt;

&lt;p&gt;Robotics development rarely happens in one terminal.&lt;/p&gt;

&lt;p&gt;RoboDoctor therefore treats every managed terminal as an independent session.&lt;/p&gt;

&lt;p&gt;Each session tracks information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;command&lt;/li&gt;
&lt;li&gt;working directory&lt;/li&gt;
&lt;li&gt;stdout/stderr&lt;/li&gt;
&lt;li&gt;exit code&lt;/li&gt;
&lt;li&gt;execution sequence&lt;/li&gt;
&lt;li&gt;ROS2 environment&lt;/li&gt;
&lt;li&gt;current issue state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means an error in Terminal 3 does not accidentally become the diagnosis for Terminal 1.&lt;/p&gt;

&lt;h3&gt;
  
  
  Automatic error detection
&lt;/h3&gt;

&lt;p&gt;The developer does not have to copy an error and paste it into a chatbot.&lt;/p&gt;

&lt;p&gt;When a command fails inside a RoboDoctor-managed terminal, RoboDoctor captures the execution context automatically.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;ros2 run my_robot controller&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;might return:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Package 'my_robot' not found&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;RoboDoctor associates that failure with the correct terminal session and marks it as needing attention.&lt;/p&gt;

&lt;h3&gt;
  
  
  The desktop companion
&lt;/h3&gt;

&lt;p&gt;The floating robot is the entry point to the debugging workflow.&lt;/p&gt;

&lt;p&gt;It has different states depending on what is happening:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Idle&lt;/li&gt;
&lt;li&gt;Healthy&lt;/li&gt;
&lt;li&gt;Needs attention&lt;/li&gt;
&lt;li&gt;Investigating&lt;/li&gt;
&lt;li&gt;Diagnosis ready&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If multiple sessions have problems, RoboDoctor keeps those issues separate so the developer can choose which one to investigate.&lt;/p&gt;

&lt;p&gt;Double-clicking the companion takes the developer directly into the relevant debugging workflow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Diagnostic Blackboard
&lt;/h3&gt;

&lt;p&gt;Between terminal activity and the AI is a lightweight diagnostic state layer.&lt;/p&gt;

&lt;p&gt;It keeps track of:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;active sessions&lt;/li&gt;
&lt;li&gt;executions&lt;/li&gt;
&lt;li&gt;errors&lt;/li&gt;
&lt;li&gt;evidence&lt;/li&gt;
&lt;li&gt;investigation state&lt;/li&gt;
&lt;li&gt;diagnoses&lt;/li&gt;
&lt;li&gt;confidence&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This prevents stale errors or example data from becoming the context for a new failure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Gemma
&lt;/h3&gt;

&lt;p&gt;The reasoning layer uses &lt;strong&gt;Gemma 3 4B&lt;/strong&gt;, running locally through &lt;strong&gt;Ollama&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of sending terminal information to a remote API, the core reasoning loop can run locally:&lt;/p&gt;

&lt;p&gt;Developer terminal&lt;br&gt;
↓&lt;br&gt;
RoboDoctor&lt;br&gt;
↓&lt;br&gt;
Local Gemma&lt;br&gt;
↓&lt;br&gt;
Diagnosis&lt;/p&gt;

&lt;p&gt;Gemma receives structured debugging context rather than an unstructured dump of the entire machine.&lt;/p&gt;

&lt;h3&gt;
  
  
  Diagnostic investigation
&lt;/h3&gt;

&lt;p&gt;RoboDoctor can go beyond simply repeating the error message.&lt;/p&gt;

&lt;p&gt;When the developer opens an issue, a separate diagnostic session can gather additional read-only evidence.&lt;/p&gt;

&lt;p&gt;For example, for a ROS2 problem it can investigate information such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;installed ROS2 packages&lt;/li&gt;
&lt;li&gt;active nodes&lt;/li&gt;
&lt;li&gt;topics&lt;/li&gt;
&lt;li&gt;services&lt;/li&gt;
&lt;li&gt;ROS2 environment&lt;/li&gt;
&lt;li&gt;package visibility&lt;/li&gt;
&lt;li&gt;Python environment&lt;/li&gt;
&lt;li&gt;Git state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That evidence is then provided to Gemma so it can reason about the likely root cause.&lt;/p&gt;

&lt;p&gt;The diagnostic terminal is deliberately restricted.&lt;/p&gt;

&lt;p&gt;Gemma is not given unrestricted shell access, and RoboDoctor does not automatically modify source code or install packages.&lt;/p&gt;

&lt;p&gt;The AI investigates.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The developer stays in control.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;For RoboDoctor, using an open-weight model locally isn't just a challenge requirement. It changes what the product can be.&lt;/p&gt;

&lt;p&gt;A robotics debugging tool can encounter information that developers may not want to send to a remote service:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;source paths&lt;/li&gt;
&lt;li&gt;terminal output&lt;/li&gt;
&lt;li&gt;ROS2 environments&lt;/li&gt;
&lt;li&gt;package names&lt;/li&gt;
&lt;li&gt;hardware configuration&lt;/li&gt;
&lt;li&gt;network information&lt;/li&gt;
&lt;li&gt;internal project details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With Gemma running locally through Ollama, the core debugging context can remain on the developer's machine.&lt;/p&gt;

&lt;p&gt;There is also no requirement for a paid cloud AI API for the core reasoning loop.&lt;/p&gt;

&lt;p&gt;The architecture becomes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;local terminal → local diagnostics → local model → local diagnosis&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That makes a local-first debugging companion much more practical for development environments where privacy, connectivity, or API cost matters.&lt;/p&gt;

&lt;p&gt;More importantly, Gemma becomes a component that I can build a complete system around rather than the entire product.&lt;/p&gt;

&lt;p&gt;The terminal/session system, diagnostic blackboard, deterministic detectors, investigation loop, safety controls, and desktop companion are all part of the application surrounding the model.&lt;/p&gt;

&lt;p&gt;That's what open innovation made interesting for this project:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The model becomes a component you can build around, rather than a service your entire product depends on.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Best Use of Gemma
&lt;/h3&gt;

&lt;p&gt;RoboDoctor is entering the &lt;strong&gt;Best Use of Gemma&lt;/strong&gt; category.&lt;/p&gt;

&lt;p&gt;Gemma 3 4B is not being used as a generic chatbot. It is the local reasoning engine inside a real debugging workflow.&lt;/p&gt;

&lt;p&gt;RoboDoctor automatically captures terminal failures, structures the evidence, investigates the relevant environment through a restricted diagnostic terminal, and provides that evidence to Gemma for root-cause reasoning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thought
&lt;/h2&gt;

&lt;p&gt;I wanted RoboDoctor to feel less like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Paste your error here and I'll explain it."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and more like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"Something broke. I found it. Let me figure out why. Will look inside your system and give you exact solution&lt;a href="https://dev.tourl"&gt;&lt;/a&gt;"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;That's RoboDoctor.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
