<?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: Yasiru Fernando</title>
    <description>The latest articles on DEV Community by Yasiru Fernando (@yasirurf).</description>
    <link>https://dev.to/yasirurf</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%2F4133758%2Fbc0843d1-19f2-4f0f-aeed-a819e96f02ab.jpg</url>
      <title>DEV Community: Yasiru Fernando</title>
      <link>https://dev.to/yasirurf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yasirurf"/>
    <language>en</language>
    <item>
      <title>Before You Move the Robot, Prove You’re Talking to the Right Robot</title>
      <dc:creator>Yasiru Fernando</dc:creator>
      <pubDate>Sun, 20 Sep 2026 06:40:52 +0000</pubDate>
      <link>https://dev.to/yasirurf/before-you-move-the-robot-prove-youre-talking-to-the-right-robot-4b3o</link>
      <guid>https://dev.to/yasirurf/before-you-move-the-robot-prove-youre-talking-to-the-right-robot-4b3o</guid>
      <description>&lt;p&gt;Recently, I was asked a pretty simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What would you check before sending the first movement command to a Dobot Magician running through ROS 2?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Since I've worked with the Dobot Magician myself, I've started thinking about the checks I normally do before letting the robot move.&lt;/p&gt;

&lt;p&gt;Is the build correct?&lt;br&gt;
Is the right port connected?&lt;br&gt;
Are all the nodes running?&lt;br&gt;
Is the robot publishing what it should?&lt;br&gt;
Did any node die during startup?&lt;br&gt;
Is the homing configuration correct?&lt;/p&gt;

&lt;p&gt;For smaller ROS 2 projects, I also find &lt;code&gt;rqt_graph&lt;/code&gt; really useful for quickly checking that everything is connected as expected.&lt;/p&gt;

&lt;p&gt;The more I thought about the question, though, the more I realised that this isn't really just a Dobot problem. It's a much bigger question when software, especially AI-driven software, starts interacting with physical hardware.&lt;/p&gt;
&lt;h2&gt;
  
  
  Start with the system, not the movement
&lt;/h2&gt;

&lt;p&gt;When working with a physical robot, I don't think the first question should be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What command should I send?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It should be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"What do I actually know about the system right now?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For one of my Dobot setups, I'd want to establish a few things before sending a movement command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The expected software build is running.&lt;/li&gt;
&lt;li&gt;The correct device is connected.&lt;/li&gt;
&lt;li&gt;The expected serial port is being used.&lt;/li&gt;
&lt;li&gt;The required ROS 2 nodes are alive.&lt;/li&gt;
&lt;li&gt;The expected topics and services are available.&lt;/li&gt;
&lt;li&gt;The configuration matches what was tested.&lt;/li&gt;
&lt;li&gt;The homing configuration is correct.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most of these checks don't require the robot to move at all. And that's important.&lt;/p&gt;

&lt;p&gt;There is a difference between checking what the software thinks is happening and actually making the robot do something.&lt;/p&gt;
&lt;h2&gt;
  
  
  Homing is one of the first things I'd test
&lt;/h2&gt;

&lt;p&gt;One of the tests I commonly use with the Dobot is homing using a predefined configuration.&lt;/p&gt;

&lt;p&gt;In my ROS setup, I use a separate service for the homing sequence, with limits set by the Dobot Magician API. Depending on how the nodes are implemented, homing can also be useful for re-evaluating the reported joint angles afterwards.&lt;/p&gt;

&lt;p&gt;But there are still two separate things happening here. First, I can inspect the homing configuration and ensure the recipe is correct. Then I can actually run it on the robot. &lt;/p&gt;

&lt;p&gt;Those are not the same test.&lt;/p&gt;

&lt;p&gt;I can verify the recipe without proving anything about the physical movement. So I think of it as:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Validate the recipe first. Then, validate the execution.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  A healthy ROS 2 graph doesn't necessarily mean a healthy robot
&lt;/h2&gt;

&lt;p&gt;This was probably the part that made me think about the problem more deeply.&lt;/p&gt;

&lt;p&gt;Imagine running:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;ros2 node list
ros2 topic list
ros2 service list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Everything looks normal.&lt;/p&gt;

&lt;p&gt;Your nodes are running, the expected topics exist, the launch file completed successfully, and nothing appears to have crashed.&lt;/p&gt;

&lt;p&gt;It would be very easy to think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"We're good to go."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;But what have you actually proved? You've proved that the software environment looks right. You haven't necessarily proved that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The correct physical robot is connected;&lt;/li&gt;
&lt;li&gt;The correct serial device is being used;&lt;/li&gt;
&lt;li&gt;The robot is in the state you expect;&lt;/li&gt;
&lt;li&gt;The calibration is correct;&lt;/li&gt;
&lt;li&gt;The physical setup matches your assumptions.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's an important distinction.&lt;/p&gt;

&lt;h2&gt;
  
  
  I tend to think about it in three layers
&lt;/h2&gt;

&lt;p&gt;When I think about validating a robotic system, I find it useful to separate things into three layers.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Software
&lt;/h3&gt;

&lt;p&gt;First, check the software itself.&lt;/p&gt;

&lt;p&gt;Things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;ROS 2 distribution&lt;/li&gt;
&lt;li&gt;package/build version&lt;/li&gt;
&lt;li&gt;launch files&lt;/li&gt;
&lt;li&gt;nodes&lt;/li&gt;
&lt;li&gt;topics&lt;/li&gt;
&lt;li&gt;services&lt;/li&gt;
&lt;li&gt;parameters&lt;/li&gt;
&lt;li&gt;configuration files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The question here is:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the software match what I intended to run?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Integration
&lt;/h3&gt;

