Private Networking

100.89.2.122 desktop-1 \ / robot-1 100.89.2.122
\ /
100.99.32.12 desktop-2 - - - - - robot-2 100.99.31.234
/ \
100.88.77.234 desktop-3 / \ robot-3 100.86.232.111

Introduction

To facilitate [email protected], we have created a private network for connect robots and computers together using Tailscale. This private network allows anyone to connect to any robots on the network around the world.

Setup robot for private networking

Requirement

  • Raspberry Pi

  • Authkey (like this tskey-123abc456)

  • Running either Raspbian 10, Ubuntu 18.04, or Ubuntu 20.04

You can check your OS version by doing lsb_release -a

If you don't have an Authkey, please reach out to your TA

Installation

  • Clone the repo: https://github.com/pitosalas/tb3-ros.git

  • cd tb3-ros/clients

chmod +x pi_connect.sh
# Run the script with the authkey
sudo ./pi_connect.sh tskey-123abc456
# On successful connect, you should see this
Connected. IP address: 100.xx.xxx.xxx

Once the robot is successfully connected to the network, you can try to reach it via cloud desktop

Now that the robot is on the network, you can configure your cloud desktop to control the robot directly.

Setup robot remote control

To control a specific robot, you need to connect to its ROS master.

On your robot, edit ~/.bashrc, add or replace the following lines:

# Replace with the robot's Tailscale IP
export ROS_MASTER_URI=http://100.xx.xxx.xxx:11311/
export ROS_IP=100.xx.xxx.xxx

If you are not sure what the Tailscale IP is, run ip addr show dev tailscale0 | grep -Eo '([0-9]{1,3}[\.]){3}[0-9]{1,3}'

On your cloud desktop (or your computer if you are not using cloud desktop), edit ~/.bashrc, add or replace with the following lines:

# Replace with the robot's Tailscale IP
export ROS_MASTER_URI=http://100.xx.xxx.xxx:11311/
# Replace with the cloud desktop's IP
export ROS_IP=172.xx.xxx.xxx

If you are not sure what the cloud desktop's IP is, run ip addr show dev eth0 | grep -Eo '([0-9]{1,3}[\.]){3}[0-9]{1,3}'

Once this is setup, test the connectivity with

rostopic list

The following instructions are for if you are running cloud desktop on your own computer!

Setup non cloud desktop for private networking

You can still connect to the private network without using cloud desktop. However, right now we have limited support for OS.

Officially supported

  • Ubuntu 18.04

  • Ubuntu 20.04

Unofficially supported

  • MacOS

  • Check this list

Officially supported installation

  • Clone the repo: https://github.com/pitosalas/tb3-ros.git

  • cd tb3-ros/clients

chmod +x pi_connect.sh
# Run the script with the authkey
sudo ./pi_connect.sh tskey-123abc456
# On successful connect, you should see this
Connected. IP address: 100.xx.xxx.xxx

To connect to the network after every reboot, just do

sudo ./pi_connect.sh tskey-123abc456

Unofficially supported installation

Caution: all the instructions here have not been tested, you are on your own!!!

MacOS

  • Download and Install Tailscale from App Store

  • Open the App, DO NOT login

With your terminal do,

$(ps -xo comm | grep MacOS/Tailscale$) up --authkey=tskey-123abc456 --accept-routes

Everything else

Follow the instructions for installing for your OS here.

Once you have Tailscale installed, you can start it with the following command

sudo tailscale up --authkey=tskey-123abc456 --accept-routes

Now that your computer is on the network, follow the instructions to control the robot directly.