A VPN Designed For ROS & ROS 2

Connecting a mobile robot with a laptop
over the Internet in seconds.

Virtual LAN for ROS

Upgrade your ROS / ROS 2 system working in LAN network, to work over the Internet. There is no code modification required, as Husarnet simply creates a new virtual network interface on top of your operating system.

Husarnet VPN Client is:

  • Designed with ROS & ROS2 in mind
  • Peer-to-peer
  • Low-latency
  • Lightweight
  • Secure (applies PFC by default)
  • Easy to set-up (no configuration needed)

and it works over Wi-Fi, LTE, Ethernet and 5G.

It's an perfect solution for both real-time remote control and autonomous applications.

Enabler of Peer-to-Peer Robotics

Husarnet connects all of your devices peer-to-peer over the Internet. It means that at no point in time Husarnet servers take part in the communication, therefore the traffic goes only between the devices that belong to you ensuring the lowest possible latency.

P2P benefits:

  • Low latency
  • Low infrastructure cost
  • Ease of scalling from one to thousands of robots (or other devices)

Husarnet is also lightweight and provides low communication overhead. On popular single board computers, Husarnet adds only 1ms extra latency in a LAN network in comparison to a network with no VPN. That extra latency is spent mostly on data encryption using state of the art, optimized algorithms.In most cases, the data overhead is at the level of only 5%-10%.

Easy to Configure

1
Installing Husarnet Client
2
Connecting your devices to the same Husarnet network

Execute the following command on each device:

sudo husarnet join fc94:...:932a/XXXXXXXXXXXXXXXXXXXXXX mydevice

Where:

  • fc94:...:932a/XXXX...XX is a unique Join Code for your network - you will find it in Husarnet Dashboard
  • mydevice - example of a unique hostname you would assign to each device you are connecting. You will be able to use that hostname as an alternative to Husarnt IPv6 address in the future
3
Setting up ROS

  • For ROS you need to assign ROS master role (in Husarnet Dashboard) to a device running ROS master - Read more.
  • For ROS 2 you need to add peer addresses to DDS configuration file - Read more.

Secure

Security was a crucial aspect we had in mind when designing Husarnet.

Cryptography: Husarnet uses X25519 from libsodium for key exchange, with ephemeral Curve25519 keys for forward secrecy. The packets are encrypted using libsodium ChaCha20-Poly1305 secretbox construction with random 192-bit nonce.

Runtime safety: Husarnet is written in C++ using modern memory-safe constructs. Linux version drops all capabilities after initializing. It retains access to /etc/hosts via a helper process.

ROS itself doesn't have any built-in security. If somebody can connect to a ROS master, he can control the whole robotic system. Fortunately, Husarnet makes your network much more secure.

Husarnet provides a secure network layer for ROS - however you need to ensure that no one can connect to your nodes and services from unsecured networks. With husarnet-firewall, it can be done in just one command:$ husarnet-firewall enable

That's all! Now all non-Husarnet incoming connections to your ROS system will be blocked.

Read more.

Works with Docker

More and more ROS and ROS 2 software is running in Docker containers. You can connect your Docker container, directly over the Internet, with other devices without having Husarnet installed on your host system.

You can run multiple Docker Containers in the same host with separate Husarnet Clients for each one.

Or even better - you can run an official Husarnet Docker Container next to your exisitng containers by just launching it with Docker Compose.

Are you interested?