<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Darko Lukić on Medium]]></title>
        <description><![CDATA[Stories by Darko Lukić on Medium]]></description>
        <link>https://medium.com/@lukicdarkoo?source=rss-baf9b3f5b6a0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nMnxJ1YXfUEGVcYZ289tPA.jpeg</url>
            <title>Stories by Darko Lukić on Medium</title>
            <link>https://medium.com/@lukicdarkoo?source=rss-baf9b3f5b6a0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 04:19:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@lukicdarkoo/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Towards Ultimate Guide for Building Modular Mobile Robot]]></title>
            <link>https://medium.com/@lukicdarkoo/towards-ultimate-guide-for-building-modular-mobile-robot-2d4717ab4fa?source=rss-baf9b3f5b6a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d4717ab4fa</guid>
            <category><![CDATA[roses]]></category>
            <category><![CDATA[stm32]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[diy]]></category>
            <dc:creator><![CDATA[Darko Lukić]]></dc:creator>
            <pubDate>Sun, 29 Mar 2020 18:41:48 GMT</pubDate>
            <atom:updated>2020-03-30T10:45:46.440Z</atom:updated>
            <content:encoded><![CDATA[<p>Towards Ultimate Guide for Building Modular Mobile Robot</p><p>I really wanted to buy a modular differential drive robot to play with ROS2 and various algorithms, but I couldn’t find a suitable one. So I made my own, with the idea that anybody can easily tailor it to ones need!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F4_HE3GR3QPY%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D4_HE3GR3QPY&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F4_HE3GR3QPY%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa8909e2f619cd4ed22ab76a2337e5d8/href">https://medium.com/media/fa8909e2f619cd4ed22ab76a2337e5d8/href</a></iframe><p><strong>1 — Motivation</strong>. Recently I wanted to buy a mobile robot platform, so I can test ROS2, SLAM, perception, control and similar. During my Masters in Robotics, I have had an opportunity to work with various mobile robot platforms, but none of those suited my needs. I checked online, but there were none that had everything I wanted at a reasonable price. All the products have valid objectives — easy to use, price and support. Unfortunately, none of them has managed to fulfil the objectives to a reasonable level.</p><ul><li><strong>“Easy to use”</strong> is achieved by making a lot of custom software and PCBs that is specifically tailored for the platform.</li><li><strong>Price</strong> is reduced by integrating a lot of components. E.g. MCUs are soldered instead of putting off-the-shelf development board, very specific MCUs are used to accommodate just the needs of the system (no more) instead of more powerful MCUs or Linux embedded boards, and plenty more sacrifices.</li><li><strong>Support</strong> is based on maintaining all the custom software and PCBs. A lot of engineers ignores the support but this a crucial part of the product, it makes the product usable. But, it costs, it costs a lot!</li></ul><blockquote>The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time. — Tom Cargill, Bell Labs</blockquote><p>Tight integration, custom hardware and software usually yield great features. But, making a custom software and PCBs requires a lot of hours of development (read “money”) and plenty more hours (read “money”) to maintain all that up-to-date. Therefore, just the development costs plenty of money, plus the cost of certification, distribution and marketing make the final product rather expensive than cheap. And most importantly, you are locked to the ecosystem of the platform, very often with out-of-date hardware that is extremely hard to upgrade and software that is hard to integrate with other libraries.</p><p>Let me give you an example, let’s say there is an MCU that is supposed to be exposed to developers, the following is needed:</p><ul><li>develop and support PCB that allows flashing over e.g. I2C,</li><li>develop and support bootloader that works over I2C,</li><li>write detailed documentation and</li><li>write a tool which allows you to flash the MCU over I2C.</li></ul><p>Flashing over I2C is a fantastic feature, but developing it properly is rarely done. Furthermore, what happens if a user wants to switch to the CAN bus, or the flashing tool is not supported for user’s OS?</p><p><strong>2 — Objective.</strong> I have a different idea, <em>“Let’s create </em><strong><em>the ultimate guide</em></strong><em> on how to make a robot, with recommended off-the-shelf components wherever it is possible, and open-source and open-hardware components where necessary”</em>. Why? Well, here are a few reasons:</p><ul><li>Support and “easy to use” are offloaded to the companies that manufacture the necessary components.</li><li>Users don’t need to learn platform-specific features, but they can recycle what they already know.</li><li>Upgrades and modifications are done by replacing the necessary components.</li><li>Price is minimised by buying only the missing components (e.g. user doesn’t have to buy MCU if already has one) and choosing only suitable components for the targeted use-case.</li></ul><p><strong>3 — Concept.</strong> In order to verify if such a robot is possible to make, I went to Digikey and <a href="https://drive.google.com/file/d/1gjWb_ebBmlIgA_-LJuUtHoqzN3VhpZFN/view?usp=sharing">ordered components that I was missing</a>. Please note here that I am a robotics software engineer (at least I am aiming to become one) and that my knowledge in electronics is very poor, especially in mechanics.</p><p><strong>3 .1— Concept/Design.</strong> Idea is to use stackable floors, a well-known approach in robotics (e.g. <a href="http://emanual.robotis.com/docs/en/platform/turtlebot3/specifications/">Turtlebot 3 Burger</a>). So, I found <a href="https://www.digikey.ch/product-detail/en/NBX-10984-PL/377-1672-ND/2057387/?itemSeq=322038441">124x124mm ABS panels with holes </a>and <a href="https://www.digikey.ch/product-detail/en/971350471/732-10475-ND/6174694/?itemSeq=322038346">a few standoffs</a> to support the panels for around $10 in total. To move the robot around I bought <a href="https://www.digikey.ch/product-detail/en/110090264/1597-110090264-ND/10290303/?itemSeq=322038323">two motors with encoders and wheels</a> (around $25).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*cJdRiwud7xbHIZ2sXIMf9Q.png" /><figcaption>Two motors with encoders and wheels</figcaption></figure><p><strong>3.2 — Concept/Electronics.</strong> I tried to avoid soldering, protoboards and jumper wires by using the <a href="http://wiki.seeedstudio.com/Grove_System/">Grove system</a>. This system is great as you can buy plenty of premade boards that can be connected with standard cables, but it pumps up the prices. Of course, you can avoid it and use jumper wires instead.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EyT-E2mJG5DDx1EB4bOFaQ.png" /><figcaption>Electrical Block Diagram</figcaption></figure><p>The overview design is given by the image above, but you should notice a few things there:</p><ul><li>The components are exchangeable. The power source can be a standard Li-Po battery or power bank, Arduino, STM32 or ESP32 can be used as the real-time capable board (and extension of peripherals) and so on. You adapt to your needs!</li><li>The price can be further reduced by removing the board with MCU, but for my use-case, I wanted to have plenty of peripherals for future projects. The price (and size) can be decreased even further by using Raspberry Pi Zero instead of Jetson Nano.</li><li>There are no “weird connections”, e.g. the camera doesn’t use USB but native CSI port. This is very important in this particular case because Raspberry Pi can exploit GPU acceleration (<a href="https://picamera.readthedocs.io/en/release-1.13/api_mmalobj.html">through MMAL that Raspicam uses</a>). In general, standard connections simplify prototyping and benefit from built-in features.</li></ul><p><strong>3.3 — Concept/Software</strong>. This is my favourite part! I wanted to see how my simulations perform in the real-world! Currently, everything runs under <a href="https://index.ros.org/doc/ros2/">ROS2</a> because of plenty of ready-to-use packages (of course, ROS2 could be completely avoided if needed).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*IKMuxSTtN_jBXQQW4EUzBQ.png" /><figcaption>Software Block Diagram</figcaption></figure><p>Let’s analyse this diagram:</p><ul><li>In the given scenario there are 3 ROS2 environments, running on MCU, Jetson Nano and PC. This can be reduced or increased depending on the use-case.</li><li>There is ROS2 node running on MCU. It ensures two things, robust communication with Jetson Nano over UART with QoS (Quality of Service) and a simple exposure of low-level components to Jetson Nano or PC. From my point of view, this is fantastic! All topics and services implemented on MCU are immediately exposed to all other ROS2 nodes on the network.</li><li>There is a PC in the network. This can beneficial from multiple reasons, you can have simulation running in the loop (develop in simulation, try in real-world, fix in simulation, try in real-world…) and it is faster to compile and debug nodes on the PC. After the node is ready you can transfer it to Jetson Nano.</li><li>PC is connected to the robot over a WiFi network, so the robot can move freely around without cable mess.</li><li>Speed of each wheel is regulated with a PD controller which receives feedback from encoders built in the motors.</li></ul><p><strong>4 — Results.</strong> In this article, I tried to present a problem that a great majority of current robot platforms have and to offer a simple solution that you can make by yourself. The mechanical, electrical and software design are briefly presented and should give you an overview of possibilities of the platform and whether you can include in your project. More time has to be invested to investigate modularity of the platform, but it seems like a good first step towards the ultimate guide for building a modular mobile robot.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ajpQzFgy0OVWb-Ax_XvyGw.jpeg" /><figcaption>An image of the current version of the robot (build-up to the time of writing this article)</figcaption></figure><p>A great benefit of using ROS2 is the ability to build a fully distributed system easily. In the video below we can see of using the robot without node running on Jetson Nano, only one running on STM32 and other running on PC.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FuTrrKWkEgGw%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DuTrrKWkEgGw&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FuTrrKWkEgGw%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/90e540d54273e779e528d69f62a5926d/href">https://medium.com/media/90e540d54273e779e528d69f62a5926d/href</a></iframe><p>If you check the first video, at the beginning of the article, you can see the assembled robot moving around. It has only two topics implemented, cmd_vel for controlling linear and angular speed, and odom for publishing odometry data. More of the features will be available as soon as the new sensors arrive — read the following section.</p><p><strong>5 — Further.</strong> This is just a very early prototype and there is a lot of to be implemented:</p><ul><li>LiDAR is on the way (found <a href="https://www.ebay.com/itm/1-Stck-Laserradarscanner-mit-Kabel-Lidar-Sensor-F%C3%BCr-HLS-LFCD2-360-2D-LiDAR/223683738247">one for 30 euros on eBay</a>, compared to <a href="https://www.digikey.ch/product-detail/de/dfrobot/DFR0315/1738-1402-ND/7597150">98 CHF on Digikey</a>) and as soon as it arrives I will be able to start SLAM implementation.</li><li>Simulation has to be built. This could be really useful since you could verify multiple robot configurations before ordering the parts.</li><li>Professional electrical and mechanical design. As I mentioned, I am doing software for robots, I am not really into mechanics or electronics. Fortunately, I know <a href="https://memristorrobotics.com/">fantastic guys</a> who can help me with this!</li><li>After enough knowledge is collected the <strong>ultimate guide should be built</strong>. This would be in a web application (open source of course) where you can choose robot configuration and the app would generate a 3D model, list of recommended parts to buy and an instruction to put everything together.</li></ul><p><strong>I would really like to hear your thoughts on the project!</strong> I understand that the project objective may be blurry to you, but no worries, it is not completely clear to me either. I guess it is part of the fun :)</p><p><strong>6 — Appendix.</strong> Here are some additional notes in case you are really, really interested.</p><p><strong>6.1 — Appendix/Mistakes.</strong> Here is the list of mistakes I made in building the initial robot version.</p><ul><li>Mechanics. Motors are too long, so the wheels are much wider than the robot itself. Shorter motors should be bought.</li><li>Mechanics. Wheels should be more narrow, we are not making monster trucks, but robots for hobbyists.</li><li>Mechanics. Motors have roughly one degree of non-controllable movement. This is kind of annoying, it can affect odometry and PD controller can get crazy.</li><li>Mechanics. ABS panels should be in black colours, like this, the robot looks silly.</li><li>Mechanics. An omnidirectional wheel in front of the robot is missing. Now, there is a piece of plastic which glides on the surface.</li><li>Mechanics. It would be easier to describe the robot in the software if the wheels were in the middle of the robot (instead of the back).</li><li>Electronics. There should be a reasonable big whole on the ABS panels so cables can go through (instead of passing them around).</li><li>Electronics. The motor shield doesn’t have all pins exposed to the upper part and it cannot be put bellow Grove shield.</li><li>Electronics. Cables should be connected with a heat-shrink tube instead of duck tape for better visual appearance and better durability.</li><li>Electronics. USB-Grove, Grove-to-MicroUSB and similar should be bought instead of making them.</li><li>Electronics. Switches are missing. This would make development more enjoyable.</li><li>Electronics. Grove shield and the Nucleo board (development board used with STM32) are not compatible — UART0 is not available on Nucleo by default, but soldered bridges have to be configured. Doing it kills the possibility to use USB debugging.</li><li>Electronics. Motors produce noise, I am not yet sure whether the PWM is at a low rate or something else.</li><li>Software. Currently, STM32 and Jetson Nano communicate over the UART. If possible this should be replaced by I2C.</li><li>Software. STM32duino acts as middleware between STM32 and Micro XRCE-DDS (ROS2 middleware implementation). The whole stack should be replaced by <a href="https://micro-ros.github.io/">Micro-ROS</a> with NutX or FreeRTOS (instead of STM32duino).</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2d4717ab4fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Node.js as a Part of Robotics Platform]]></title>
            <link>https://medium.com/memristor/node-js-as-a-part-of-robotics-platform-a64bf7a963d6?source=rss-baf9b3f5b6a0------2</link>
            <guid isPermaLink="false">https://medium.com/p/a64bf7a963d6</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Darko Lukić]]></dc:creator>
            <pubDate>Sat, 14 Apr 2018 18:22:16 GMT</pubDate>
            <atom:updated>2018-04-19T07:43:12.138Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://memristorrobotics.com/">Memristor</a> has been developing firmware/software for robots for more than 10 years. The software has been changed many times and it evolved from implementation in C running on the microcontroller to JavaScript running on the Linux development board. The main goal has always been to develop a platform on top of which we can easily and rapidly define strategies, adapt to a new hardware and terrain imperfections.</p><p>Many years earlier it is proven that strategies should be written in some interpreted language, because anyone from team could edit/improve, no need for toolchain, and it doesn’t require compilation, which makes robot’s behavior testing much faster.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EI5UsVHjaGw_yCCKnnIh5w.jpeg" /></figure><p>Following the experience gathered from teamwork in Memristor as well as my own experience in software development, I chose to build a software platform for <a href="http://www.eurobot.org/">Eurobot</a> 2017 in Node.js and implement some modules in C/C++.</p><p>I have been impressed with event-loop and I thought it is just what we need in robotics. If you think about a robot from a software perspective it is similar to GUI. In GUI, you receive many different asynchronous events, click, cursor move, scroll, etc. Similarly, in robotics, we have a change of position, obstacle detection and many other challenges. Since the JavaScript is the most popular technology for building GUIs, I believed it will perfectly suit our needs as well.</p><p>After one year of experience and Eurobot competition in La Roche-sur-Yon, France, we would like to share our experience of using Node.js in robotics.</p><p><strong>Pros — Asynchronous Nature of JavaScript<br></strong>It is very easy to handle all those readings from sensors, current position, data from LiDAR, events from distance sensors, state of servos, various hardware failures and many more. We didn’t need to bother with threads.</p><p><strong>Pros — Package Management<br></strong>npm is an absolutely fantastic package manager, especially having in mind that C/C++ practically doesn’t have any. It was very easy to install, use and distribute platform with all its dependencies.</p><p><strong>Pros — JIT<br></strong>Node.js uses a very fast JIT for JavaScript. We haven’t lost time on the compilation but we still had a pretty fast execution.</p><p><strong>Cons — Hard to write C/C++ Modules</strong><br>Compared to Python it is much harder to native C/C++ modules, especially if you have to deal with C/C++ threads.</p><p><strong>Cons — Inconsistent Execution Time<br></strong>v8 optimizes code during runtime which may lead to inconsistent execution time. In the following example, execution time varies from ~90µs to ~3000µs. On the other hand, sensitive tasks should be executed on a real-time processor.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/961ef8cb782f76b3d1df14e03215b8c2/href">https://medium.com/media/961ef8cb782f76b3d1df14e03215b8c2/href</a></iframe><blockquote>Diff time 2935.336 microseconds<br>Diff time 739.212 microseconds<br>Diff time 97.603 microseconds<br>Diff time 96.093 microseconds<br>Diff time 90.832 microseconds<br>Diff time 89.426 microseconds</blockquote><p><strong>Cons — Nobody Knows JavaScript in Robotics World<br></strong>Community, neither your team, want to touch JavaScript code! Developer who code in JavaScript and engineers who do robotics are two different worlds.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a64bf7a963d6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/memristor/node-js-as-a-part-of-robotics-platform-a64bf7a963d6">Node.js as a Part of Robotics Platform</a> was originally published in <a href="https://medium.com/memristor">Memristor Robotics</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>