Skip to content

Commit

Permalink
Update README.md (#1861)
Browse files Browse the repository at this point in the history
* Update README.md , fix network configuration of ethernet,  use archive for docker, System, Users.

---------

Co-authored-by: Kei Okada <[email protected]>
  • Loading branch information
sktometometo and k-okada authored Oct 26, 2023
1 parent 8ae855d commit 748682e
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 8 deletions.
22 changes: 19 additions & 3 deletions jsk_unitree_robot/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
35 changes: 30 additions & 5 deletions jsk_unitree_robot/cross/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
### <<For JSK users>> 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
Expand All @@ -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
```
Expand Down

0 comments on commit 748682e

Please sign in to comment.