ROS – network configuration

ROS is a distributed system, but to be able to communicate all the machines in the robotic system must be correctly configurated.

At this stage of the system configuration we have two machines:

  1. NVidia Jetson TK1 that controls the robot onboard (IP 192.168.1.51 Host myzharbot)
  2. A “Console machine” that controls the robot remotely (IP 192.168.1.61 Host myzharbot-console)

For this configuration we assume that all the machines are mapped on the network with the following IP mask: 192.168.1.X. (your network router must be mapped with this mask, if not modify the configuration according to your network profile).

NVidia Jetson TK1

NVidia Jetson TK1 runs the core of the entire system.

  1. Change the hostname of the machine following the apposite guide.
    Now MyzharBot can be referred on the network with its own name.
  2. Assign an univocal IP address to the board:
    1. Open “System Settings” and select “Network”
    2. Open the current network clicking on the green arrow
    3. Click “Settings”
    4. Select tab “IPv4 settings”
    5. Select “Manual” in the “Method” combo-box
    6. Add the new IP address:
      1. IP: 192.168.1.51
      2. Netmask: 255.255.255.0
      3. Gateway: 192.168.1.1
    7. Add the following DNS (I use Google’s DNS):
      8.8.8.8, 8.8.4.4
    8. Click save and exit
  3. Edit the “hosts” file to add information about the other machines on the network
    1. Add the “myzharbot-console” adding the following line to the list:
  4. Add ROS Environment variables:
    1. Edit “.bashrc”:
    2. Add the following lines at the end of the file:

The Jetson is ready to run the “roscore”.

Console machine

The console machine runs the monitor nodes and the teleoperation nodes.

  1. [Optional] Change the hostname of the machine editing /etc/hostname as in the Jetson guide.
    Now the console can be referred on the network with its own name: myzharbot-console.
    [You can choose to not perform this step, but be aware to use the correct hostname instead of “myzharbot-console”]
  2. Assign an univocal IP address to the PC:
    1. Open “System Settings” and select “Network”
    2. Open the current network clicking on the green arrow
    3. Click “Settings”
    4. Select tab “IPv4 settings”
    5. Select “Manual” in the “Method” combo-box
    6. Add the new IP address:
      1. IP: 192.168.1.61
      2. Netmask: 255.255.255.0
      3. Gateway: 192.168.1.1
    7. Add the following DNS (I use Google’s DNS):
      8.8.8.8, 8.8.4.4
    8. Click save and exit
    1. Edit the “hosts” file to add information about the other machines on the network
      1. Add the “myzharbot” adding the following line to the list:
    2. Add ROS Environment variables:
      1. Edit “.bashrc”:
      2. Add the following lines at the end of the file:

Now the console is ready to monitor and teleoperate MyzharBot

[Source: Nootrix – ROS NETWORKING]

Leave a Comment