You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expand networking tutorial with full video summary
- Integrated comprehensive details from the MRSD Project Course Networking Setup Guide.
- Added sections for Isolated Local Networks, Time Synchronization (Chrony), and ROS Multi-Machine Configuration.
- Detailed host resolution and common network failure points.
Copy file name to clipboardExpand all lines: wiki/computing/networking.md
+43-15Lines changed: 43 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,29 +3,57 @@ date: 2024-03-01
3
3
title: Setup your Network Infrastructure for Robotics Projects
4
4
---
5
5
6
-
This tutorial provides a guide for setting up the networking infrastructure required for robotics projects, particularly those involving remote monitoring and multi-machine communication (e.g., ROS).
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
7
8
8
## Overview
9
9
10
-
A robust network setup is critical for robotics projects to ensure reliable communication between the robot's onboard computer and external workstations. This guide covers:
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
11
12
-
***Static IP Configuration**: Ensuring your robot and workstation always have the same address.
13
-
***Remote Login**: Setting up SSH for headless operation and monitoring.
14
-
***Network Hardware**: Utilizing a dedicated router and LAN connections for low-latency communication.
12
+
## Core Principles
15
13
16
-
## Video Tutorial
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.
17
18
18
-
The following video tutorial walks through the network configuration steps for projects involving remote login and monitoring.
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).
19
23
20
-
[Watch the YouTube tutorial!](https://www.youtube.com/watch?v=Qi5NX4jUSMQ)
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.
21
28
22
-
<iframewidth="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>
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`.
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`
23
45
24
-
## General Recommendations
46
+
## Common Failure Points to Avoid
25
47
26
-
While specific configurations may vary, consider the following best practices:
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.
27
52
28
-
1.**Use a Dedicated Router**: Avoid using shared or public networks (like university guest WiFi) which often have isolation policies that prevent peer-to-peer communication.
29
-
2.**DHCP Reservations**: Instead of manually setting static IPs on every device, use your router's DHCP reservation feature to assign specific IPs to MAC addresses.
30
-
3.**Hostname Resolution**: Use `/etc/hosts` or mDNS (Avahi) to refer to machines by name rather than IP address.
31
-
4.**Wired Over Wireless**: Use Ethernet (LAN) whenever possible for critical control loops to minimize jitter and packet loss.
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
+
<iframewidth="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