citbrains / GankenKun_webots

Control of humanoid robots on webots, walking, deep-learning, Bayesian-optimization
14 stars 4 forks source link

verify learned model #82

Open yasuohayashibara opened 9 months ago

yasuohayashibara commented 9 months ago

学習済みモデルを検証するための環境を作る. 対戦相手はルールベースで行動を決定するロボット.

デバッギングしやすくするため,シミュレータとコントローラを別に起動できるようにした.

webots --batch mat_train.wbt
python3.8 mat_train.py

IMAGE

yasuohayashibara commented 8 months ago

環境構築

1) webots2021bのインストール wget https://github.com/cyberbotics/webots/releases/download/R2021b/webots_2021b_amd64.deb sudo apt update && sudo apt upgrade sudo apt install ./webots_2021b_amd64.deb 2) sudo apt install python3-pip 3) pip3 install control controller gym==0.12.4 gymnasium numpy pettingzoo protobuf==3.19.1 tensorboardX==2.5 torch==1.10.2 wandb==0.12.11 4) git clone -b mat_verify https://github.com/citbrains/GankenKun_webots/ 5) .bashrcに追加 export WEBOTS_HOME=/usr/local/webots # Defines the path to Webots home. export LD_LIBRARY_PATH=$WEBOTS_HOME/lib/webots:$LD_LIBRARY_PATH # Add the Webots libraries to the library path (useful when launching Webots directly without using the launcher). export PYTHONPATH=$PYTHONPATH:$WEBOTS_HOME/lib/controller/python38 5) 実行 cd GankenKun_webots/worlds/ webots --batch mat_train.wbt cd GankenKun_webots/controllers/mat_train/ python3 mat_train.py