Hi everyone!
At Kiwibot we build sidewalk delivery robots. While deploying more and more Kiwibots worldwide, we came to need a robust remote debugging tool, which makes it possible to stream topics through a limited bandwidth LTE network connection between robots and our personal computers, with which we can use ROS’ amazing desktop viz tools. Today, we are introducing rosboard_client, a package that bridges two ROS systems and allows you to use rviz to visualize the data in real time coming from a robot located anywhere in the world in real time.
One of the most known tools for internet communication between two machines running ROS is rosbridge_suite. When testing, this was our first option , but it demonstrated consuming a lot of bandwidth and accumulating significant latency over time (some benchmarks showing this are presented in the repo). The library features some compression methods, but they did not provide too much of an improvement. Rosbridge aims to provide all the communication capabilities you would expect from two ROS systems running on the same network (topics, services, action servers), which go beyond what we needed.
On the other hand there is rosboard, which overcomes these bandwidth and latency problems in our use case, by relying on a set of subsampling and compression techniques. Thanks to that, it keeps good messaging rates and latency while less bandwidth is used. However rosboard has a web based UI that shows each message in a different widget, which makes it harder to understand complex navigation data like pointclouds and costmaps. Also, has a limited amount message types that support visualization, and does not allow to interact with 3D data or to change the tf frame in which it is shown.
Rosboard (left) vs rosbridge (right) transmitting a 640x360 RGB image on the same network conditions. visualized on the client side using rviz. Note how rosboard’s image looks more fluid and has a higher FPS count.
The Kiwibot team wanted to have the great visualization capabilities of the ROS desktop toolchain (rviz, mapviz, rqt, etc) while keeping the data transfer advantages of rosboard’s networking protocol. For that reason we developed and opensourced rosboard_client, a package for desktop environments that is comprised by the following:
-
A ROS-independent networking library that connects to a rosboard server. It is able to subscribe to topics published on the server side and to publish on the server topics that are available on the client side (the latter only using our custom fork of rosboard).
-
A ROS GUI similar to rosboard’s web GUI. It allows people to see all the available topics on the server and interactively subscribe/unsubscribe to them. When subscribed to a topic, the received data gets republished as ROS messages on the local machine, allowing people to use the desktop viz toolchain that everyone is already so familiar with.
The rosboard desktop gui (Left) and rviz (right). The GUI shows all the available topics. When a subscription to a costmap is created the data gets republished as a ROS message and can be viewed in rviz.
Thanks to this new tool, we have been able to stream several costmaps, a laserscan, an RGB image, paths and transforms at the same time without problems, at almost real time, on a bandwidth limited LTE cellular network and visualize them using rviz.
Using ngrok, you can easily make the server running on your robot’s local network available to the internet. More instructions are available on the repo.
We benchmarked our client against rosbridge using different compressions for transmitting a 640x360x15fps RGB image from an intel realsense and noticed an important improvement. More details on the test results and the code to run the benchmark by yourself are available on the repo.
Streaming Tool | Avg. Latency [ms] | Avg. Bandwidth Usage [KiB/s] |
---|---|---|
Rosboard (JPEG compression) | 96.38 | 11010.14 |
Rosbridge (no compression) | 22330.06 | 12420.32 |
Rosbridge (CBOR compression) | 6035.99 | 8215.36 |
Rosbridge (PNG compression) | 19096.12 | 12054.46 |
Compression for rosbridge is only available using our forks of rosbridge and roslibpy, since this feature was broken for ROS2 on the main repos at the time we did the tests (August 2022).
Credits to @charlielito and @Pepis who developed the networking library, and to @NicolasRochaPacheco who developed the GUI. Credits to @dheera for developing the rosboard server and to Osnabrück University for developing rospy message converter
We are more than happy to receive feedback from the community!