From 748682e60eab9eba6000925282c42293a19fcdc5 Mon Sep 17 00:00:00 2001 From: Koki Shinjo Date: Thu, 26 Oct 2023 22:12:38 +0900 Subject: [PATCH] Update README.md (#1861) * Update README.md , fix network configuration of ethernet, use archive for docker, System, Users. --------- Co-authored-by: Kei Okada --- jsk_unitree_robot/README.md | 22 ++++++++++++++++--- jsk_unitree_robot/cross/README.md | 35 ++++++++++++++++++++++++++----- 2 files changed, 49 insertions(+), 8 deletions(-) diff --git a/jsk_unitree_robot/README.md b/jsk_unitree_robot/README.md index 7d80256051..2ac52a5c99 100644 --- a/jsk_unitree_robot/README.md +++ b/jsk_unitree_robot/README.md @@ -2,6 +2,8 @@ ROS package for Unitree Go1 robot. +This document assumes that your robot is already configured with JSK's ROS environment. To configure this, please ask your robot's administrator along with [this instruction](./cross/README.md#setup-go1-robot). + ## How to Run See [manual](https://drive.google.com/drive/folders/1PZDOo8WUcqwU8mNek2qAaTwW9WjJVVRL?usp=sharing) before you use Go 1. (jsk.imi.i.u-tokyo.ac.jp account is required.) @@ -29,13 +31,17 @@ source devel/setup.bash 1. Connect to the robot via Ethernet -2. Set your PC'S IP address to `192.168.96.162` +2. Configure your PC's ethernet like below + + - IP Address: 192.168.123.162 + - Subnet Mask: 255.255.255.0 + - Gateway: 192.168.123.161 3. Setup ROS_IP and ROS_MASTER_URI ``` rossetmaster 192.168.96.161 - rossetip + rossetip 192.168.96.162 ``` 4. Run roseus @@ -50,10 +56,20 @@ source devel/setup.bash 5. Deployment Once you have completed your development, put your code into [apps](https://github.com/jsk-ros-pkg/jsk_robot/blob/master/jsk_unitree_robot/jsk_unitree_startup/apps/) directory and build on cross environment and copy to onboard computer. + + To run cross compile, you need `ros1-unitree` docker image and `arm64v8_System` directory. If you do not have them, pleas ask your development environment administrator along with following instructions. + + + - [prepare-cross-compiling-environment-run-only-the-fist-time-per-host-computer](./cross/README.md#prepare-cross-compiling-environment-run-only-the-fist-time-per-host-computer) + - [build-ros-system-on-docker--run-only-the-fist-time-per-host-computer](./cross/README.md#build-ros-system-on-docker--run-only-the-fist-time-per-host-computer) + + After that, please run command below to build ros workspace and deploy it to robot. + ``` roscd jsk_unitree_startup/../cross make user - ./install -p 123 + ./install -t Pro -p 123 # for Go1 Pro + ./install -t Air -p 123 # for Go1 Air ``` Then, reboot the robot and go to [app_chooser](http://192.168.123.161:8000/rwt_app_chooser) and start your application diff --git a/jsk_unitree_robot/cross/README.md b/jsk_unitree_robot/cross/README.md index 4c38e5c985..b73b5d13a0 100644 --- a/jsk_unitree_robot/cross/README.md +++ b/jsk_unitree_robot/cross/README.md @@ -8,28 +8,50 @@ This project contains a set of patches and scripts to compile and run ROS1 on a We're going to use Docker to set up a container that will compile all the tools for cross-compiling ROS and all of its dependencies. Go to https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-using-the-repository to install it for your Linux distribution. +We strongly recommend using an arm64v8 machine, but it will also work on x86_64 machines. + 1. Add your user to docker group ``` $ sudo usermod -aG docker $USER $ newgrp ``` -2. Install Qemu software +2. Install Qemu software (Only for x86_64 machine) ``` $ sudo apt install -y qemu-user-static ``` -### Build ROS System on Docker (Run only the fist time per host computer) +### <> Build ROS System on Docker from Archive (Run only the fist time per host computer) + +**Caution!!! Build ROS System for Unitree robot will take more than a few hours !! (some times longer than 24 hours). Therefor, if you are not a unitree robot's JSK ROS system developer, we strongly recommend to use the archive, ** + +Download the docker image (`ros1-unitree-arm64v8.tar`) and System and User archvie file (`arm64v8_System.tgz` and `arm64v8_User.tgz`) from [here](https://drive.google.com/drive/u/2/folders/1SBA9oAwjfD84yRFEB-jsCH1m5Q8eEGSK) + +To extract archive, run folowing commands +``` +cat ~/Downloads/ros1-unitree-arm64v8.tar | docker import - ros1-unitree:arm64v8 +roscd jsk_unitree_startup/../cross +tar -xvzf ~/Downloads/arm64v8_System.tgz +tar -xvzf ~/Downloads/arm64v8_User.tgz +``` + +To confarm evemTo verify that the archive was decompressed correctly, check that the following commands are executed without error. +``` +make user +``` + +### Build ROS System on Docker from Scratch (Run only the fist time per host computer) ``` make system ``` -Caution!!! It will take more than a few hours !! So for JSK users, download the `arm64v8_System.tgz` archive file from [here](https://drive.google.com/drive/u/2/folders/1SBA9oAwjfD84yRFEB-jsCH1m5Q8eEGSK) and extract under `jsk_unitree_robot/cross/` directory before run `make` command. +### Deploy ROS System to Go1 robot + +After finishing former step, run following command to copy ROS1 base sytem to Go1 onboard computer. This should be done only in the first time. So normally user do not have to run this command -Run following command to copy ROS1 base sytem to Go1 onboard computer. This should be done only in the first time. So normally user do not have to run this command ``` -./install.sh -p 123 -D System +./install.sh -p 123 -d System ``` ### Build `jsk_unitree_robot` software on Docker @@ -40,7 +62,10 @@ You can build your current `jsk_unitree_robot` workspace on Docker environment w make user ``` +### Deploy ROS workspace to Go1 robot + To copy your software to Go1 onboard computer, run following command + ``` ./install.sh -p 123 ```