Skip to content

Networking Info

DRP edited this page Apr 14, 2019 · 13 revisions

TODO: Make shell scripts for different ROS Master and/or networking configurations

IP Addresses (OLD)

Master = 10.1.1.50
TX2-Front = 10.1.1.60
TX2-Side = 10.1.1.61
Raspberry Pi-Front = 10.1.1.80
Raspberry Pi-Left = 10.1.1.81
Raspberry Pi-Right = 10.1.1.82
VLP-16 = 192.168.1.201
SwiftNav = 192.168.0.222

IP Addresses (NEW)

Master = 192.168.0.50
TX2-Front = 192.168.0.60
TX2-Side = 192.168.0.61
Raspberry Pi-Front = 192.168.0.80
Raspberry Pi-Left = 192.168.0.81
Raspberry Pi-Right = 192.168.0.82
VLP-16 = 192.168.0.201
SwiftNav = 192.168.0.222

How to Setup Ethernet Connections With ROS

Procedures regarding network setup with distributed nodes through ROS. In FusionAD, multiple Jetson TX2 and Raspberry Pi B+ devices require this setup process.

NOTE: Make sure Ethernet cables are plugged in before setting up connections.
NOTE: Make sure to turn off wifi and any other connections before attempting to connect through Ethernet.
NOTE: If unexpected behavior occurs after making any changes, reset devices.

Set Static IP Address

To use the GUI, enter nm-connection-editor on terminal, click on the relevant "Wired Connection" Ethernet option, and enter the settings with the "edit" button.

  • Clicking on the "Edit Connections" button from the networking connections drop-down menu (top left corner on Ubuntu 16.04) will take you to the same screen

Comprehensive instructions found here

https://www.slothparadise.com/how-to-set-static-ip-on-ubuntu/

Summary

Edit the relevant networking file with sudo vi /etc/network/interfaces and add the following:

# interfaces(5) file used by ifup(8) and ifdown(8)
 auto lo
 iface lo inet loopback

 auto eth0
 iface eth0 inet static
 	address 10.1.1.50
 	netmask 255.255.255.0
	network 10.0.0.0
	gateway 10.0.0.1

Some of this may already be present in the file. If so, do not write it again. Replace the IP address on the 'address' line with the appropriate IP address as shown above at IP Addresses.

NOTE: Comment out everything except for the first two lines in the code above when not utilizing static IP on LAN through Ethernet. Roscore will not run properly otherwise once your device is disconnected from the custom configured network.

Some Other Useful Resources

https://www.swiftstack.com/docs/install/configure_networking.html
https://linux.m2osw.com/setup-static-network-jetson-tx2

Set Address Pointer in ROS

Add the following lines to the ~/.bashrc file:

export ROS_IP=192.168.0.50
export ROS_MASTER_URI=http://192.168.0.50:11311

Where ROS_IP is set to the IP address of the current device, and ROS_MASTER_URI is set to the IP address of the selected ROS Master device (your laptop or master compute).

How to Change Hostname

How to change a device's name, as seen on a network. This is useful when there are multiple devices of the same type on the same network