Update setup.md
This commit is contained in:
parent
6202393369
commit
cef312cb24
|
@ -1,14 +1,13 @@
|
||||||
# System Setup
|
# System Setup
|
||||||
|
|
||||||
The GO2 EDU comes with an onbard Jetson Orin NX, a Hessai LX-16 LiDAR sensor, and an intel Realsense D435i camera. This setup procedure targets the onboard Jetson Orin with IP `192.168.123.18` and presents the installation proceudures of nodes for reading the sensors and robot states and publisheing them as ROS2 topics plus some basic configurations for setting up the autostart services and sharing internet. The architecture of the GO2 system is illustrated in the following image:
|
The GO2 EDU comes with an onbard Jetson Orin NX, a Hessai LX-16 LiDAR sensor, and an intel Realsense D435i camera. This setup procedure targets the onboard Jetson Orin with IP `192.168.123.18` and presents the instructions for installing the Go2Py. We use the Linux systemd infrastructure to automatically run the components of the Go2Py as the robot is turned on. Each service runs its particular docker image so the installation of these services involves two steps; first building the required images and then installing the service files that launch them. Before installing these services though, you would need to perform the following steps to get an internet connection on the robot and install docker on it.
|
||||||
TODO: add image
|
|
||||||
|
|
||||||
### Internet Sharing
|
## Internet Sharing
|
||||||
|
|
||||||
In order to access internet on the Jetson computer, we hook the robot to a host development computer with internet access and configure it to share its connection with the robot. To cofigure the host computer, the follwoing steps should be taken:
|
In order to access internet on the Jetson computer, we hook the robot to a host development computer with internet access and configure it to share its connection with the robot. To cofigure the host computer, the follwoing steps should be taken:
|
||||||
#### Host Computer
|
### Host Computer
|
||||||
The following steps configures the host computer to share its intentrent with the robot.
|
The following steps configures the host computer to share its intentrent with the robot.
|
||||||
##### Enable IP forwarding:
|
#### Enable IP forwarding:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo sysctl -w net.ipv4.ip_forward=1
|
sudo sysctl -w net.ipv4.ip_forward=1
|
||||||
|
@ -20,7 +19,7 @@ sudo iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
|
||||||
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
|
sudo iptables -A FORWARD -i wlan0 -o eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
|
||||||
sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
|
sudo iptables -A FORWARD -i eth0 -o wlan0 -j ACCEPT
|
||||||
```
|
```
|
||||||
Note that `wlan0` should be replaced with the actual name of the network interface over which the internet is provided to the host computer, and eth0 should be replaced with the name of the Ethernet interface connected to the robot and having a local IP address in robot's network range.
|
Note that `wlan0` should be replaced with the actual name of the network interface over which the internet is provided to the host computer, and eth0 should be replaced with the name of the Ethernet interface connected to the robot and has an IP address in range `192.168.123.x`.
|
||||||
|
|
||||||
##### Storing the Settings
|
##### Storing the Settings
|
||||||
Make the iptables rules persistent by installing the `iptables-persistent`:
|
Make the iptables rules persistent by installing the `iptables-persistent`:
|
||||||
|
@ -30,8 +29,8 @@ sudo apt-get install iptables-persistent
|
||||||
sudo iptables-save > /etc/iptables/rules.v4
|
sudo iptables-save > /etc/iptables/rules.v4
|
||||||
sudo ip6tables-save > /etc/iptables/rules.v6
|
sudo ip6tables-save > /etc/iptables/rules.v6
|
||||||
```
|
```
|
||||||
#### Robot
|
### Robot
|
||||||
Now tell the computer on the robot to use the internet shared by the host computer. SSH into the robot's computer with IP address `192.168.123.18`, username `unitree` and password `123`. Note that the host computer's IP reange should have already been set to static mode with an IP in `192.168.123.*` range.
|
Now tell the computer on the robot to use the internet shared by the host computer. SSH into the robot's computer with IP address `192.168.123.18`, username `unitree` and password `123`. Note that the host computer's IP reange should have already been set to static mode with an IP in `192.168.123.x` range where x is anything except IPs already used by the others (e.g. `.18`).
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo ip route add default via <host computer IP address>
|
sudo ip route add default via <host computer IP address>
|
||||||
|
@ -43,5 +42,44 @@ nameserver 8.8.8.8
|
||||||
```
|
```
|
||||||
**Note:** Similarly to the host computer, you can make save this configuration using the `iptables-persistent` tool.
|
**Note:** Similarly to the host computer, you can make save this configuration using the `iptables-persistent` tool.
|
||||||
|
|
||||||
If everything has been successful, you should be able to access the internet on the robot. Run `ping www.google.com` to verify this.
|
If everything has been successful, you should be able to access the internet on the robot. Run `ping 8.8.8.8` and `ping www.google.com` to verify this.
|
||||||
|
|
||||||
|
## Installing the Docker
|
||||||
|
All the deployed services in Go2Py are based on docker so make sure that docker and Nvidia runtime is installed. For this, you can follow through the Isaac-ROS installation instructions [here](https://nvidia-isaac-ros.github.io/getting_started/hardware_setup/compute/jetson_storage.html).
|
||||||
|
|
||||||
|
## Installing the Go2Py
|
||||||
|
|
||||||
|
Go2Py has two main components. A set of services running on the robot and a Python package that can run anywhere and is used to communicate with the robot in Python.
|
||||||
|
|
||||||
|
### Installing the Services
|
||||||
|
SSH into the robot and clone the Go2Py repository:
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/Rooholla-KhorramBakht/Go2Py.git
|
||||||
|
cd Go2Py
|
||||||
|
```
|
||||||
|
Go2Py is coprised of the following main services:
|
||||||
|
- **go2py-bridge.service:** A service that runs the Go2py C++ bridge.
|
||||||
|
- **go2py-robot-description.service:** A service that subscribes to the `\go\joint_states` published by the bridge and publishes the robot description and TF2 messages for the sensors and and links of the robot. Note that you should add the currect extrinsics of the installed sensors into the robot's xacro file located [here](deploy/ros2_nodes/go2_description/xacro/robot.xacro) before installing this service.
|
||||||
|
- **go2py-hesai.service:** This service runs a cutomized Lidar driver for the robots that come with the hesai xt16 Lidars. This customized driver publishes laser_scan messages in addition to the pointcloud data. If your robot does not come with this LiDAR, you don't need to install this service.
|
||||||
|
|
||||||
|
The installation for each services is comprised of two commands:
|
||||||
|
```bash
|
||||||
|
# For the bridge
|
||||||
|
make bridge
|
||||||
|
sudo make bridge_install
|
||||||
|
# For the robot description serive
|
||||||
|
make robot_description
|
||||||
|
sudo make robot_description_install
|
||||||
|
# For the LiDAR driver
|
||||||
|
make hesai
|
||||||
|
sudo make hesai_install
|
||||||
|
```
|
||||||
|
The first command for each service makes the corresponding docker image and the second command, copies the serives file that runs those images into the appropriate locations of the system and enables them as autorun services. You can check for the success of this installations by checking the output of the `systemctl status service_name.service` command where the `service_name` is replace with the name of the serive you want to check.
|
||||||
|
|
||||||
|
### Installing the GoPy
|
||||||
|
|
||||||
|
Finally, we need to install the Go2Py Python library on a computer located on the same network as the robot (it could be the onboard computer but can also be any other PCs hooked up to the robot's network). To do so, simply go to the root directory of the Go2Py repository and run:
|
||||||
|
```bash
|
||||||
|
pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue