From 0edefad27f1b57044fc82064d25e4d39e4544f0e Mon Sep 17 00:00:00 2001 From: juan <21977733+juanmed@users.noreply.github.com> Date: Wed, 5 Jun 2019 02:53:25 +0900 Subject: [PATCH 1/2] Added requirements file and updated readme with some errors' solutions. --- .gitignore | 7 +++++++ README.md | 12 ++++++++++++ requirements.txt | 5 +++++ 3 files changed, 24 insertions(+) create mode 100644 .gitignore create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d07af82 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.flappy_env/ +Wing.egg-info/ +_Wing.cpython-35m-x86_64-linux-gnu.so +build/ +flappy/ +pydart2/ + diff --git a/README.md b/README.md index 50b3932..c888ebe 100644 --- a/README.md +++ b/README.md @@ -156,3 +156,15 @@ MIT ## Acknowledments + +## Troubleshooting +If you get any of the followin errors, try installation from source procedure mentioned in [document](https://pydart2.readthedocs.io/en/latest/install.html) + +```bash +ImportError: cannot import name 'pydart2_api' +``` +or + +```bash +AttributeError: module 'pydart2' has no attribute 'World' +``` diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..03fa7ec --- /dev/null +++ b/requirements.txt @@ -0,0 +1,5 @@ +pydart2 +tensorflow-gpu +numpy +matplotlib + From 7b29d63f98629885396088fef3c81566e71dbfa7 Mon Sep 17 00:00:00 2001 From: juan <21977733+juanmed@users.noreply.github.com> Date: Wed, 5 Jun 2019 12:42:15 +0900 Subject: [PATCH 2/2] Updated dartsim installation process. Added requirements.txt --- README.md | 20 ++++++++++---------- requirements.txt | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index c888ebe..d41cd9a 100644 --- a/README.md +++ b/README.md @@ -24,18 +24,22 @@ These instructions will get you a copy of the project up and running on your loc ### Prerequisites -Flappy requires python3 with the development headers. You'll also need some other system packages. DART is required as simulation engine (and we use pydart2 as interface). They can be installed as follows +Flappy requires python3 with the development headers. You'll also need some other system packages. [DART <= v6.8.2](https://github.com/dartsim/dart/tree/release-6.8) (note this links redirects to release 6.8 branch) is required as simulation engine (and we use pydart2 as interface). They can be installed as follows #### Ubuntu ```zsh # install system packages sudo apt-get update && sudo apt-get install cmake libopenmpi-dev python3-dev zlib1g-dev swig python3-pip python3-pyqt4 python3-pyqt4.qtopengl +``` +###### install DartSim v6.8.2 -# install dart -sudo apt-add-repository ppa:dartsim -sudo apt-get update -sudo apt-get install libdart6-all-dev +Follow the [source installation instructions](http://dartsim.github.io/install_dart_on_ubuntu.html#install-dart-from-source). + +Finally, to update runtime libraries locations so that flappy-simulator can find dart: + +```zsh +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/lib:/usr/lib:/usr/local/lib ``` Please refer the [official DART installation document](https://github.com/dartsim/dart/wiki/Installation) when you have problems. @@ -64,12 +68,8 @@ source /path/to/venv/bin/activate ``` ### Installation -- Pydart2 is a python binding to DART. +- Pydart2 is a python binding to DART. Source installation is required. Refer to [source installation instructions](https://pydart2.readthedocs.io/en/latest/install.html#install-from-source-code). - ```zsh - pip install pydart2 - ``` - Please refer to [document](https://pydart2.readthedocs.io/en/latest/install.html) when you have problems. - [Tensorflow](https://github.com/tensorflow/tensorflow) is needed for the usage of neural network. If you want to make use of your GPU, please install the tensorflow with gpu diff --git a/requirements.txt b/requirements.txt index 03fa7ec..aef0bb5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,4 @@ pydart2 tensorflow-gpu numpy matplotlib - +PyQt5