@ikko ikko authored on 28 Mar 2021
scripts first commit 3 years ago
.gitignore first commit 3 years ago
Dockerfile fine tuneup 3 years ago
README.md Update README.md 3 years ago
buildPEPPER.sh first commit 3 years ago
exportPEPPER.sh change exportPEPPER.sh 3 years ago
importPEPPERLITE.sh first commit 3 years ago
runPEPPER.sh first commit 3 years ago
runPEPPERLITE.sh first commit 3 years ago
README.md

ROSでペッパーを動かすためのDockerイメージ

PepperのIPは、192.168.100.3で同じネットワーク内にこのDockerファイルを動かすサーバがある設定を仮定しています。 tiryoh/ros-desktop-vncをベースにしたDockerイメージを採用しています。 このイメージは、novncを採用しているため、ブラウザ経由と、ssh経由の両方からアクセスできます。

Build

> ./buildPEPPER.sh

上記の方法で実行する場合、マシンスペックによりますが、起動が遅い場合があります。 Reconstruction of a single layer image may take up to 20 minutes to merge multi-layer images.

Run Build Image

~/pepper$ ./runPEPPER.sh
* enable custom user: ubuntu
useradd: user 'ubuntu' already exists
  set default password to "ubuntu"
Please execute -> sudo apt install ros-kinetic-peper-meshes
2021-03-27 14:34:06,554 CRIT Supervisor running as root (no user in config file)
2021-03-27 14:34:06,554 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2021-03-27 14:34:06,560 INFO RPC interface 'supervisor' initialized
2021-03-27 14:34:06,560 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2021-03-27 14:34:06,560 INFO supervisord started with pid 18
2021-03-27 14:34:07,563 INFO spawned: 'nginx' with pid 21
2021-03-27 14:34:07,564 INFO spawned: 'web' with pid 22
2021-03-27 14:34:07,565 INFO spawned: 'novnc' with pid 23
2021-03-27 14:34:07,567 INFO spawned: 'wm' with pid 24
2021-03-27 14:34:07,567 INFO spawned: 'pcmanfm' with pid 25
2021-03-27 14:34:07,568 INFO spawned: 'lxpanel' with pid 27
2021-03-27 14:34:07,569 INFO spawned: 'xvfb' with pid 28
2021-03-27 14:34:07,570 INFO spawned: 'x11vnc' with pid 30
2021-03-27 14:34:07,574 INFO exited: wm (exit status 1; not expected)
2021-03-27 14:34:07,648 INFO  Listening on http://localhost:6079 (run.py:87)
2021-03-27 14:34:08,566 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-27 14:34:08,566 INFO success: web entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-27 14:34:08,566 INFO success: novnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-27 14:34:08,576 INFO spawned: 'wm' with pid 87
2021-03-27 14:34:08,576 INFO success: pcmanfm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-27 14:34:08,576 INFO success: lxpanel entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-27 14:34:08,576 INFO success: xvfb entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-27 14:34:08,576 INFO success: x11vnc entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2021-03-27 14:34:10,570 INFO success: wm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
127.0.0.1 - - [2021-03-27 14:34:17] "GET /api/health HTTP/1.0" 200 141 0.091562
127.0.0.1 - - [2021-03-27 14:34:47] "GET /api/health HTTP/1.0" 200 141 0.091615

Export Image and Capture Rebuild Image

時間がかかりますが、コンテナイメージがスタンバイ状態("GET /api/health HTTP/1.0" が表示される状態)になったら、 別ターミナルを開いてコンテナIDを調べ、シングルレイヤー化した高速化したイメージpepper-lite.tazを作ります。

~/pepper$ ./exportPEPPER.sh
Open a new terminal and run . /runPEPPER.sh and wait until you see GET /api/health HTTP/1.0. 
Press enter key and make sure that only the current container ID, one, is displayed and after that press enter again.
-------------------------
Current running docker ontainer id is
-------------------------
28a1487ec5d2
-------------------------
When the string GET /api/health HTTP/1.0 is displayed, Please hit enter key
~/pepper$

Import Rebuild Image and Run

高速化した、イメージpepper-lite.tazをインポートし、実行します。

~/pepper$ ./importPEPPERLITE.sh
~/pepper$ ./runPEPPERLITE.sh

Open

ブラウザ経由

http://docker_ip:6080

Ssh password is ubuntu

SSH経由

$ ssh ubuntu@docker_ip -p 2222