Skip to content

Commit bfa0804

Browse files
atharva-18nevalsar
andauthored
Add networking tutorial (#167)
- Provides a plaintext summary of core networking principles including isolated networks, static IP strategies, and Chrony time synchronization. - Details ROS multi-machine configuration (ROS_MASTER_URI, ROS_IP) for distributed systems. - Outlines common failure points such as bandwidth saturation and network interference. - Updates navigation to include the tutorial under the Computing section. --------- Co-authored-by: Nevin Valsaraj <nevin.valsaraj32@gmail.com>
1 parent e1ceb0e commit bfa0804

2 files changed

Lines changed: 61 additions & 0 deletions

File tree

_data/navigation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,8 @@ wiki:
264264
url: /wiki/computing/ubuntu-chromebook/
265265
- title: Setup your GPU System for Computer Vision
266266
url: /wiki/computing/setup-gpus-for-computer-vision/
267+
- title: Setup your Network Infrastructure for Robotics Projects
268+
url: /wiki/computing/networking/
267269
- title: Ubuntu Dual Boot and Troubleshooting Guide
268270
url: /wiki/computing/troubleshooting-ubuntu-dual-boot/
269271
- title: Fabrication

wiki/computing/networking.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
date: 2024-03-01
3+
title: Setup your Network Infrastructure for Robotics Projects
4+
---
5+
6+
This tutorial provides a comprehensive guide for setting up a robust networking infrastructure for robotics projects. It is based on the **MRSD Project Course - Networking Setup Guide**, which focuses on creating reliable, low-latency environments suitable for high-stakes demonstrations and complex multi-machine systems.
7+
8+
## Overview
9+
10+
In robotics, a stable network is critical for communication between onboard computers, ground stations, and remote sensors. Using shared or public networks (like university guest WiFi) often leads to high latency, jitter, and connection drops. This guide focuses on building an **isolated local network** to ensure maximum reliability.
11+
12+
## Core Principles
13+
14+
### 1. Isolated Local Network
15+
Always use a **dedicated router** for your project. This creates a private network segment that is isolated from the traffic and interference of larger organizational networks.
16+
* **5GHz over 2.4GHz**: Use 5GHz (or Wi-Fi 6) whenever possible to avoid the saturation common in the 2.4GHz band.
17+
* **Wired Connections**: Use Ethernet cables for high-bandwidth data (e.g., raw camera streams) between fixed components.
18+
19+
### 2. Static IP Configuration
20+
Relying on dynamic IPs (DHCP) can cause systems to fail if a device is assigned a new address.
21+
* **DHCP Reservations**: Configure your router to assign specific IP addresses based on a device's MAC address. This is often easier than manual static configuration on every OS.
22+
* **Manual Static IPs**: If router access is limited, configure static IPs in the OS (e.g., using Netplan on Ubuntu).
23+
24+
### 3. Time Synchronization (Chrony)
25+
For multi-machine systems like ROS, system clocks must be synchronized to ensure message timestamps and sensor data fusion are accurate.
26+
* Use **Chrony** to synchronize clocks across all devices on your local network.
27+
* Designate one machine (e.g., the ground station) as the NTP server and configure the robot to sync from it.
28+
29+
### 4. Host Resolution
30+
To make your system more maintainable, map hostnames to IPs in the `/etc/hosts` file on every machine:
31+
```text
32+
192.168.1.10 robot-onboard
33+
192.168.1.11 ground-station
34+
```
35+
This allows you to refer to machines by name (e.g., `ssh robot-onboard`) instead of memorizing IP addresses.
36+
37+
## ROS Multi-Machine Configuration
38+
39+
When running ROS across multiple computers, ensure the following environment variables are set correctly:
40+
41+
1. **ROS_MASTER_URI**: Set this to the IP of the machine running `roscore`.
42+
* Example: `export ROS_MASTER_URI=http://192.168.1.11:11311`
43+
2. **ROS_IP / ROS_HOSTNAME**: Set this to the local IP of the current machine to ensure other nodes can "call back" to it.
44+
* Example: `export ROS_IP=192.168.1.10`
45+
46+
## Common Failure Points to Avoid
47+
48+
* **Bandwidth Saturation**: Streaming raw 4K video or high-frequency LiDAR data over Wi-Fi will saturate the link. Downsample or compress data before transmission.
49+
* **Network Interference**: In crowded environments, perform a site survey to identify the least congested Wi-Fi channels.
50+
* **Background Processes**: Disable auto-updates, cloud syncing, and other background network tasks on your robot's computer.
51+
* **D-Day Setup Errors**: Use **startup scripts** or `systemd` services to automate your network configuration and ROS environment setup.
52+
53+
## Video Tutorial
54+
55+
The following video tutorial walks through these configuration steps in detail.
56+
57+
[Watch the YouTube tutorial!](https://www.youtube.com/watch?v=Qi5NX4jUSMQ)
58+
59+
<iframe width="560" height="315" src="https://www.youtube-nocookie.com/embed/Qi5NX4jUSMQ?si=XtUfmcpkplp6a4EM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe>

0 commit comments

Comments
 (0)