ROS 2 is a framework that's quickly becoming popular for developing robotics applications. It includes the industry's accumulated experience and shares it with the global community. Our team is actively involved in the development of new ROS 2 packages for the robots we use, as well as integrating them into the decentralized Robonomics network.
Technologies developed in one industry often find themselves being widely applied in other industries, even if they weren't originally designed for them. Thus, the internet, originally developed for military use, revealed its full potential in the civilian sphere, becoming an integral part of modern life. A similar trend may occur in the industry, where technologies developed for enterprise scenarios can also benefit end-users.
Historically, home automation and industrial robotics have evolved separately. Due to their high cost and safety concerns, industrial robots have primarily been limited to large-scale production. The software for managing production was confined within proprietary manufacturing execution and computer-aided manufacturing systems. Home automation at the same time usually represented a system of fairly simple devices for interacting with user gadgets, household appliances, lighting, heating, communication. The emphasis in communication was on wireless communication.
However, we are seeing trends. On the one hand, wireless communication protocols from the consumer sphere are gradually being adapted for industrial applications — for example, industrial versions of Wi-Fi or Bluetooth are appearing. On the other hand, manipulator robots are becoming more affordable and are beginning to be considered for use beyond industry. Even now, we can ponder how in the future, for example, safe collaborative robots will become an integral part of the home and will be able to make our lives more convenient, helping in cooking and other routine household chores. Also, open source implementations of industrial communication protocols — such as the DDS middleware protocol underpinning the ROS 2 framework — are becoming the heritage of enthusiasts from all over the world.
ROS 1 was developed for single robot management and could not meet the requirements of manufacturing enterprises: real-time operation, fault tolerance in unstable communication conditions, interaction with a large number of devices. Thus began the development of ROS 2, which was originally positioned specifically for the needs of industry and is now becoming mainstream in robotics. In the middle of 2023, an important event took place — 5 years after the appearance of ROS 2 Dashing in 2019, the number of ROS 2 packages used by engineers, according to metrics.ros.org, exceeded ROS 1 packages, and now about 70% of the software packages downloaded from the official repositories are for ROS 2.
The Robonomics team is at the frontier of this process and actively supports the ROS 2 Community. With our support, ROS 2 bindings for Rust are being developed (see it in our blog), as well as a ROS 2 Wrapper for using the main functions of Robonomics decentralized cloud. We also regularly test devices that support ROS 2, to specifically check our software in action on them. As one of such robots, we recently acquired myBuddy 280 — an inexpensive dual-arm manipulator for training and research from Elephant Robotics. The robot can lift up to approximately 250 grams and is priced around $1700, making it relatively affordable for first-time users.
Using the example of this robot, the advantages of ROS 2 are very clearly visible, which allow the potential use of this framework in home automation scenarios. In particular, thanks to the DDS middleware protocol, you can use myBuddy in conjunction with a relatively high-performance desktop PC and add a full-fledged robot into a typical smart home structure. If the robot and the computer are linked via the same local network and use the same DOMAIN_ID, they can communicate without any additional configuration. Basic software such as driver and hardware description packages runs on the robot's Raspberry Pi. The rest of the required application software such as "smart" movement planners like MoveIt, simulators like Gazebo, monitoring and visualization tools like RViz, Robonomics node, machine learning, batch log processing, IPFS distributed data transmission node and other tasks that require a significant amount of computational power can be run on this more powerful machine.
This arrangement allows for an optimal distribution of computational resources, essentially creating a microservice-like architecture. Thanks to the ROS 2 platform and the underlying DDS middleware protocol, this flexibility is possible, allowing each device to perform the tasks best suited to its capabilities. Via automatic device detection mechanisms built into DDS, ROS 2 topics and services will find each other without any additional settings.
It should also be noted that the architecture of ROS 2 implies a separation of the transport protocol (like DDS) into a distinct layer called ROS Middleware, making it easier to switch from one protocol implementation to another. Thus, after long discussions, the ROS community recently decided to switch to a lighter protocol called Zenoh, which is planned for 2024. For a deeper dive into this topic, we recommend referring to the ROS 2 MIddleware Alternatives report, which contains information about all DDS alternatives considered in 2023.
Despite the myBuddy 280 being marketed as ROS 2-compatible, it turned out to be insufficient for full-fledged operation in ROS 2 (even without motion planning software like MoveIt2). First, we had to replace supplied by default Raspberry Pi 4B model with a more powerful one with 8 GB of RAM to meet our needs. Second, after testing the ROS 2 package for myВuddy from the manufacturer we ran into problems. As is common in the open-source world, just because something is published in a public repository, it doesn't guarantee its functionality. The robot was pre-installed with the currently unsupported ROS 2 Galactic distribution, which expired in 2022 (by the way, you can read about the support periods of distributions here). Despite everything, we tried to run the robot on the outdated distribution and quickly encountered so-called deadlocks — such behavior in which launched subprograms (or computing processes) block each other's work. After some research, we found out that these errors were fixed in the LTS Distribution of ROS 2 Humble.
Unfortunately, the developers of Elephant Robotics stopped updating packages several years ago, and most importantly, not all the necessary packages for the robot were transferred from ROS 1 to ROS 2. So, we decided to take on the task ourselves. Due to the unavailability of the low-level API for ROS 2, we found it easier to develop our own implementation of the ROS 2 package, where we could add the control of myBuddy through Robonomics. For this, we took the Python module pymycobot and implemented our own ROS 2 driver.
Current custom driver can get states of each joints for both arms and wrist as well as send angles to them, publish robot joint states using Robonomics datalog and remote joint control by sending a launch function to the robot's address. If you want to try it, please note that updating the ROS 2 version by reinstalling a new image with packages on Raspberry Pi 4B can take a significant amount of time (approximately 2-4 hours).
In the future, we plan expand the functions of the driver and provide remote control of this robot through Robonomics within our laboratory in Cyprus. We also want to include the Robonomics ROS 2 Wrapper in the official list of rosdistro packages, so that users can install it automatically when initializing the ROS 2 project.
Stay tuned for our updates!