&lt;p&gt;Then look at the connection between the software and the robot.&lt;/p&gt;

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

&lt;ul&gt;
&lt;li&gt;Is the expected serial device connected?&lt;/li&gt;
&lt;li&gt;Is the correct port being used?&lt;/li&gt;
&lt;li&gt;Is the robot interface available?&lt;/li&gt;
&lt;li&gt;Are the expected publishers present?&lt;/li&gt;
&lt;li&gt;Are the required services available?&lt;/li&gt;
&lt;li&gt;Is the calibration/configuration what I expect?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now the question becomes:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the software appear to be connected to the hardware? I think it is?&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Physical execution
&lt;/h3&gt;

&lt;p&gt;Only after that do we get to the actual movement. This is where I'd test things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Does homing behave as expected?&lt;/li&gt;
&lt;li&gt;Do the joints move correctly?&lt;/li&gt;
&lt;li&gt;Does a Cartesian command produce the expected movement?&lt;/li&gt;
&lt;li&gt;Does the physical distance match what the software expects?&lt;/li&gt;
&lt;li&gt;Are there unexpected movements?&lt;/li&gt;
&lt;li&gt;Are the workspace boundaries respected?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And this is where an important distinction comes in:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Passing the first two layers doesn't automatically prove the third.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I like Cartesian tests
&lt;/h2&gt;

&lt;p&gt;Once I get to physical testing, I particularly like using Cartesian movement for validation. With a joint command, I know that I asked a particular joint to move.&lt;/p&gt;

&lt;p&gt;With a Cartesian command, I have a physical position to reason about. For example, if I command a known displacement, I can compare what the software asked the robot to do with what actually happened in physical space.&lt;/p&gt;

&lt;p&gt;So you get something like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Command
   ↓
Robot state
   ↓
Physical movement
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That gives you another independent way of checking whether your assumptions match reality. Of course, successfully testing one movement doesn't prove that every possible movement is safe.&lt;/p&gt;

&lt;p&gt;It just gives you evidence about that particular test. And that's really the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Then AI enters the picture
&lt;/h2&gt;

&lt;p&gt;This becomes much more interesting when an AI agent is involved.&lt;/p&gt;

&lt;p&gt;Imagine an AI agent that can inspect your ROS 2 workspace, read configuration files, launch nodes, analyse logs and eventually send commands to the robot.&lt;/p&gt;

&lt;p&gt;The workflow could easily become:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AI checks the system
      ↓
AI decides everything looks good.
      ↓
AI sends a command
      ↓
Robot moves
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;But there is a missing question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What evidence should allow the AI to cross the boundary between observing the system and physically acting on it?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An AI's ability to generate a valid ROS command doesn't necessarily mean it should be granted permission to execute it. For example, I can imagine an AI being allowed to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;inspect the ROS graph;&lt;/li&gt;
&lt;li&gt;read configuration;&lt;/li&gt;
&lt;li&gt;analyse logs;&lt;/li&gt;
&lt;li&gt;compare expected and actual interfaces;&lt;/li&gt;
&lt;li&gt;identify missing dependencies;&lt;/li&gt;
&lt;li&gt;prepare a movement command;&lt;/li&gt;
&lt;li&gt;propose a test.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Physical execution can then sit behind another boundary where additional checks or human confirmation are required.&lt;/p&gt;

&lt;p&gt;That separation becomes pretty important once software is no longer just producing text or code, but controlling something that can physically move.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't claim more than you tested
&lt;/h2&gt;

&lt;p&gt;This is probably the biggest lesson I took from the whole discussion.&lt;/p&gt;

&lt;p&gt;If I verify that the expected ROS 2 nodes are running, then that's what I've verified.&lt;/p&gt;

&lt;p&gt;I shouldn't turn that into:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"The robot is safe."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I successfully run a homing sequence, I've tested that particular sequence on that particular setup. That doesn't mean every future movement is safe.&lt;/p&gt;

&lt;p&gt;And if I test one Cartesian movement and measure the result, I've gathered evidence about that movement. I haven't validated the entire workspace.&lt;/p&gt;

&lt;p&gt;I think it's surprisingly easy to blur these boundaries when developing robotics software, especially when everything appears to be working.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what should happen before the next action?
&lt;/h2&gt;

&lt;p&gt;I've started thinking about robotic validation less as:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Is the robot safe?"&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;blockquote&gt;
&lt;p&gt;"What have I actually verified, and what does that evidence allow me to do next?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;If I've only verified the software configuration, I shouldn't treat it as evidence of physical movement.&lt;/p&gt;

&lt;p&gt;If I've verified the software-to-hardware connection, I can move on to a controlled physical test.&lt;/p&gt;

&lt;p&gt;If I've physically tested a particular movement, I have evidence for that movement, not necessarily everything else.&lt;/p&gt;

&lt;p&gt;Every step should be based on something we've actually established rather than an assumption that happened to be true during the previous test. And I think this will become increasingly important as AI moves from helping us write robotics software to actually operating robots.&lt;/p&gt;

&lt;p&gt;The robot doesn't care how confident the software sounds. It only responds to what we actually told it to do.&lt;/p&gt;

</description>
      <category>robotics</category>
      <category>ai</category>
      <category>ros2</category>
      <category>software</category>
    </item>
  </channel>
</rss>
