Forked from dbaldwin/gist:b31835f87f16450a956cf3c89e15a289
Created
September 22, 2024 18:36
-
-
Save minkione/f9985b459fe9f95a48af109569e11b6b to your computer and use it in GitHub Desktop.
Unitree Go1 Wireless Network Setup for Low Level Control with Windows and Docker
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From Windows terminal | |
docker run -p 6080:80 --shm-size=512m --name ros_go1 -d tiryoh/ros-desktop-vnc:melodic | |
# Access the instance through the url | |
http://localhost:6080 | |
# From home directory in Docker | |
mkdir -p catkin_ws/src | |
# Go into catkin workspace | |
cd catkin_ws/src | |
# Clone legged SDK for Go1 | |
git clone -b v3.8.0 https://github.com/unitreerobotics/unitree_legged_sdk | |
# Build for low level | |
cd unitree_legged_sdk && mkdir build && cd build && cmake .. && make | |
# Power up Unitree Go1 and connect to wireless network | |
# Put Go1 into low level mode with remote | |
# L2 + A | |
# L2 + A | |
# L2 + B | |
# L1 + L2 + Start | |
# SSH to Pi with password 123 | |
ssh [email protected] | |
# Execute the following code on the robot's Raspberry Pi: | |
sudo vi /etc/sysctl.conf | |
# Remove the comment in front of net.ipv4.ip_forward=1 | |
# Reload sysctl | |
sudo sysctl -p | |
# Setup iptables for wireless config | |
# Flush iptables | |
sudo iptables -F | |
# Flush NAT table | |
sudo iptables -t nat -F | |
# Setup NAT table routing | |
sudo iptables -t nat -A POSTROUTING -o wlan1 -j MASQUERADE | |
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE | |
sudo iptables -A FORWARD -i wlan1 -o eth0 -j ACCEPT | |
sudo iptables -A FORWARD -i eth0 -o wlan1 -j ACCEPT | |
# Do the following on your own laptop (Linux host only) | |
# sudo route add default gw 192.168.12.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment