Skip to content

Remote connection

Emiliano Borghi edited this page Jun 22, 2021 · 10 revisions

This page explains how to connect to a real robot and execute commands from your local computer.

The first section explains how to setup or get a hostname. This is, a static URL address that we will use to connect to the robot instead of the IP.

The second section presents two ways of connecting to the robot using the hostname.

And the third section brings up the robot stack.

Table of contents

  1. Provide a public hostname
    1. Use the machine name
    2. Use a DNS provider
  2. Connect to the robot
    1. Use VNC
    2. Use SSH
      1. Visualize topics remotely
  3. Launch the robot stack

Provide a public hostname

Use the machine name

Machines (like the one in the robot) contain a username and a hostname as you can see in the terminal once you open one:

create1 @ create1-nvidia

If you want to get it, execute:

$ hostname
create1-nvidia

We'll use this name to connect to the remote computer.

Use a DNS provider

In order to use a custom hostname, you'll need to setup a DNS provider (in this case NoIP). You only need to run this once:

  1. Install x11vnc: sudo apt install -y x11vnc
  2. Create a NoIP hostname (a URL that will be linked to your robot) with an IPv6 IP
  3. Setup a Dynamic Update Client (DUC) in Nvidia Jetson Nano to automatically assign the IP

Connect to the robot

Use VNC

Establish an SSH tunnel from the robot to the local computer. This process will request a password.

sudo ssh create1@create1-nvidia.ddns.net -L 5900:localhost:5900 "x11vnc -display :0 -noxdamage -auth guess -usepw -geometry 1920x1080"

Access to the screen through the port 5900. Open Remmina and select the option VNC, then use this address:

localhost:5900

Use SSH

An SSH terminal is simpler but you won't be able to see RViz directly:

ssh create1@create1-nvidia.local

Make sure you're using the hostname appending .local at the end if it's the machine name.

Visualize the topics remotely

Before launching any node you have to configure the ROS master in the robot.

roscd ca_bringup/scripts

source robot_network_config.sh

This command will return the IP of the robot that you will need later.

In the host, run this:

roscd ca_bringup/scripts

source remote_access_config.sh <ROBOT_IP>

Whenever you open a new terminal, you'll have to configure the network variables again.

Launch the robot stack

Configure the following settings:

export RVIZ=true
export LASER=rplidar
export LOCALIZATION=slam
export LOCAL_PLANNER=teb
export GLOBAL_PLANNER=navfn
export NAVIGATION=move_base

roslaunch ca_bringup complete.launch

More settings can be found here.