<?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[Husarion Blog - Medium]]></title>
        <description><![CDATA[We provide hardware, software and connectivity solutions which allow you to build your own autonomous systems easily and efficiently. - Medium]]></description>
        <link>https://medium.com/husarion-blog?source=rss----ed2c6add1402---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Husarion Blog - Medium</title>
            <link>https://medium.com/husarion-blog?source=rss----ed2c6add1402---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 23:36:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/husarion-blog" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Porting a project from ROS1 to ROS2 — our experience]]></title>
            <link>https://medium.com/husarion-blog/porting-a-project-from-ros1-to-ros2-our-experience-ef27b1748915?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/ef27b1748915</guid>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[robot-operating-system]]></category>
            <category><![CDATA[robots]]></category>
            <category><![CDATA[autonomous-vehicles]]></category>
            <category><![CDATA[aml]]></category>
            <dc:creator><![CDATA[Łukasz Mitka]]></dc:creator>
            <pubDate>Tue, 14 Apr 2020 09:25:31 GMT</pubDate>
            <atom:updated>2020-04-14T16:49:07.823Z</atom:updated>
            <content:encoded><![CDATA[<h3>Porting a project from ROS1 to ROS2 — our experience</h3><p>At Husarion we have developed an open-sourced GUI for managing autonomous mobile robot destinations. It is web browser based and allows user to set single destination or set of destinations as a sequence or loop. Everything packed under a user friendly and intuitive graphic interface and out of the box experience without a need of writing a single line of code. The project is named <a href="https://husarion.com/software/route-admin-panel/">Route Admin Panel</a>, or in short RAP. It was initially created for ROS1 and successfully tested with Kinetic and Melodic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*4UkM2RAU7VY3gKmJ6PYz1w.png" /></figure><p>RAP is a pre-installed web user interface on <a href="https://husarion.com/manuals/rosbot-manual/">ROSbot 2.0</a> providing a very handy way to start using the robot with no coding involved.</p><p>Although it was developed using ROSbot, you can use RAP with:</p><ul><li>Gazebo simulator with ROSbot model or other model of your choice</li><li><a href="https://husarion.com/tutorials/aws-robomaker/rosbot-aws-robomaker-example-applications/">AWS RoboMaker</a></li><li>Install RAP on any mobile robot</li></ul><p>Increasing <a href="https://metrics.ros.org/rosdistro_rosdistro.html">efforts</a> of ROS community on ROS2 development as well as questions from our users convinced us to provide a dedicated <a href="https://husarion.com/downloads/">ROS2 image for ROSbot</a>. It comes with ROS Dashing with all desktop tools. The communication middleware of our choice is <a href="https://github.com/eclipse-cyclonedds/cyclonedds"><strong>Cyclone DDS</strong></a> as we consider it as most stable and effective. Moreover, what is important from a developer perspective, we find its documentation complete and comprehensive. Images are prepared for ARM architecture with ASUS TinkerBoard as a supported device and Intel architecture withUpBoardas a supported device.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FTydPiHhUYA4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DTydPiHhUYA4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FTydPiHhUYA4%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/c242dc07d00975be88e540a9ebbd1c4d/href">https://medium.com/media/c242dc07d00975be88e540a9ebbd1c4d/href</a></iframe><p>We decided that the default software working out-of-the-box, also being the showcase for ROSbot capabilities, will be RAP, thus it needed to be ported to ROS2. Below are experiences we gathered and challenges we faced during the process.</p><h3>Architecture</h3><p>RAP is a nodejs application, which consists of a back-end server and front-end web browser app. Communication between the server and the browser is ROS agnostic and we are using JSON structure for this part. This means that there is no need do make any changes in the browser app and user experience will stay the same.</p><p>Translation to ROS messages is handled on server side, RAP for ROS1 is using <a href="http://wiki.ros.org/rosnodejs">rosnodejs</a> for interfacing between ROS and server. There is no rosnodejs for ROS2, the replacement package is <a href="https://github.com/RobotWebTools/rclnodejs">rclnodejs</a>, it provides roughly the same functionality with interfaces adjusted to ROS2.</p><p>RAP is subscribing TF messages to update ROSbot position on a map and Image with map through CompressedImage transport plugin, furthermore in ROS1 it was making use of/move_base action API which was replaced with nav2 stack.</p><p>We tested it with <a href="https://nodejs.org/en/">NodeJS</a> version 10.18.</p><h3>Porting process</h3><p>Knowing the architecture, we can determine that main thing to change is to replace rosnodejs with rclnodejs. Many interfaces in both libraries are the same, thus switching TF topic was mostly replacing library name and reformatting messages.</p><p>First significant issue was encountered while switching Image topic. In order to save the bandwidth, map is transferred to browser as a PNG compressed image. In ROS 1 there was a dedicated node which subscribes/map topic with nav_msgs/OccupancyGrid message type and republishes is on/map_img topic with use of image_transport plugin. Server side is subscribing the CompressedImage from image_transport and transfers it directly to browser app. For ROS2 it was necessary to implement node for conversion of nav_msgs/OccupancyGrid to sensor_msgs/CompressedImage. This process is described in section <em>Map to image converter</em>. Also there was an issue with parameter declaration for CompressedImage transport plugin. Parameter declaration issue is described in <em>CompressedImage transport plugin issue.</em></p><p>The most breaking change was setting destination for navigation stack, as it was redesigned in ROS2. Details of switching to navigation2 stack are in <em>Path planning and destination setting</em>.</p><h3><strong>Map to image converter</strong></h3><p>Node for converting nav_msgs::msg::OccupancyGrid to sensor_msgs::msg::Image was rewritten for ROS2 compliance. Task for this node is pretty straightforward, subscribe/map topic, convert occupancy grid into image and publish it.</p><p>First, initialize subscriber to /map topic:</p><pre>map_sub_ = this-&gt;create_subscription&lt;nav_msgs::msg::OccupancyGrid&gt;(&quot;/map&quot;, 1, std::bind(&amp;MapAsImageProvider::mapUpdate, this, std::placeholders::_1));</pre><p>Initialize /map_image publisher as ImageTransport plugin:</p><pre>image_transport_ = new image_transport::ImageTransport(static_cast&lt;rclcpp::Node::SharedPtr&gt;(this)); <br>image_transport_publisher_full_ = image_transport_-&gt;advertise(&quot;/map_image&quot;, 1, true);</pre><p>Then in subscriber callback function, process map and publish it as an image:</p><pre>tmp_image_data = *cv_img_full_.toImageMsg(); image_transport_publisher_full_.publish(tmp_image_data);</pre><p>When initializing image transport, there is no possibility to choose image format or compression ratio. The plugins are loaded at runtime when node is launched, exact configuration depends on image transport plugins available in the system.</p><h3><strong>CompressedImage transport plugin issue</strong></h3><p>RAP is subscribing map image as CompressedImage with PNG compression. <a href="https://github.com/ros-perception/image_transport_plugins/tree/ros2">Image_transport_plugins</a> does support PNG compression, but at first try, it was constantly publishing as JPEG which is default format. Even when format: png parameter was set. Turns out, that since Dashing, parameter declaration changed as described in <a href="https://index.ros.org/doc/ros2/Releases/Release-Dashing-Diademata/#declaring-parameters">documentation</a>. Unfortunately, the declaration API was not implemented in ros2 branch of image_transport_plugins.</p><p>We have prepared a forked repository with required changes, as for the time of writing, according <a href="https://github.com/ros-perception/image_transport_plugins/pull/52">PR</a> is pending.</p><h3>Parameter declaration</h3><p>So how are parameters declared now?</p><p>We will discuss it on compression format example:</p><pre>rcl_interfaces::msg::ParameterDescriptor format_description; format_description.name = &quot;format&quot;; <br>format_description.type=rcl_interfaces::msg::ParameterType::PARAMETER_STRING; <br>format_description.description = &quot;Compression method&quot;; format_description.read_only = false; format_description.additional_constraints = &quot;Supported values: [jpeg, png]&quot;;<br>config_.format = node-&gt;declare_parameter(&quot;format&quot;, kDefaultFormat, format_description);</pre><p>We begin with ParameterDescriptor structure which will contain all relevant info regarding a parameter that we want to set:</p><pre>rcl_interfaces::msg::ParameterDescriptor format_description;</pre><p>Set a name for the parameter, this is a string that identifies parameter, the same name is to be used when setting value for the parameter, e.g. in parameters .yaml file.</p><pre>format_description.name = &quot;format&quot;;</pre><p>Choose parameter datatype, it could be one of the following:</p><ul><li>PARAMETER_NOT_SET</li><li>PARAMETER_BOOL</li><li>PARAMETER_INTEGER</li><li>PARAMETER_DOUBLE</li><li>PARAMETER_STRING</li><li>PARAMETER_BYTE_ARRAY</li><li>PARAMETER_BOOL_ARRAY</li><li>PARAMETER_INTEGER_ARRAY</li><li>PARAMETER_DOUBLE_ARRAY</li><li>PARAMETER_STRING_ARRAY`</li></ul><pre>format_description.type = rcl_interfaces::msg::ParameterType::PARAMETER_STRING;</pre><p>Provide parameter description, this should explain what could be set or how does the parameter affect node operation.</p><pre>format_description.description = &quot;Compression method&quot;;</pre><p>Determine if value can be changed after it has been initialized, if true, value will not be overwritten.</p><pre>format_description.read_only = false;</pre><p>Describe parameter constraints, ParameterDescriptor provides floating_point_range and integer_range fields which can be used to limit numeric values set in parameter, in our case they does not apply as we are using string parameter. For the purpose of determining possible values, we can use additional_constraints field, this should be plain English description of constraints which cannot be expressed with the available constraints.</p><pre>format_description.additional_constraints = &quot;Supported values: [jpeg, png]&quot;;</pre><p>Finally, declare parameter:</p><pre>config_.format = node-&gt;declare_parameter(&quot;format&quot;, kDefaultFormat, format_description);</pre><p>Return value of declare_parameter method is parameter resulting value. If, at run-time, the user has provided an initial value then it will be set in this method, otherwise the given default_value will be set.</p><h3><strong>Path planning and destination setting</strong></h3><p>Path planning in ROS2 was almost redesigned from scratch, this allows to implement new workflow while keeping the functionality. For more details on the implementation please refer to <a href="https://ros-planning.github.io/navigation2/concepts/index.html">Navigation 2 docs</a>.</p><p>Although the changes are fundamental, they refer mainly to navigation stack internal issues. When using Rviz, default settings allows us to set destination for ROSbot and drive towards it smoothly.</p><p>Setting the destination and monitoring its progress is available via <a href="http://design.ros2.org/articles/actions.html">actions</a> interface. Their implementation changed greatly starting from the basic concepts. In ROS1, actions are implemented as a separate library, while in ROS2 they should be included in client library.</p><p>When we started the process of porting RAP to ROS2, rclnodejs did not have support for actions interface. We decided to make our own implementation of actions interface and eventually create a pull request. During our development, the other team was concurrently working on the same functionality. The status for the time of writing this article is that rclnodejs has implementation of actions available for ROS2 Eloquent. As we want RAP to be compatible with ROS Dashing, we will keep with our <a href="https://github.com/lukaszmitka/rclnodejs">custom fork</a>.</p><p>As defined in actions design, their support is already implemented in <a href="https://github.com/ros2/rcl">rcl library</a>. To add actions support in rclnodejs it is required to add appropriate language bindings between JavaScript in rclnodejs and C in rcl. Also, according classes to process actions needs to be implemented.</p><p>Last thing is to provide data type generator for actions. Every ROS message, service or action is defined in .msg, .srv or .action accordingly. Each of them can also be defined with use of universal.idl file. Both methods are not directly usable in Node.js, thus they need to be converted to according JavaScript classes prior to usage. Furthermore, actions must be converted during install time on user machine to provide support for user defined actions.</p><h3><strong>Summary</strong></h3><p>Porting the project from ROS1 to ROS2 was quite challenging due to variety of tools and components used. It was also as much valuable experience, that’s why we decided to share it in this article.</p><p>We have discussed usage of image_transport plugin, parameter declaration and integration of Node.js library with ROS2 interface. If any of these issues are interesting for you, please let us know in the comment below.</p><p>RAP is an open source project and code for ROS1 and ROS2 is available as separate branches <a href="https://github.com/husarion/route_admin_panel">on the GitHub</a>.</p><p>I hope that the description of our experiences gathered during porting open source project from ROS1 to ROS2 will be helpful for ROS community.</p><p>All the best!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ef27b1748915" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/porting-a-project-from-ros1-to-ros2-our-experience-ef27b1748915">Porting a project from ROS1 to ROS2 — our experience</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LAN network for microcontrollers. Over the internet.]]></title>
            <link>https://medium.com/husarion-blog/lan-network-for-microcontrollers-over-the-internet-fbcfe4c97f4b?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/fbcfe4c97f4b</guid>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[esp32]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[m2m]]></category>
            <dc:creator><![CDATA[Dominik Nowak]]></dc:creator>
            <pubDate>Fri, 11 Jan 2019 16:07:55 GMT</pubDate>
            <atom:updated>2019-01-14T16:05:05.481Z</atom:updated>
            <content:encoded><![CDATA[<p>More and more devices around us are connected. Not only computers, but also small, low power and cheap microcontroller based devices. There are numerous IoT platforms for embedded hardware, allowing you to access your things through the internet. But they are generally “cloud based” — that means you do not access your embedded board directly, but through an API of the IoT cloud.</p><p>In most cases it’s not hard to reach the free data credit limit provided by the IoT platform and you need to pay for more. Latency may also be an issue as all of the traffic goes through the cloud - due to that, usually you can forget about the real time control over the internet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*w9y-m8n70V_AHLuv8fdr1w.png" /></figure><p>But you don’t need to connect your microcontroller to a third party cloud to access it through the internet. Now you can use Husarnet, and securely access it directly, just like it was in the same LAN network.</p><h3><strong>Connect your ESP32 Wi-Fi microcontroller over the internet — step by step.</strong></h3><p>Husarnet, a P2P VPN network has low footprint, is highly optimized and written in pure C++. Thanks to that it could be ported on numerous hardware platforms — even microcontrollers.</p><h4><strong>Setup</strong></h4><p>The first, currently supported microcontroller is ESP32 — extremely popular among makers. For those familiar with ESP32 SDK, we’ve created a dedicated “ESP-IDF” package. To start development all you need to do is follow these instruction steps:</p><p><strong>1. Download the </strong><a href="https://docs.espressif.com/projects/esp-idf/en/stable/get-started/#setup-toolchain"><strong>ESP32 toolchain</strong></a></p><p><strong>2. Get the ESP32 SDK with Husarnet:</strong></p><pre>git clone — recursive <a href="https://github.com/husarnet/esp-idf">https://github.com/husarnet/esp-idf</a> ~/apps/husarnet-esp-idf</pre><p><strong>3. Export the environment variable ESP_IDF:</strong></p><pre>export ESP_IDF=$HOME/apps/husarnet-esp-idf</pre><p>Interested how to use Husarnet with ESP32? Take a look at an example projects available on hackster.io:</p><p><a href="https://www.hackster.io/zielmicha/10-secure-esp32-based-internet-camera-05acd9"><strong>$10 Secure ESP32-Based Internet Camera</strong></a> .</p><h4>Arduino Setup</h4><p>Sounds good? There’s more, and you can start developing even easier - it also works with Arduino framework. Arduino is an extremely popular framework used not only by makers but also by professional developers. With libraries to almost all market available sensors and modules it allows you to create advanced projects very quickly.</p><p>Probably the easiest way to start developing projects on ESP32 is by using popular Arduino IDE. Let’s try to do that:</p><p><strong>1. Add Husarnet IDF for ESP32</strong></p><ul><li>In Arduino IDE open:</li></ul><pre>File -&gt; Preferences</pre><ul><li>In a field <strong>Additional Board Manager URLs </strong>add this link: <a href="https://files.husarion.com/arduino/package_esp32_index.json">https://files.husarion.com/arduino/package_esp32_index.json</a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/0*IFEnVwmn3v1oCqsf" /></figure><p><strong>2. Install ESP32 dev boards</strong></p><ul><li>In Arduino IDE open:</li></ul><pre>Tools -&gt; Board: &quot;...&quot; -&gt; Boards Manager ...</pre><ul><li>Search for <em>“esp32-husarnet by Husarion”</em></li><li>Click <strong>Install </strong>button</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/798/0*Kmn-i54tWN4wHdB_" /></figure><p><strong>3. Select ESP32 dev board</strong></p><ul><li>In Arduino IDE open:</li></ul><pre>Tools -&gt; Board</pre><ul><li>Select “<strong>ESP32 Dev Module”</strong> under “<strong>ESP32 Arduino (Husarnet)”</strong> section</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/958/0*opJ65hzq0sCF_XnH" /></figure><p>And… that’s it! You can start developing just like that. Husarnet provides the same API as popular “WiFiServer” and “WiFiClient” Arduino classes. If you have your project working in your local network you can make it work through the internet by simply replacing “WiFiServer” with “HusarnetServer” and “WiFiClient” with “HusarnetClient”. It couldn’t be easier.</p><p>To connect you ESP32 do Husarnet network open the Serial terminal, wait for a message such as the one below:</p><pre>[10009675] Visit <br><a href="https://app.husarnet.com/husarnet/fc94f91f5992989f83474cc8abf7329bf8ae7f3ee4a9xxxxyyyyzzzz">https://app.husarnet.com/husarnet/fc94f91f5992989f83474cc8abf7329bf8ae7f3ee4a9xxxxyyyyzzzz</a> <br>to configure the device .</pre><p>And copy the link into your web browser. Then name your device, select the network, and your done.</p><p>We’ve created an example showing you in details how to use Arduino SDK for Husarnet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*BYxedRaZFesSXa3pkjNQVQ.gif" /></figure><p><a href="https://www.hackster.io/donowak/internet-controlled-led-strip-using-esp32-arduino-2ca8a9"><strong>Internet Controlled LED Strip Using ESP32 + Arduino</strong></a><strong> </strong>at hackster.io</p><p>Hope you liked those two examples. Let us know what you think!.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbcfe4c97f4b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/lan-network-for-microcontrollers-over-the-internet-fbcfe4c97f4b">LAN network for microcontrollers. Over the internet.</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Husarnet — a global LAN network]]></title>
            <link>https://medium.com/husarion-blog/introducing-husarnet-a-global-lan-network-5795222d2214?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/5795222d2214</guid>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[robot-operating-system]]></category>
            <category><![CDATA[industry-4-0]]></category>
            <dc:creator><![CDATA[Dominik Nowak]]></dc:creator>
            <pubDate>Wed, 03 Oct 2018 17:41:27 GMT</pubDate>
            <atom:updated>2018-10-03T17:41:01.059Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introducing Husarnet — a global LAN network</h3><h3><strong>Why?</strong></h3><p>Your data may be in danger. Everything you type into Google, Facebook or any other “service” may be stored somewhere. GDPR and similar laws protect some of us, but no law will be ever be so powerful to guarantee your data is 100% safe and private.</p><p>New internet is arriving — internet of connected things. In the near future most internet traffic won’t be generated by us, but by devices around us. To be able to communicate with each other these devices need their own version of Facebook — today we call it an “IoT platform”. Think about it as a social network for things. Similar to Facebook or Google, your devices have their own accounts on an “IoT platform”. If your device sends data to another one, traffic goes through this “IoT platform”. The sad truth is:</p><p>a) platform providers can potentially spy on your data</p><p>b) can disable your devices whenever they like without your permission</p><p>c) can leave a security hole which hackers can exploit</p><p>Of course, it’s not a big deal if you lose the access to your smart sensor data. But what if someone stops your production line, or steals your IP? Yep, then it becomes a little more serious…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iPrFimOJouV6vwt9QKkkCQ.png" /></figure><h3><strong>Remove the “IoT platform”</strong></h3><p>At Husarion we found the answer — let’s remove the “IoT platform”, and let devices communicate with each other directly. This is why we created Husarnet — you simply install Husarnet client on your devices and they see each other like they were in the same LAN network, regardless of the network they are in. Also, the traffic does not go through ours, or our partners servers. We don’t even touch your data. It goes directly between the devices you own. That’s what you call a real Peer-To-Peer connection (P2P).</p><p>But how devices know where the other devices are in the internet? Thanks to Husarnet Base server which is used only once — to establish a connection. It does not see your unencrypted data at all — it only initiates connection. After that you can forget about it!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*5UOHQdlEKtIeQ_ne" /></figure><h3><strong>Privacy + Security</strong></h3><p>Your data never leaves any of your devices unencrypted. It only belongs to you. Husarnet uses modern secretbox construction from libsodium for encryption and verification. Your devices are identified by hash of their public key. Security architecture guarantees forward secrecy.</p><h3><strong>Low latency</strong></h3><p>Husarnet is secure, private and … very fast. Think about it — if your devices are connected to the IoT platform, even if they are in the same network, the traffic needs to leave your network, travel to the servers located sometimes thousands miles away just to come back to the devices couple of meters apart. Such a waste of time! Husarnet-connected devices communicate with each other directly, through an optimal (in terms of latency) way in the network. Latency is low, and data rate is high.</p><h3><strong>It works with your existing software</strong></h3><p>Current Husarnet build provides only a Linux client. When you setup your Husarnet network and have, let’s say two linux based computers/servers/robots, with hostnames: “mylaptop”, and “myrobot”, they behave like they were in the same LAN network and instead of IP address, as it would be normally done, you can use just their hostnames. For example, to connect your laptop through SSH to your robot you simply type in the terminal:</p><pre>user@mylaptop:~$ ssh user@myrobot</pre><p>To ping your robot, execute this command:</p><pre>user@mylaptop:~$ ping6 myrobot</pre><p>You use standard Linux tools together with Husarnet! Husarnet provides totally transparent layer for your operating system. It works on operating system level, so can be used with existing software setup you have in your system. It’s dead simple — now your devices can be in two different places on the Earth, and they see each other like they were in the same Wi-Fi network.</p><h3><strong>Other platforms</strong></h3><p>Microcontroller and Android SDK will be released soon after Husarnet launch. Even simple, microcontroller based device will be connected peer-to-peer to your Husarnet network. Husarnet is written using modern programming techniques in C++. The code is highly optimized at runtime level and has small footprint allowing it to be ported even for devices with a little memory and computing power.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*z8s-HJTDYWvlaZ1r" /></figure><h3><strong>Be among the first users of Husarnet</strong></h3><p>We believe that Husarnet will bring a new quality to the world of connected devices. Your devices can be connected on your own terms, without any central operator who can have an access to what you are sending. Instead of feeding “big data” databases of IoT platform providers, becoming more and more dependent on them, your devices can be free. And so can you.</p><p>Husarnet is what your robot, connected factory and drone swarm wants.</p><p>Visit <a href="https://husarnet.com/">https://husarnet.com/</a>, set up your free account and see for yourself.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5795222d2214" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/introducing-husarnet-a-global-lan-network-5795222d2214">Introducing Husarnet — a global LAN network</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Steps to Choosing the Right Motors for Your Robotic Project]]></title>
            <link>https://medium.com/husarion-blog/10-steps-to-choosing-the-right-motors-for-your-robotic-project-bf5c4b997407?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/bf5c4b997407</guid>
            <category><![CDATA[electronics]]></category>
            <category><![CDATA[mechatronics]]></category>
            <category><![CDATA[motor]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[physics]]></category>
            <dc:creator><![CDATA[Radek Jarema]]></dc:creator>
            <pubDate>Thu, 23 Aug 2018 16:07:38 GMT</pubDate>
            <atom:updated>2018-08-23T16:07:22.758Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*zEjK0aEQbt724U4A" /></figure><p>In this article I will try to explain a few key parameters which you need to take into consideration when choosing the motors for your robot. To make it as clear as possible I will do it on an example. It will be quite simple so we can avoid complicated calculations. Your project may be much more complex but I wanted to focus mostly on motor characteristics it this one. Some less significant physical effects are omitted in this article.</p><p>The example robot is a mini-forklift. Two identical motors will drive the front wheels and one stronger motor will lift the fork. There is a ball caster (it could also be a swivel wheel) on the rear of the robot therefore it can turn left or right by controlling the front traction motors. The picture below shows the simplified design of our project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*yD_9ZGx5z3nKh2nl1WN-Uw.png" /></figure><p>Ok, so let’s get started.</p><h4><strong>Step 1: Determine the total weight and traction requirements</strong></h4><p>Since this is not a full-size forklift which could be found in a warehouse, but a miniature version with the total length of about 30cm, it is expectedly not as heavy. We can’t exactly determine the weight yet because we haven’t chosen the motors.. We have to estimate the <strong>robot weight</strong>… let’s say…<strong>2kg</strong> (Why not, right?) And let’s agree that the <strong>total load</strong> which could be carried by the robot is <strong>1kg</strong>. Of course, in the real scenario we would estimate weight of each part of the robot.</p><p>Let’s avoid using very powerful motors and a big battery by limiting the maximum speed (as we do not want our cargo falling on the floor during braking) and acceleration. In the real-life scenario, we would calculate the center of the mass and maximum negative acceleration to avoid robot tilting. We would also estimate the friction force between the fork and the load to avoid load sliding down. For our purpose let’s assume that the <strong>nominal speed</strong> is <strong>0.3m/s</strong>. It should be enough. The maximum speed will depend on other factors, which are yet to be identified. However, we can expect that the maximum speed will be in a range of 0.35 to 0.8m/s.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/756/1*53pfEmyrMEog9ZulMduTZw.png" /></figure><p>The mini-forklift is not an all-terrain vehicle but we want it to be able to climb on slope. Let’s say that the <strong>maximum slope incline</strong> is <strong>15%</strong> (angle of incline = arctan(0.15) ≈ 8.5°).</p><p>We can also specify that <strong>acceleration time</strong> until the nominal speed is reached shall be <strong>0.2s</strong> (I will explain how to calculate that in a separate article).</p><p>And finally, let’s specify that the load can be <strong>lifted</strong> by <strong>0.1m</strong> a <strong>second.</strong></p><p>Summarizing all the values:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/377/1*_cfuh6rXkaknl-2ADECAPg.jpeg" /></figure><h4><strong>Step 2: Calculate the traction wheel rotation speed</strong></h4><p>It is quite easy to calculate the needed wheel rotation speed. All you need is wheel diameter and the nominal robot speed. Let us assume a wheel diameter of 85mm, and calculate <strong>wheel rotation speed</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*DFIKJWko7agmtYcjxj0mwQ.jpeg" /></figure><h4><strong>Step 3: Calculate the traction motor power/torque</strong></h4><p>If we omit friction, we can estimate the motor torque needed to climb on the previously specified maximum slope. The <strong>thrust force</strong>, needed to overcome gravity on the slope, is the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*M24X-IYd42T34dq6zoKMtQ.jpeg" /></figure><p>If we want to move the robot uphill with the nominal speed, the mechanical <strong>power</strong> needed to do it is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*Qls8gKIxDZtTZYWctpgtAQ.jpeg" /></figure><p>It is a mechanical power for the entire robot, so we have 0.66 W per one traction motor. The corresponding <strong>torque</strong> for the traction wheel, per one traction wheel is the following:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/763/1*UqN4-GyhcQVg6gOgQ4Shug.jpeg" /></figure><p>We have now estimated the most important parameters which are required to be able to choose the traction motors. Of course, for now we have omitted friction, efficiency of the motors and the gearbox. Furthermore, this estimation does not include the acceleration from v=0 and assumes that the robot is already in motion, but we don’t want to push it by hand ;) In fact, to start the robot we need more power then we calculated, unless we want to wait forever (I don’t think we have that much time). I will write some more about the acceleration in the next article.</p><h4><strong>Step 4: Calculate the lifter motor rotation speed</strong></h4><p>Similarly as for traction motors, we need the pulley diameter and the load lifting speed. Let us assume a pulley diameter of 10mm = 0.01m. So, the nominal <strong>rotation speed</strong> is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*NerIO4hFQKJeo5YHa_ly2A.jpeg" /></figure><h4><strong>Step 5: Calculate the lifter motor power/torque</strong></h4><p>We are also going to neglect friction for the purpose of estimating the lifter motor torque, needed to elevate the load. We know that the maximum load is 1kg but, the fork itself and some of the lifter components, will also move up with the load- we have to include them in the calculation. Let’s say that the fork weight is 0.3 kg. Therefore the <strong>force</strong> needed to lift the fork and the load, is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/788/1*qCgxkB2xHBMWIg5Z6kmdTA.jpeg" /></figure><p>The corresponding <strong>torque</strong> for our pulley diameter is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/779/1*rf5Z7inN33P7Y05bQxfh5A.jpeg" /></figure><p>If we want to elevate the load with the nominal lifting speed, the needed mechanical <strong>power </strong>is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*LUZwghFl47KRAf_CHOhayg.jpeg" /></figure><h4><strong>Step 6: Not really a step, but let’s summarize the values we have calculated so far</strong></h4><p>Requirements for the traction motor (x2):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*3RhsLzJctg0hH7xp4lXBwA.jpeg" /></figure><p>Requirements for the lifter motor:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*BjvQjvnen4RNGSJZyv9qfw.jpeg" /></figure><h4><strong>Step 7: First conclusions</strong></h4><p>Now we know that in both cases we need motors with rotational speed much lower that the typical motor. Small DC or BLDC motors usually have the rotation speed between 3000 and 12000 rpm or more. Below you can see the <strong>characteristic</strong> of SCR18–3702 6V, DC motor (made by Citizen Micro Co., Ltd.).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*DCbp-qiVQhM_OzhdI0G9lw.png" /></figure><p>What can we read from this characteristic?</p><p>a) The rotational speed in rotations per minute. The maximum rotational speed of this particular motor is above 8000 rpm — but only when we do not receive any mechanical power (or, in other words, any torque) from motor output shaft.</p><p>b) The maximum motor power is almost 3 W and is available with the speed equal to about 4000 rpm.</p><p>c) The maximum torque is 12.5 Nm but it is available with an output speed which equals… zero.</p><p>d) The maximum efficiency is near 70%, with the output speed ≈ 6500 rpm.</p><p>The red line on the picture below indicates the working point at a speed of 191rpm (as a lifter motor).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*ZVuof90WMQ7a7MWHPc8PTg.png" /></figure><p>With this rotational speed, we can read the following:</p><ul><li>on the red line — that the torque would be only 12 mNm (we need 64 mNm)</li><li>on the yellow line — that the efficiency in this point would be only 5%,</li><li>on the blue line — that the output power would be only 0.5 W (we need 1.28 W)</li><li>on the green line — that the output current would be as high as 1.9 A</li></ul><p>Now it is more than clear that we need a gearbox to convert the power and get more torque with less output speed.</p><h4><strong>Step 8: Choose the motor and gearbox for the lifter</strong></h4><p>Lifter motor — previously calculated values, for the record:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*BjvQjvnen4RNGSJZyv9qfw.jpeg" /></figure><p>So, how to choose the right gear ratio? First, we need to find the motor working point. The speed and the torque are dependent on each other and on the gear ratio, so we can start with the motor output power. For the lifter motor, we need 1.28W. Draw corresponding lines on the characteristic we analyzed earlier and conclusion will be quite clear:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*uUnJwQ3HnD5MQKBwtqnkmA.png" /></figure><p>First, we can read the motor speed for this point. There are two points that correspond with this power value but we should choose the one with higher efficiency, so the corresponding <strong>motor speed is about 7000 rpm</strong>. Now we can choose the gear ratio R = 191/7000 ≈ <strong>1/37</strong>.</p><p>Then, we can read the motor torque and calculate the <strong>torque at the gearbox output</strong> shaft, when the gearbox efficiency is 100% (impossible, but we don’t care for now):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*s0II577_2zHqRDwsR4Ne2w.jpeg" /></figure><p>The torque is bigger than required 64 mNm.</p><p><em>(In fact, it should be equal to 64 mNm, because we have taken the power of exactly 1.28 W and, with given speed, the torque can’t be higher for that output power. But reading from the graph is not very accurate.)</em></p><p>What’s more, the efficiency is close to maximum for this motor! And we also know that the motor current is about 350 mA.</p><p>Unfortunately, we would for sure not find the gearbox with the ratio of exactly 1:37, with the 100% efficiency. As we can find in datasheets, the maximum efficiency of gearboxes for this ratio is about 50% … 70%. So we have to calculate it again, in other way.</p><p>We know that we need a gearbox, with efficiency in a range 50% … 70%. So we can take the worst-case value of gearbox efficiency ηG=50% and assume that the <strong>motor power</strong> has to be higher than the gearbox output power:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*OWQPI0pL2Cx5HERX4oFvVw.jpeg" /></figure><p>We can see from the graph that our SCR18–3702 motor has the maximum power of 2.67W, therefore we can still use this motor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*rWh-JGgc3C-lo16lovQq5A.png" /></figure><p>Resulting parameters:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*NeBCkZ4JXPxCtT_G6DVvJA.jpeg" /></figure><p>Ok, so we have taken the gearbox efficiency into account, but what about the availability of the gearbox with the ratio of 1/27.3? I found the catalog of gearheads for this motor and the closest available model (IG-22V) has the ratio of 1/22.56 and the efficiency of 66%, for the rated torque. Because the efficiency is much worse with a light load (less torque), we will stay at gearbox efficiency of 50%.</p><p>Before we draw the lines, we need to calculate the <strong>motor speed</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*wFuhJLYra0vllsKnvVvn-Q.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*boUXZO4Xed7_vR2BiKUUqQ.png" /></figure><p>Resulting parameters for the lifter motor, with given gearbox ratio (R = 1/22.56):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*9Wajm1JMAEVv79dRWLRQ6A.jpeg" /></figure><p>Finally, we have the solution that meets our requirements. Ok…almost… as there are also other losses ex. between wheels and the ground, but what we can do is simply take a bigger margin for our calculations. As a last resort, we can use slightly higher supply voltage and both the power and the torque will go up.</p><h4><strong>Step 9: Choose the motor and gearbox for the traction motors</strong></h4><p>Traction motor (x2) — previously calculated values, for the record:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/461/1*3RhsLzJctg0hH7xp4lXBwA.jpeg" /></figure><p>We will use the same motor as before. The gearbox efficiency for our calculations will be 45%, because the speed is lower and we probably will need one more stage in the gearbox. More reduction stages in gearbox mean less efficiency.</p><p>The minimum motor <strong>output power</strong> is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*Ym41dXXMbgPSPN2oLKBsuA.jpeg" /></figure><p>Now we can read the rotational speed from the graph, with given power:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*_JpUDUU-ino67fbgCVDfOg.png" /></figure><p>The ideal <strong>gear ratio</strong> is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/1*o-nzO3xnYhZfrcmNnlpuwA.jpeg" /></figure><p>Now we can look into the catalog. We found two, nearest available gear ratios: 1/76 and 1/90. We need to take 1/76, because we have to go into the “more power” direction on the graph, where the motor speed is slightly lower than for an ideal gear ratio.</p><p>The chosen gearhead has the efficiency of 53%. We will stay with estimated 45%, for the lower torque than nominal for this gearhead.</p><p>So, the new <strong>motor speed</strong> is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/774/1*v80UgAvRfYDyQvhLtdwi_w.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/844/1*jyRxeLBtJBT6Q9grkPpilQ.png" /></figure><p>Resulting parameters for traction motor, with given gearbox ratio (R = 1/76):</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/775/1*zeJ6BGT4g3-u-Y0rBZ6wiQ.jpeg" /></figure><p>In this case, the resulting torque (157mNm) is much bigger than the required one (93.5mNm). It is good news, because we can see on the graph that for a smaller load, the efficiency is much better.</p><h4><strong>Step 10: Final conclusions</strong></h4><p>We needed to find motors and gearboxes for our simple forklift robot. Before we started, we made the following assumptions:</p><ul><li>there is no losses between rotational motion of gearhead output shaft and the linear robot motion</li><li>the robot works under the maximum load condition</li><li>we neglect the acceleration requirements</li><li>the efficiency is only estimated</li><li>the parameters are read out from the graph, which is not accurate</li></ul><p>After described selection process, we found the motors and gearbox models that are available on the market and can be used to meet our requirements. We also tried to maximize efficiency in the process. We could get much bigger motors and use them without a gearbox — do you remember the 5% efficiency, which we estimated for the motor without the gearbox, and we haven’t even met the requirements? Efficiency of 25% does not look great on paper, but it is a reality.</p><p>In the next part of the article I will try to explain how to deal with acceleration requirements and how to calculate motor parameters more accurately — maybe even some more.</p><p>Thanks guys!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf5c4b997407" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/10-steps-to-choosing-the-right-motors-for-your-robotic-project-bf5c4b997407">10 Steps to Choosing the Right Motors for Your Robotic Project</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bootstrap 4 + ROS : creating a web UI for your robot]]></title>
            <link>https://medium.com/husarion-blog/bootstrap-4-ros-creating-a-web-ui-for-your-robot-9a77a8e373f9?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/9a77a8e373f9</guid>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[bootstrap-4]]></category>
            <category><![CDATA[robot-operating-system]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[drones]]></category>
            <dc:creator><![CDATA[Dominik Nowak]]></dc:creator>
            <pubDate>Tue, 14 Aug 2018 13:41:20 GMT</pubDate>
            <atom:updated>2020-12-22T14:36:47.594Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d3V9Opag7kftNYSj49_Rtw.png" /></figure><p>Bootstrap 4 framework allows you to create modern, great looking websites really quickly and without a big effort. It is currently one of the most popular front-end libraries for a reason. It is also open source and available under developer friendly MIT license. Building websites which not only look good but also scale well on different devices such as your laptop or a mobile phone is not a big deal with Bootstrap.</p><p>In this article I will show you how to use that framework together with ROS (Robot Operating System) — the most popular robotic middleware — to create awesome, intuitive web user interfaces for robots. I will guide you through setting-up the development environment, writing the code and running it on a physical robot. While in this article the demo is based on Husarion’s ROSbot 2.0 autonomous robot platform, you can easily run it on any other ROS powered and internet connected robot. It’s totally up to you.</p><h3><strong>Requirements</strong></h3><h4>1. Laptop / PC with installed Visual Studio Code (VSC).</h4><p>First, in VSC you need to install the following plugins:</p><ul><li><strong><em>Bootstrap 4, Font awesome 4, Font Awesome 5 Free &amp; Pro snippets</em></strong><em> </em>: this is the framework itself with couple of additional features which contain ready-to-use templates and other stuff useful while developing in bootstrap</li><li><strong>Live Server</strong> : to see your web UI changes in realtime</li><li><strong><em>Prettier Code formatter</em></strong> : to keep your source code clean</li><li><strong><em>vscode-icons</em></strong> : to make your workspace look good</li></ul><h4>2. <strong>Physical robot or gazebo simulation model.</strong></h4><p>In this article we are using <a href="https://husarion.com/manuals/rosbot-manual/#rosbot-manual-overview">ROSbot 2.0</a>, but you can use any other ROS robot that you have.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7QySf10-dYy0iqj6quBw_g.png" /></figure><p>On top of standard ROS, you will need to install couple additional packages. To do that, in your robot Linux terminal run the following commands:</p><pre>sudo apt update</pre><p>and</p><pre>sudo apt install python-tornado python-pip ros-kinetic-rosbridge-suite ros-kinetic-web-video-server nginx</pre><h3>Creating a web UI in VSC</h3><h4>1. Creating a new project</h4><p>First create an empty folder (we named it ROS-bootstrap-demo). Then start VSC and open the folder you just created. In VSC create a new file called named index.html. Thanks to one of the plugins for VSC which we have installed earlier creating a new Bootstrap 4 project is very straightforward. Just start typing b4, then press ctrl + space for auto completion menu to appear and choose b4-$ . It will create a web page template with bootstrap libraries already included.</p><p>Here’s how creating a new project looks like:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F2PAQu0AnJ40%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D2PAQu0AnJ40&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F2PAQu0AnJ40%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/96742d9dbcceec9214f5929f0b85e926/href">https://medium.com/media/96742d9dbcceec9214f5929f0b85e926/href</a></iframe><p>Now right click theindex.html file and select “Open with Live Server [Alt + L Alt + O]” option. You will see an empty page in your web browser . It will be updated automatically each time you save your project.</p><h4>2. Writing the HTML code</h4><ul><li>Change the name of your page in the &lt;title&gt; tag to “ROS + Bootstrap 4 demo”: &lt;title&gt;ROS + Bootstrap 4 demo&lt;/title&gt;</li><li>Change the page background color to bg-light inside the&lt;body&gt; tag: &lt;body class=&quot;bg-light&quot;&gt;</li><li>Add some additional scripts above &lt;/body&gt; tag:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/76ee1be56cfcb3ad35e5ed65a47b6cda/href">https://medium.com/media/76ee1be56cfcb3ad35e5ed65a47b6cda/href</a></iframe><p>First 3 scripts come from Robot Web Tools(<a href="http://robotwebtools.org/">http://robotwebtools.org/</a> ) . roslib.min.js is basic ROS javascript library, it allows your web apps to communicate with ROS system. eventemitter2.min.js is a support library for handling various ROS events. keyboardteleop.min.js is a support library for controlling the robot using the keyboard.</p><p>nipplejs.js is a library for creating a joystick for the web UI that is especially useful for controlling the robot on mobile devices.</p><p>And finally webui.js will be created in the next section of this article.</p><ul><li>Below &lt;body class=&quot;bg-light&quot;&gt; paste following code:</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/282a9bff9cd5f92426e581be999dca0a/href">https://medium.com/media/282a9bff9cd5f92426e581be999dca0a/href</a></iframe><p>This is a basic structure of your app. In consists of a placeholder for the video, joystick and slider for selecting keyboard speed. Do not worry that &lt;img&gt; tag has an empty src parameter, it will be populated by javascript.</p><p>That is all for the html part, remember to save all the changes made in index.html.</p><h4>3. Writing the JavaScript code</h4><p>Create a new file, name it webui.js and save in the same folder as index.html.</p><p>Begin by creating some global variables:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6034c804c9714fc727f524ead5194d03/href">https://medium.com/media/6034c804c9714fc727f524ead5194d03/href</a></iframe><p>Write a function to send ROS messages with velocity for robot:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/51f6828917b3b360e138fd9eafc308aa/href">https://medium.com/media/51f6828917b3b360e138fd9eafc308aa/href</a></iframe><p>Write a function to create velocity message publisher:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e76759770e1991e7a0fdf9488c86e28e/href">https://medium.com/media/e76759770e1991e7a0fdf9488c86e28e/href</a></iframe><p>Write a function to create keyboard controller object:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7f65449669cf90c93e575a7c5eb1ac26/href">https://medium.com/media/7f65449669cf90c93e575a7c5eb1ac26/href</a></iframe><p>Write a function to create joystick object:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f5b670b5e60ac0021f7c2e9f8e7de871/href">https://medium.com/media/f5b670b5e60ac0021f7c2e9f8e7de871/href</a></iframe><p>…and finally main app initialization:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4d42dc33b99c8f0f501ffb774e5ae751/href">https://medium.com/media/4d42dc33b99c8f0f501ffb774e5ae751/href</a></iframe><p>Choose between static IP address for the robot or dynamically defined IP with location.hostname depending on your configuration. If the web server is running on a device different than the robot, IP must be set manually to the robot address. If the app is deployed to a server which is running on your robot, it can be set automatically.</p><p>Video address string might need to be adjusted. Part /camera/rgb/image_raw is the topic name, where video is published by the robot. Set this topic according to your camera.</p><p>You web user interface is now ready.</p><h3>Running the demo on your robot</h3><h4>1. Flashing default firmware to ROSbot 2.0 real-time board</h4><p>This step is specific for ROSbot 2.0 platform. In case of other robots it may look different. What we are doing in this step is uploading the firmware to a STM32F4 MCU processor inside Husarion CORE2-ROS controller which is responsible for real-time tasks of our robot. CORE2-ROS is a computer inside ROSbot 2.0 and it’s basically a combination of ASUS Tinker Board single board computer and CORE2 real-time board.</p><h4>2. <strong>Executing ROS nodes on your robot</strong></h4><p>Connect to your robot through SSH and execute the following commands in the Linux terminal (each in a separate terminal!):</p><ul><li>roscore — ROS nodes will not be able to communicate without roscore. Each ROS system needs to have a roscore process running.</li><li>rosrun web_video_server web_video_server — it launches the server for streaming ROS image messages as video through the web.</li><li>roslaunch rosbridge_server rosbridge_websocket.launch — it launches the web sockets to allow web apps to publish or subscribe ROS messages.</li></ul><p>The commands bellow are specific for ROSbot 2.0 and for Orbecc Astra RGB-D camera. For other robots and cameras you will need to review the documentation of the devices you are going to use:</p><ul><li>roslaunch astra_launch astra.launch — it starts a driver for Orbbec Astra RGB-D camera</li><li>/opt/husarion/tools/rpi-linux/ros-core2-client /dev/ttyCORE2 — this is a bridge for communicating of CORE2 controller with ROS system. In this example, CORE2 is responsible for driving motors and estimating ROSbot position based on encoders. For different robot, you may need to switch this node to other driver.</li></ul><h4>3. Testing the web UI!</h4><p>Now right click the index.html file and select “Open with Live Server [Alt + L Alt + O]” option. You should see a web user interface for your robot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MnsEt3kSkibxJfyWVI08sA.png" /></figure><h3>Deploying web user interface to the robot</h3><p>Currently we’ve got a web user interface running on a PC, and in this step we will make it run on our robot.</p><p>Start with creating new folder on your robot and copy your app files to inside. On your robot edit Nginx configuration file by typing in:</p><pre>sudo nano /etc/nginx/sites-enabled/default</pre><p>find line:</p><pre>root /var/www/html;</pre><p>and change value /var/www/html to the path to your app. Restart Nginx:</p><pre>sudo systemctl restart nginx</pre><p>Nginx will start automatically at boot. You do not need to launch it again.</p><p>Open a web browser and type in your robots IP in the address bar. You should now see the UI which you have created (so cool!).</p><h3>Summary</h3><p>In this article I guided you through process of creating a simple web user interface based on Bootstrap 4 framework for ROS powered robot. I showed you how to run that interface on your PC and how to host it on your robot. The best thing about it is the simplicity of creating awesome web UIs in minutes thanks to Bootstrap 4, Robot Web Tools and Visual Studio Code.</p><p>Let me know what have you managed to create with the combination of ROS and Bootstrap 4!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a77a8e373f9" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/bootstrap-4-ros-creating-a-web-ui-for-your-robot-9a77a8e373f9">Bootstrap 4 + ROS : creating a web UI for your robot</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Batteries pt.2 — Li-Ion and NiMH batteries charging guide]]></title>
            <link>https://medium.com/husarion-blog/batteries-pt-2-li-ion-and-nimh-batteries-charging-guide-c6519d9b2760?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/c6519d9b2760</guid>
            <category><![CDATA[charging]]></category>
            <category><![CDATA[robots]]></category>
            <category><![CDATA[li-ion-battery]]></category>
            <category><![CDATA[battery]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Radek Jarema]]></dc:creator>
            <pubDate>Tue, 15 May 2018 21:41:06 GMT</pubDate>
            <atom:updated>2018-05-15T21:40:04.138Z</atom:updated>
            <content:encoded><![CDATA[<p>In the <a href="https://medium.com/husarion-blog/batteries-choose-the-right-power-source-for-your-robot-5417a3ec19ca">previous article</a> I described the most popular battery types that are commonly used in robots — Li-Ion, Li-Poly and NiMH batteries. I also explained how to choose the right battery model for different robotic applications. So the only remaining question is how to charge them effectively. A convenient method of charging can be the determining factor during the battery selection process.</p><h4>Consumer Li-Ion batteries and chargers</h4><p>The word “consumer” is used in relation to foolproof batteries and chargers that are commonly used by average, often non-technical, users. The Li-Ion batteries are not available in “AA” form factor to avoid confusion (single Li-Ion cell works under 3.7V instead of 1.5V in regular AAs), but you can find them in 18650 and other cylindrical forms. Most of the consumer Li-Ion cells have a built-in protection circuit,and in my opinion they should bebe named as “consumer” only when protection is in place.</p><p>To charge them, you need a charger that is only slightly bigger than a battery holder and looks very similar to the holder itself., In fact it is a battery holder with a mini charging circuit ☺</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9SBcQnuvD7pl221R5z2Rg.jpeg" /><figcaption><em>Chargers for one or two 18650 Li-Ion cells</em></figcaption></figure><p>Fun fact: if you would like to find a charger for <strong>three</strong> 18650 Li-Ion batteries, you would have a hard time… it’s almost impossible. I only found one (ever)and it was in a set with the high-power LED flashlight (why would somebody put a flashlight in a charger?). I hope somebody will eventually start manufacturing chargers for three 18650s in the near future. The chargers for four batteries are available on the market.</p><p>If you would like to have a better control over the charging process, use one of the more intelligent chargers:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/824/1*dHk_JEi61agNazz2eocUDQ.jpeg" /><figcaption><em>An intelligent charger for two cells</em></figcaption></figure><p>You will not only get more control but also better quality of the charging process, and therefore longer battery life. The model on the picture has adjustable contacts to fit different sizes of cells.</p><p>The drawback of using consumer, cylindrical batteries is the electrical contact which sometimes causes problems, when the quality of a holder is poor, or if your robot is exposed to vibrations.</p><p>Another drawbacks are the necessity of removing the batteries for charging and occupying an additional space by the battery holder.</p><p>To use the cylindrical cells in your robot, you only need to find an appropriate battery holder with couple springs, like this one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oxu0AzAhrrX4pia__2m4wg.jpeg" /><figcaption><em>A battery holder for three 18650 cells</em></figcaption></figure><h4>Consumer NiMH batteries and chargers</h4><p>When it comes to consumer NiMH batteries, the general rules are practically the same as for Li-Ions — you can buy easy to use batteries and chargers. The only difference is that there are “AA” or “AAA” forms of NiMHs rather than “18650” forms in Li-Ion. There are also C, D or 6F22 sizes available.</p><p>The chargers are similar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*fGY8vwnoYiM-Nlngoj0pDw.jpeg" /><figcaption><em>A charger for 4 AA or AAA cells</em></figcaption></figure><p>Some models of the chargers work with both NiMH and Li-Ion cells.</p><h4>Chargers and batteries for RC hobbyists</h4><p>RC hobbyists should have enough knowledge and experience to deal with different types of connectors, battery chemistries, settings, modes of charging and microprocessor-powered chargers. Batteries which require more caution from the user side are available only in shops dedicated for professionals and makers, like HobbyKing.</p><p>RC (Radio-Controlled) cars and boats, less often drones, can be also powered by popular, consumer cylindrical batteries, but due to the drawbacks mentioned before, the RC hobbyists prefer the battery packs with wires and dedicated connectors. You can see examples below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UV__SzvE-QhJlxF3slH3Tg.jpeg" /><figcaption><em>A battery packs: NiMH (left) and Li-Poly (right)</em></figcaption></figure><p>These battery packs can’t be put into the charger slots but need to be connected by cable. I will not get into very much detail but you should know that there are generally two groups of battery packs connectors:</p><ol><li>Power connectors — they have two pins. Their size depends on the maximum current. The most popular ones are XT30, XT60, XT90, T-connector, Tamiya and JST. The chargers are often sold with adapters for different connector types.</li><li>Balancer connectors — only for battery packs with two or more cells. These are more standardized and JST-XH are the most popular. There are also smaller versions like JST-SH (Nano JST), JST-ZH (Micro JST). JST is a name of a leading manufacturer of these connectors. The balancer connector has two to eight pins (number of cells + 1).</li></ol><p>You can charge these batteries using appropriate chargers that can be found in the same stores that the batteries you’re using:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DZe3tT8ZyXs1cy6-4EGVFw.jpeg" /><figcaption><em>Different chargers available in RC hobby stores</em></figcaption></figure><p>The black chargers from a photo above are the simplest, and they are capable of charging only Li-Ion batteries in the 1S, 2S or 3S configuration. The bottom left one is similar but has 3 modes — for LiPo, LiFe and NiMH chemistries. The biggest one is an example of advanced charger that is able to charge NiCd, NiMH, Pb and Li-Ion batteries and has many connectors:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*joiHJjFKhwSM_HozUxSQbA.jpeg" /><figcaption><em>Universal, programmable charger for different batteries</em></figcaption></figure><p>I would recommend such a programmable charger (not necessarily this brand ;) ) if you experiment a lot with different projects. The picture above shows the power connectors (on the left), and the balancer connectors (on the right) that are used to charge battery packs from 2S to 6S.</p><h4>The cost effective solution</h4><p>Many readers probably know that 18650 Li-Ion batteries have the best efficiency to price ratio. Thy are actually quite cheap however there are some drawback of using them:</p><ul><li>They don’t have a “button” on the positive terminal and are shorter than consumer ones (no protection board), therefore it’s not easy to provide a good contact in the battery holder with the springs. You need to modify the holder, adding a flat, metallic pad, made from a good conductor.</li><li>Even if you provide a good contact, you don’t have the balancer connector in your battery pack. You need to solder something to springs… but sometimes it may be impossible because the plastic holder will begin to melt. Still not an ideal solution.</li></ul><p>The solution I discovered is a battery holder for a single cell, with the different springs that can be adjusted for shorter cells:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/538/1*nbzjJGSsR-8oii2pF7v7iw.jpeg" /><figcaption>Single-cell battery holder</figcaption></figure><p>Buy the needed amount of single-battery holders, connect the power and balancer wires and you have the cheapest power source, that is still easy to charge and keeps balance between the cells!</p><p>Here’s an example of a ready solution which we have developed at Husarion: <a href="https://husarion.com/manuals/husarion-add-ons/#husarion-add-ons-hbatterypack-2">https://husarion.com/manuals/husarion-add-ons/#husarion-add-ons-hbatterypack-2</a></p><h4>Protection is not always good</h4><p>In the previous article I mentioned that protection circuits, built into some of the batteries, are not too good for drones, because of the possibility of activating the protection when the drone is 10 meters above ground.</p><p>The other issue may occur when your charger is dedicated for Li-Poly batteries and you would like to use it to charge the consumer cells with the protection, using the custom-made holder with balancing wires.* The protection can be activated when, for example, battery is discharged below the lower limit to avoid further discharging and permanent damage. In effect, your charger may not even start charging because it thinks that one or more cells are damaged. So what you end up with is a discharged battery that you can’t recharge (yup, that’s bad). You can’t read about it in the manual and then decide if it’s possible to charge a cell with activated protection. You have to check that yourself.</p><p>The above comment doesn’t refer to consumer chargers, where you insert every cell separately — they are adapted to such scenarios and can charge even the cells with the initial voltage equal to 0V.</p><p>* - Li-Poly chargers, in general, can be used also for charging Li-Ion batteries, because of the same voltage characteristic, unless the chemistry is similar (there may be the exceptions that I don’t know yet).</p><p>As always, I hope it helps. Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6519d9b2760" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/batteries-pt-2-li-ion-and-nimh-batteries-charging-guide-c6519d9b2760">Batteries pt.2 — Li-Ion and NiMH batteries charging guide</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Batteries — choose the right power source for your robot]]></title>
            <link>https://medium.com/husarion-blog/batteries-choose-the-right-power-source-for-your-robot-5417a3ec19ca?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/5417a3ec19ca</guid>
            <category><![CDATA[battery]]></category>
            <category><![CDATA[electricity]]></category>
            <category><![CDATA[charging]]></category>
            <category><![CDATA[robots]]></category>
            <category><![CDATA[power]]></category>
            <dc:creator><![CDATA[Radek Jarema]]></dc:creator>
            <pubDate>Thu, 12 Apr 2018 19:47:31 GMT</pubDate>
            <atom:updated>2018-04-13T05:31:18.724Z</atom:updated>
            <content:encoded><![CDATA[<p>In the following article I would like to share some practical advice about supplying mobile robots with power. Let’s jump right into it.</p><h3>Types of batteries used in robotics</h3><p>There are many different types of batteries available on the market however to keep things simple we’ll divide them into two groups.</p><p>Batteries that are great for robots:</p><ul><li>Li-Ion — lithium-ion battery</li><li>Li-Poly — lithium polymer batteries</li><li>NiMH — nickel–metal hydride battery</li></ul><p>And batteries that are not that great….meaning, don’t use them:</p><ul><li>Lead-acid battery — all types (including VRLA, SLA, gel or AGM) don’t like charging-discharging cycles and works much better as a backup power supply for stationary applications. They also have low capacity per weight unit.</li><li>NiCd — nickel-cadmium battery — similar to NiMH, but currently they are being withdrawn from use, because of toxic cadmium and no advantages over NiMH cells.</li><li>NiH2 — nickel-hydrogen battery — have you ever heard about that one? Probably not, unless you were building the Hubble Space Telescope…</li></ul><p>There are couple other types, however we won’t be discussing anything expensive, difficult to buy, or difficult to charge.</p><p>A table below will give you a general overview of the battery types mentioned above (the ones suitable for robots). There are many modern Li-Ion cells, which allow discharging them with current up to 90C, but the table would be 10 times wider if I wanted to describe all of them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*Z1sTyREW0_oIQcYThTVHVw.png" /></figure><p><em>*- the currents are usually defined as multiplied “C” — the capacity divided by hour; “2C” current for 2000mAh cell means “4000mA”.</em></p><p><em>**- CC, CV, ΔV/ ΔT — charging methods: constant current, constant voltage, deltaV/deltaT (detection of voltage or temperature peak)</em></p><h3>Comparison of Li-Ion, Li-Poly and NiMH</h3><p>In fact, Li-Poly batteries are the sub-group of the Li-Ion batteries. We can say that they are a special version of regular Li-Ion batteries. Why are they special? The difference is that during production, Li-Ion cells need to be pressed into a metal can (usually cylindrical) so that they remain in one piece. Li-Poly cells, which were introduced later, have different construction and can hold themselves up without the support of the external cylinder.</p><p>However, electrical parameters of Li-Ion and Li-Poly are almost identical.</p><p>The NiMH batteries are popular due to low internal resistance and good power-to-weight ratio. They are also much safer than Li- based cells. Explosions of such batteries are really rare (however I wouldn’t recommend throwing them in the fire ;)). The specific energy (energy-to-weight ratio) of NiMH is much worse than lithium cells.</p><h3>Battery shapes</h3><h4>Cylindrical</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/769/1*bktb_HcpYMd83Za0yWbLew.jpeg" /><figcaption><em>Two 18650, Li-Ion cells: industrial (yellow) and consumer (blue) type</em></figcaption></figure><p>The most popular form of any batteries is a cylindrical can. Used for Li-Ion, NiMH and very rarely for Li-Poly cells (they doesn’t need a can as mentioned earlier). The cells on the photo above have an 18mm diameter and are 65mm long. That’s the reason why they are called “18650” cells. So, If you find a 18650 cell, you can be almost certain that it’s a Li-Ion cell.</p><p>You can see that the yellow one has a flat “+” terminal — it is prepared for welding cells in a group to form battery packs (like the one shown below). The blue, “consumer” cell has a raised “+” terminal, so it can be easily inserted and removed from a battery holder with a spring on the “-“ terminal side. Consumer cells often have built-in protection circuits and therefore are about 2–4mm longer than regular 18650 cells.</p><p>Other popular dimensions for Li-Ions and NiMH cells are 14500 (14x50mm) widely known as AA. You can also find 18500, 26650, 16650, AAA, C, D and many other types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*quGyNEIf7j_Fx7xWPv9RLA.jpeg" /><figcaption><em>A battery pack</em></figcaption></figure><h4>Prismatic</h4><p>This shape is used when the battery construction requires a metal can. The prismatic Li-Ion cells were commonly used in handheld devices (like cell-phones) when the Li-Poly batteries were not yet popular. Fun fact: Nokia 3310 used a NiMH battery in a prismatic shape.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/433/1*ACC-z_kR8p-kl8xzrf3pSQ.jpeg" /><figcaption><em>The prismatic cell</em></figcaption></figure><h4>Pouch</h4><p>As mentioned before, Li-Poly batteries, do not need a metal enclosure. They are produced in form of thin, elastic slices, which are stacked and inserted into the pouches instead of being rolled up into the can. Lack of the metal packaging is the main reason why “Li-Poly” weighs less than “Li-Ion”, providing the same power.</p><p>Pouch cells are cost-effective and are usually be very thin therefore are a perfect fit when it comes to supplying smartphones, tablets and netbooks with power.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/917/1*6Ge7LkRGd6_3r9mykniumQ.jpeg" /><figcaption><em>A Li-Poly pouch cell.</em></figcaption></figure><p>Pouches can sometimes have protection circuits:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/863/1*RbAGiUZAacmtooDS3Ne-dg.jpeg" /><figcaption><em>A protection circuit extracted from the Li-Poly pouch cell.</em></figcaption></figure><p>They can also be stacked in blocks:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*bNVHJd9WJls7DIr9lKvVQg.jpeg" /><figcaption><em>The Li-Poly battery made of 5 pouches stacked together.</em></figcaption></figure><p>These blocks are often used in drones, RC cars and other high-power toys. Li-Poly batteries for RC hobbyists don’t have any protection circuits. This is quit a unique situation if you take consumer market into consideration.</p><p>It is important to remember not to confuse Li-Polys for smartphones and Li-Polys for quadcopters! The first ones are usually high-energy types, have quite big internal resistance and low maximum discharge current (about 1C). On the other hand, batteries for RC hobbyists are prepared for discharging with high current, up to 30–90C! So…they are both Li-Polys…but completely different.</p><h3>Example robots — what batteries to choose?</h3><p>Robots are different, so is their appetite for power. Let’s discuss three robot examples for the purpose of this article:</p><ul><li>Mini-sumo robot</li><li>Quadrocopter</li><li>Small AGV</li></ul><h4>Mini-sumo robot</h4><p>What is a sumo robot? It is a robot designed to fight with another robot in sumo-competitions. Rules of such competitions usually specify the limit of 10 x 10 cm footprint, with any height allowed. The maximum weight is 500g. In most cases mini-sumo robots use two DC or brushless motors and some additional moving parts used for levering or confusing the opponent.</p><p>In our example, we will use two DC motors for driving and a scoop for lifting the opponent up, making it lose its grip. The scoop is placed above the robot at the beginning, so the robot footprint is within the limit. Just after the start, a scoop will move to the lower position and will be located in front of the robot. The scoop is controlled with an RC servo.</p><p>Usually competitions themselves are quite short but the robot must remain operational for several battles in a row. Let’s assume that 15 minutes is a total minimum working time.</p><p>We also assumed that we will use some low-impedance capacitors to handle the high-current peaks drawn by motors, so the batteries have to deliver about 4A in a peak. The average current used by robot will be about 2A.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*v02uVJBMe5ss5objqog3tQ.png" /></figure><p>So, let’s now specify the requirements for the batteries:</p><ol><li><strong>Size</strong> — the batteries shall be as small as possible.</li><li><strong>Weight</strong> — about 150g.</li><li><strong>Nominal voltage</strong> — the motors have 6V nominal voltage, the electronic circuits usually need regulated 5V supply, so the absolute minimum is 7V. There must be a margin for negative voltage peaks and drop-off voltage on regulator and cables.</li><li><strong>Maximum discharge current</strong> — we estimated before that 5A should be enough.</li><li><strong>Capacity</strong> — the average current is 2A and minimum working time is 15 minutes, so the required capacity is 500mAh.</li><li><strong>Other</strong> — a possibility of fast charging is an advantage.</li></ol><p>Having these parameters, we can list a few matching batteries to choose.</p><p><strong>NiMH: 7x AAA battery pack — FDK HR-4U or similar</strong></p><ul><li>Dimensions: 74 x 45 x 11.5 mm</li><li>Nom. voltage: 8.4V (1.2V per cell)</li><li>Min. voltage: 7V</li><li>Max. discharge current: unknown, datasheet specifies the capacity for 2A (2C) discharge, NiMH usually allow 3C-5C for a short time</li><li>Volume: 38.3 ccm (cubic centimeters)</li><li>Weight: 100g</li><li>Capacity: 930mAh</li><li>Price: about $12-$25</li></ul><p>Comment: Easy to charge and safe. Long charge time, but can be used as replaceable batteries with the battery holder (needs more space). Only 100g of weight. The lowest capacity-to-price ratio.</p><p><strong>Li-Ion: 3x18650 battery pack: Tenergy 31012, 11.1V 2200mAh with protection circuit</strong></p><ul><li>Dimensions: 68 x 56 x 19 mm</li><li>Nom. voltage: 11.1V (3.7V per cell)</li><li>Min. voltage: 8.4V</li><li>Max. discharge current: 2C = 4.4A</li><li>Volume: 72.4 ccm</li><li>Weight: 140g</li><li>Capacity: 2200mAh</li><li>Price: about $27</li></ul><p>Comment: More difficult to charge, but charging is much quicker. Integrates a protection circuit to avoid overcharging, over-discharging and short circuits. Bigger than NiMH but has over twice of its capacity, so you will not worry about charging or replacing it during the day.</p><p><strong>Li-Poly: Hyperion G5 50C 2S 850mAh LiPo</strong></p><ul><li>Dimensions: 75 x 27 x 14 mm</li><li>Nom. voltage: 7.4V (3.7V per cell)</li><li>Min. voltage: 6V</li><li>Max. discharge current: 21A</li><li>Volume: 28.4 ccm</li><li>Weight: 48g</li><li>Capacity: 850mAh</li><li>Price: about $10</li></ul><p>Comment: Right choice if you want the best performance and the lowest weight and volume. The drawback is the low voltage — you have to keep cables short and use the LDO regulators for electronics. It doesn’t have any protection circuit, so it’s a less safe option!</p><h4>Quadrocopter</h4><p>Let’s now discuss an example of a flying robot, which should be as lightweight as possible (it needs to fly right?). There are different sizes but let’s say it’s a 45 x 45 cm drone. It uses four BLDC motors for propellers, have a small but smart electronic circuits and a radio transceiver. The power source shall deliver a lot of energy in a short time.</p><p>We assumed that all calculations related to drone weight and motors power have been done and we know that we need a battery with nominal voltage of about 14–15V.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/592/1*1Q--PS8eaSFedfqEVhnEgg.png" /></figure><p>The requirements for the batteries are:</p><ol><li><strong>Size</strong> — not critical.</li><li><strong>Weight</strong> — below 650g.</li><li><strong>Nominal voltage</strong> — about 14–15V.</li><li><strong>Maximum discharge current</strong> — min. 60A.</li><li><strong>Capacity</strong> — the average current is 22A and minimum working time is 10 minutes, so the required capacity is ~3700mAh.</li><li><strong>Other</strong> — replacing the battery should be easy. The protection circuit is not welcome because it can cause fatal drone accident if it cuts-off the battery.</li></ol><p>Examples of batteries that match these requirements:</p><p><strong>NiMH: </strong>not this time — we need a lot of energy from a weight unit; Li- based cells are much better</p><p><strong>Li-Ion: 12x18650 (4S3P) battery pack made of KeepPower IMR18650 2500mAh 3,7V 20A cells (20A continuous, 35A peak)</strong></p><ul><li>Dimensions: 134 x 57 x 38 mm</li><li>Nom. voltage: 14.8V (3.7V per cell)</li><li>Min. voltage: 8V</li><li>Max. discharge current: 3*20A = 60A</li><li>Volume: 290.3 ccm</li><li>Weight: ~600g (12*48g + cables and enclosure)</li><li>Capacity: 7500mAh</li><li>Price: about $100</li></ul><p>Comment: The capacity looks like much more than required but with the high current it can be even half of that. Li-Ions aren’t used in drones. As we can see, it’s not crazy to use them, but it is difficult to find and buy the high-current versions and they have much lower specific power (power-to-weight ratio) than high-current Li-Poly cells, which is critical in flying robots.</p><p><strong>Li-Poly: Turnigy Graphene 5000mAh 4S 45C Lipo Pack w/XT90 (45C continuous, 90C peak)</strong></p><ul><li>Dimensions: 144 x 51 x 41 mm</li><li>Nom. voltage: 14.8V (3.7V per cell)</li><li>Min. voltage: 12V</li><li>Max. discharge current: 45C = 225A</li><li>Volume: 301 ccm</li><li>Weight: 589g</li><li>Capacity: 5000mAh</li><li>Price: about $70</li></ul><p>Comment: Probably the parameters are overstated but it’s still the best choice because of a big margin of maximum discharge current. This should ensure a long life of a battery. The capacity-to-weight ratio is lower than for Li-Ion but only for low current discharging. In this application we won’t have low currents and the flight time will be shorter than calculated from the declared capacity.</p><h4>Small AGV</h4><p>AGV is an automated guided vehicle with a single board computer, a camera and many sensors on the board. It has 4 wheels, 2 of them are driven by DC motors. It’s application is to scan the shape of the rooms in different buildings and to create a map of the rooms with textures. The speed is not critical because focusing the camera lenses, scanning the room with LiDAR and computing or transmitting raw data takes pretty long. Therefore the robot can’t drive too fast.</p><p>This time the consumption is related to power, not to the current, because of many DC/DC converters that converts higher voltage and low current to lower voltage and high current. Then we can choose the minimum voltage for the battery — 10V — and calculate the average current for our convenience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*gEpgb_0i2wlbhzXsfb8cAg.png" /></figure><p>The requirements for the batteries are the following:</p><ol><li><strong>Size</strong> — below 150 ccm.</li><li><strong>Weight</strong> — below 500g.</li><li><strong>Nominal voltage</strong> — about 10–12V.</li><li><strong>Maximum discharge current</strong> — 9.3A.</li><li><strong>Capacity</strong> — the average current is 2.1A and minimum working time is 120 minutes, so the required capacity is above 4200mAh.</li><li><strong>Other</strong> — low self-discharge current is an advantage.</li></ol><p><strong>NiMH: </strong>not this time — energy is a priority; Li- based cells are much better</p><p><strong>Li-Ion: 6x18650 (3S2P) battery pack made of INR18650–35E Samsung 3500mAh</strong></p><ul><li>Dimensions: 67 x 57 x 38 mm</li><li>Nom. voltage: 10.8V (3.6V per cell)</li><li>Min. voltage: 9V</li><li>Max. discharge current: 16A</li><li>Volume: 145 ccm</li><li>Weight: 300g</li><li>Capacity: 7000mAh</li><li>Price: about $30</li></ul><p>Comment: Very good choice. The specific energy (capacity-to-weight ratio) is much greater than required for this volume. The price is low.</p><p><strong>Li-Poly: a 3S1P battery pack made of LP616594 4700mAh 3.7V</strong></p><ul><li>Dimensions: 94 x 65 x 19 mm</li><li>Nom. voltage: 10.8V (3.6V per cell)</li><li>Min. voltage: 9V</li><li>Max. discharge current: 9.5A</li><li>Volume: 113 ccm</li><li>Weight: 236g</li><li>Capacity: 4700mAh</li><li>Price: about $60</li></ul><p>Comment: Lower weight and volume, but worse specific energy and higher price. An example of a low-current Li-Ion type — the maximum current is only 2C but it is enough for this purpose.</p><h3>Summary</h3><p>I wrote this article to show you the way of choosing the right battery for your robot. I hope it helps:)</p><p>P.S.</p><ul><li>Even if you recognize that your battery is a Li-Poly LiCoO2 by its appearance, you have to look into the documentation anyway. Each chemistry can be optimized for more power or more capacity — you don’t know.</li><li>The protection circuits increase the safety and lifespan of the battery but if your drone falls down because of triggering the protection, then the 1000 cycles of charging are not that valuable…</li><li>Choosing the right battery size, version, high-current capability, capacity etc. is much more important than choosing between NiMH or Li-Ion. Sometimes I see robots powered from 6F22 battery. It is like using 125ccm scooter for towing a 500kg trailer.</li><li>Charging of mentioned batteries is the topic for another article which I will publish in the near future.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5417a3ec19ca" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/batteries-choose-the-right-power-source-for-your-robot-5417a3ec19ca">Batteries — choose the right power source for your robot</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Don’t buy expensive sensors for your robot — use your smartphone]]></title>
            <link>https://medium.com/husarion-blog/dont-buy-expensive-sensors-for-your-robot-use-your-smartphone-24380eab521?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/24380eab521</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[robot-operating-system]]></category>
            <dc:creator><![CDATA[Dominik Nowak]]></dc:creator>
            <pubDate>Fri, 23 Mar 2018 08:16:54 GMT</pubDate>
            <atom:updated>2020-12-22T14:34:02.694Z</atom:updated>
            <content:encoded><![CDATA[<p>Everybody carries advanced sensors in their pockets each day. Camera, accelerometer, gyro, pressure sensor, proximity sensor and many more - they are all embedded into your smartphone. Now you can use them in your robot, for free.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/414/1*rUjJKTqUupHVUVuyL-YsKg.png" /></figure><p>Let me introduce <a href="https://play.google.com/store/apps/details?id=com.husarion.node">hNode - free Android app</a> from Husarion. What is does is provide a ROS node with the access to real-time smartphone sensor data. hNode is connected to the robotic system through Husarnet — a P2P, VPN network dedicated for robotics.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*4HX4-puvYNnV9ey4." /></figure><p>Devices connected to Husarnet network can be considered as one, distributed, virtual robot where each of the elements communicate with each other through the Internet. It doesn’t really matter whether they are in the same network or not. All hosts can see each other through hostname or IPv6 private address. Providing data through such a network is very fast because devices are directly connected to each other without a central cloud forwarding the traffic. It also works with embedded devices. Husarnet infrastructure is used only for one-time setup of the Virtual Robot network and for adding additional elements to it — such as smartphone with a hNode app.</p><p>To add hNode to your Virtual Robot all you have to do is to generate and scan a QR code from app.husarnet.com and choose a name for your smartphone.</p><p>After the process your phone becomes a ROS node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/394/0*rBaLz1uOKSGqTRt_." /></figure><p>That node provides sensor data as standard ROS topics. Just type in Linux terminal:</p><blockquote><em>rostopic list /myphone1/</em></blockquote><p>to display ROS topics provided by your smartphone.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/0*cloZOyhmdxbPBLK2." /></figure><p>To preview data from a single topic, eg. pressure sensor you can use that command inside any ROS device within the Husarnet network</p><blockquote><em>rostopic echo /myphone1/pressure</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/387/0*w8hke3GJilpZo4A1." /></figure><p>Preview from IMU gives not only accelerometer or gyro data, but also a full orientation in quaternion notation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/0*iPsKedxXIquKtxla." /></figure><p>Previewing the image from one of the two availables camera can be done by the following command:</p><blockquote>rosrun image_view image_view image:=/myphone1/camera0/image _image_transport:=compressed</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/790/0*uLmYwaC4Iam6sEr-." /></figure><p>To let you kickstart your project using hNode app we’ve created a <a href="https://husarion.com/core2/tutorials/husarnet/following-object-using-your-smartphone/">tutorial</a> showing you how to create a Virtual Robot containing a simple robot based on CORE2-ROS (running ROS) controller, LEGO Mindstorms mechanics, a laptop (also running ROS) and a smartphone with hNode Android app.</p><p>Husarion provides a technology which accelerates robot development process. hNode is the next element that will help you easily achieve your goal of creating advanced robots effortlessly and in reasonable price. I hope you’ll like it :).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=24380eab521" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/dont-buy-expensive-sensors-for-your-robot-use-your-smartphone-24380eab521">Don’t buy expensive sensors for your robot — use your smartphone</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fresh look at self-balancing robot algorithm]]></title>
            <link>https://medium.com/husarion-blog/fresh-look-at-self-balancing-robot-algorithm-d50d41711d58?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/d50d41711d58</guid>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[arduino]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[electronics]]></category>
            <category><![CDATA[robotics]]></category>
            <dc:creator><![CDATA[Dominik Nowak]]></dc:creator>
            <pubDate>Mon, 05 Mar 2018 22:31:12 GMT</pubDate>
            <atom:updated>2020-12-22T14:35:29.065Z</atom:updated>
            <content:encoded><![CDATA[<p>Self-balancing robot is a cool project, which many makers like to build somewhere during their journey through the world of robotics.</p><p>In most cases you can find on the internet there are three different types of motors used in a self-balancing robots:</p><ol><li>stepper motors</li><li>DC motors</li><li>DC motors with quadrature encoders</li></ol><p>Options a) and b) do not give you feedback on the distance (even in case of stepper motor it is easy to lose steps), so we’ve decide to use DC motors with encoders. Robot keeps balance like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*3wf00ERu6WEgtRZm." /></figure><p>What you see is basically a telepresence robot which can be controlled through the internet from anywhere with anyone via shareable link.</p><p>Now let’s go deeper into the story.</p><h3><strong>Existing self-balancing robot constructions and our way to make our own</strong></h3><p>90%+ of all self balancing constructions found on the internet are based on Arduino, so it’s rather hard to expand them with new functionalities because of lack of computing power and a single infinite loop with everything done within it.</p><p>While creating our own self-balancing construction, we had the following assumptions in mind:</p><ol><li>using <strong>DC motors with encoders</strong></li><li>using <strong>MPU9250 </strong>inertial measurement unit, but not raw accelerometer and gyro data, but complete 3D orientation data from DMP (Digital Motion Processor) inside this chip</li><li>creating an elegant control algorithm that is responsive, resilience to interference, easy to understand and easily scalable for other mechanics with only a small tune up of PID parameters</li><li>creating an easy to use class for robot control algorithm with a simple API and control algorithm working as a “background task”, so the robot firmware will be easy to expand.</li><li>make it <strong>open source</strong> to help people reuse and modify it in their own projects</li></ol><p>At first let’s start with the hardware we used.</p><p>Our robot is based on <a href="https://store.husarion.com/collections/frontpage/products/core2"><strong>Husarion CORE2</strong></a> robotic controller that has integrated interfaces for <strong>up to 4 DC motors with quadrature encoders</strong> that are handled in “hardware” (there’s a dedicated timer working in quadrature encoder mode), so it doesn’t waste processing power of CPU to handle encoders. Husarion CORE2 controller is programmed thanks to easy API in C++ 11 provided by open source programming framework available at <a href="https://github.com/husarion/hFramework"><strong>https://github.com/husarion/hFramework</strong></a> (MIT license) with Arduino compatibility layer (which is not used in this software, but could be if you are an Arduino enthusiast 😊 ).</p><h3>What are the results? Just take a look</h3><p>Our goal was to prepare not only the control algorithm but also provide easy to use API. It looks like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0368c6235d7abd2c4512e0534cf800f6/href">https://medium.com/media/0368c6235d7abd2c4512e0534cf800f6/href</a></iframe><p>Using this API we’ve create our telepresence robot. Here are the main features of the final project:</p><p><strong>Smooth driving</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*jJ06x3rUaJmhJBW2." /></figure><p><strong>Resilience to disruptions</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*K_6SGkAljzrSUbOa." /></figure><p><strong>Servo controlled leg to start/stop balancing</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*AF1OEV1RkC2Tv9ag." /></figure><p><strong>Intuitive web user interface — </strong>you can control this robot from a web browser with arrows on your keyboard or built in joystick in the user interface</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*CJzzIoumVo2cbSGp." /></figure><h3><strong>Stabilization algorithm explained</strong></h3><p>After a lot of trials and errors we have finally created a control algorithm based on 4 PID regulators:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*HauxApy0BUFRi93d." /></figure><p>It may look complicated at first glance but it is quite easy to understand. Let’s analyze it from right to left:</p><p>At a hardware level we’ve got the following interface provided by motors and sensors:</p><ol><li><strong>Power and turning direction</strong> that could be applied to a motor (API call “<em>motorRight.setPower(1000)</em>”, means 100% PWM signal and forward rotation, “motorRight.setPower(-500)”, means 50% PWM signal and backward rotation), information about <strong>angle </strong>in degrees (0° — robot is in vertical position to ground, &gt;0° — robot is leaning forward), and <strong>encoder counter information</strong> for each of the wheels (&gt;0 — robot moved forward by a positive number of “encoder ticks”).</li><li>The first level of <strong>PID regulators to control power applied to each motor</strong> to achieve the target speed (measured thanks to encoder signal and known control loop frequency). In the previous version of software we haven’t used these PID regulators which led to inability to follow straight line while driving, and instability in turning — each of the motors have a different electrical characteristics for forward/backward rotation. Thanks to this level of PID regulators we can control not the power, but a rotation speed of each motor.</li><li><strong>PID angle regulator</strong> — keeps desired angle between robot chassis and a ground based on feedback from MPU9250. PID angle receives an interruption from a MPU9250 every 20ms with fresh angle data. Thanks to the interrupts we don’t waste processing power of thee CPU on asking the chip whether new data is present (we use RTOS, so CPU doesn’t care about this task until new data from the sensor is available).</li><li><strong>PID speed</strong> — it does similar work to the motor speed regulator but controls speed of the whole robot, not only a single motor. Imagine that this regulator controls robot angle to ground to achieve a desired speed, because if the robot tilt is positive, it has to accelerate to prevent falling down. If the final speed is reached, robot automatically backs to the 0° angle to the ground (based on Newton’s first law of motion).</li></ol><p>Here’s a sample of the stabilization algorithm code below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f141f902794e399987c22918164387a/href">https://medium.com/media/1f141f902794e399987c22918164387a/href</a></iframe><h3><strong>How can you get started?</strong></h3><p>Full source code is avaiable at</p><h4><a href="https://github.com/husarion/self-balancing-telepresence-robot"><strong>https://github.com/husarion/self-balancing-telepresence-robot</strong></a> .</h4><p>I hope you find this article helpful and wish you a great self-balancing-robot-building experience 😊 . Your feedback means a lot, so feel free to ping me at <a href="/service/mailto:dominik.nowak@husarion.com">dominik.nowak@husarion.com</a> or place a post on our community forum <a href="https://community.husarion.com/"><strong>https://community.husarion.com/</strong></a> if you feel like sharing your thoughts. Take care!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d50d41711d58" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/fresh-look-at-self-balancing-robot-algorithm-d50d41711d58">Fresh look at self-balancing robot algorithm</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ROSbot 2.0 — a new, open-source autonomous robot platform]]></title>
            <link>https://medium.com/husarion-blog/rosbot-2-0-a-new-open-source-autonomous-robot-platform-640af0b95a8d?source=rss----ed2c6add1402---4</link>
            <guid isPermaLink="false">https://medium.com/p/640af0b95a8d</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[robots]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[robotics]]></category>
            <category><![CDATA[robot-operating-system]]></category>
            <dc:creator><![CDATA[Dominik Nowak]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 14:12:58 GMT</pubDate>
            <atom:updated>2020-12-22T13:43:40.349Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating a simple robot is not a big deal anymore. All you need is few Arduino boards, some motors, a chassis from aliexpress, couple power drivers, IR or Wi-Fi module for remote control and a few ultrasonic sensors to avoid obstacles.</p><p>But is such a robot something that can help you in your everyday life? If you compare it with, let’s say, a Tesla car, with dozens of advanced sensors, cameras and powerful computers it seems questionable.</p><p>Let’s face it- there’s still a huge gap between toy robots, and real autonomous robots that can actually be useful on their own. The main drivers of this gap are cost, advanced technologies, and skills needed to build such sophisticated solutions.</p><p>Now imagine the world where building autonomous vehicles is democratized where all makers who previously built Arduino based robots will be able to prototype their own autonomous solutions, using newest technologies developed by a large community of engineers around the world.</p><p>At Husarion we believe that the true innovation is possible through democratization of technology. Technology which allows to affordably prototype and build modern, autonomous, intelligent robots, drones and transportation systems, should be accessible to everyone, not only big corporations with big budgets.</p><p>This is why we introduced ROSbot 2.0 — a new hackable, autonomous robot platform with robust mechanics, powerful computers, advanced sensors like LiDAR and RGBD camera, and ton of expansion ports. It also gives you access to our technology which allows you to outsource robot computing power to your laptop or external servers, no matter where they are. It is called Husarnet and thanks to that technology, lack of computing power will not be a problem any more.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YreLOUTvwbZJCYpZnjIK2A.png" /><figcaption>ROSbot 2.0</figcaption></figure><p>But why is ROSbot different than what we are already used to on the robotics market? Here are the main features of the platform:</p><h3><strong>Computing power</strong></h3><p>ROSbot is based on the most powerful version of Husarion controllers: CORE2-ROS with ASUS Tinker Board. This robot’s brain consists of two control units responsible for two different tasks:</p><ol><li><strong>Real-time unit</strong> — based on STM32F4 microcontroller with ARM Cortex M4 core is responsible for controlling motors, gathering feedback from encoders, Sharp distance sensors and anything else that requires real-time control (with accuracy of 1ms or less).</li><li><strong>Single Board Computer</strong> — ASUS Tinker Board with ARMv7-A core, 1.8GHz clock, 2GB RAM and 16GB Flash. This computer runs all high level robot algorithms running on Linux, with ROS, and other tools provided by Husarion.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3AgDMRjgvVSU5HNA." /><figcaption>CORE2-ROS robotic controller</figcaption></figure><h3><strong>Sensors</strong></h3><p>ROSbot is aware of what is going on with him and around him thanks to the following sensors:</p><ol><li><strong>RGBD camera </strong>— not a standard camera, but Orbecc Astra 3D camera. Range up to 8 meters, RGB image size up to 1280*960 px and depth image size up to 640*480 px. ROSbot can see in 3D and can recognize not only different objects but also distance to those objects.</li><li><strong>LiDAR </strong>— RPLIDAR A2 360° laser scanner is spinning all the time (up to 6 time per second) and measures distance to the surrounding objects. Thanks to that sensor ROSbot knows where the obstacles are and where he is in the building (he needs to create a map first). It’s a mandatory sensor if you’re serious about navigation.</li><li><strong>Distance sensors</strong> — auxiliary sensors to LiDAR. 4x sharp distance sensors are placed below the scanning surface of LiDAR and work as a “virtual bumper” warning ROSbot about objects on his way which are at least 5 cm high.</li><li><strong>IMU </strong>— MPU9250 inertial measurement unit containing 3 axis accelerometer, 3 axis gyro and a co-processor realising sensor fusion algorithm to output accurate data on 3D orientation of the ROSbot.</li><li><strong>Encoders </strong>— 4 x quadrature encoders give you feedback about rotation of each wheel. You can track the distance traveled by your robot, develop speed regulator, ASR (Acceleration Slip Regulation) or other traction control system.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lLL9G5RF2SthUzhd." /></figure><h3><strong>Robust mechanics</strong></h3><p>ROSbot is made from red and white powder-coated aluminium plates and all circuit boards are hidden inside this solid chassis. ROSbot is more robust and much prettier than plexiglass alternatives available on the market. It is also much faster and can carry more payload. Just take a look at the specs:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/605/1*Q9oHJCH8D-chnQlMddYrUg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9T1BAmr1Tm7QiVHvc5i9zw.png" /></figure><h3><strong>Expansion ports</strong></h3><p>ROSbot is a computer on wheels, and like to any computer you can connect your own stuff to your machine. You’ve got:</p><ul><li>2 x USB host ports</li><li>1 x HDMI port</li><li>1 x USB serial port (connected to the real-time unit of CORE2-ROS)</li><li>6 x servo motor ports</li><li>16 x GPIO, 8 x ADC, 2xUART, SPI, I2C in 3.3V standard</li><li>2 x programmable buttons</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lgVs_9R7QKMQRRp9." /><figcaption>ROSbot rear panel</figcaption></figure><p>ROSbot is a programmable, autonomous mobile platform. With your own extensions it can become:</p><ul><li>A mobile arm carrying goods from one place to another</li><li>A logistics robot pulling the cart in the warehouse</li><li>An agriculture robot taking care of the plantation crops</li><li>A cleaning robot</li><li>A pet caring robot</li><li>A guarding robot with an ASG weapon :)</li></ul><p>It’s all up to you!</p><h3><strong>Power supply</strong></h3><p>ROSbot is powered by 3 x 18650 Li-ION rechargeable batteries with (depending on the version) 2400–5000 mAh capacity. It’s usually enough for 1.5–7h of work. Standard batteries are easy to remove or replace — just unscrew 2 screws on the bottom. If you want to charge batteries inside the ROSbot, on the rear panel you will find a charging connector. A charger, that fits to this connector is included in the ROSbot standard package.</p><h3><strong>Additional computing power</strong></h3><p>ROSbot is not just about powerful hardware. Husarion is mainly a robotic software company and we are focusing on providing you easy to use technologies to make your robots connected. One of these technologies is Husarnet.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VfL30YNEy74jJBQA." /><figcaption>Husarnet explained</figcaption></figure><p>Husarnet is a P2P, VPN network dedicated for robotics. It allows you to create a “virtual robot” that is not limited to the computing power located inside your physical robot. Thanks to Husarnet some of robot tasks, especially those consuming much computing power, can be outsourced to remote servers or your laptop. It doesn’t matter whether your robot and servers are in different locations or behind a firewall. The communication is done directly between ROSbot and your machine — Husarnet infrastructure is used only one time to setup a VPN, P2P network.</p><h3><strong>So, let’s become a pro robot dev!</strong></h3><p>At Husarion we believe that the true progress is followed by democratization of the technology. Advanced, professional tools should be easy to use, cheap and accessible to anyone. We should all take part in creating the technologies of the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=640af0b95a8d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/husarion-blog/rosbot-2-0-a-new-open-source-autonomous-robot-platform-640af0b95a8d">ROSbot 2.0 — a new, open-source autonomous robot platform</a> was originally published in <a href="https://medium.com/husarion-blog">Husarion Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>