Skip to content

Commit 7fbbf0d

Browse files
committed
Added additional installation instructions
1 parent 8b1d3c1 commit 7fbbf0d

File tree

1 file changed

+43
-5
lines changed

1 file changed

+43
-5
lines changed

README.md

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ entry to cite our work,
2929

3030
## News
3131

32+
* 2019-08-09 Thesis defended, [Flight Controller Synthesis via Deep Reinforcement Learning](http://wfk.io/docs/WilliamKochThesisFINAL.pdf)
33+
* 2019-08-06 Neuroflight reaches new level of performance
34+
[https://www.youtube.com/watch?v=MByCyEnsYP0](https://www.youtube.com/watch?v=MByCyEnsYP0).
3235
* 2018-11-14 Stable flight has been achieved with Neuroflight [https://youtu.be/c3aDDPasjjQ](https://youtu.be/c3aDDPasjjQ)
3336

3437
## Features
@@ -51,17 +54,36 @@ Input (x) is of size 6, where x = [roll error, pitch error, yaw error, delta rol
5154

5255
### Pre-requites
5356

54-
1) Use [GymFC](https://github.com/wil3/gymfc) to train and create a neural network in the
57+
1) **Build Model** Use [GymFC](https://github.com/wil3/gymfc) to train and create a neural network in the
5558
form of a Tensorflow checkpoint.
5659

57-
2) Place the checkpoint files (four of them: checkpoint, \*.data, \*.meta,
60+
Place the generated checkpoint files (four of them: checkpoint, \*.data, \*.meta,
5861
\*.index-\*) in a directory which can be independently version
5962
controlled.
6063

61-
3) Create a file called `tf2xla.config.pbtxt` in the directory and define the
64+
Create a file called `tf2xla.config.pbtxt` in the directory and define the
6265
neural network configuration according to [https://www.tensorflow.org/xla/tfcompile](https://www.tensorflow.org/xla/tfcompile).
66+
For example if building with OpenAI baselines PPO1 with angular rate error, and
67+
delta angular rate error as input ,
68+
```
69+
feed {
70+
id { node_name: "pi/ob" }
71+
shape {
72+
dim { size: 1}
73+
dim { size: 6}
74+
}
75+
}
76+
fetch {
77+
id { node_name: "pi/pol/final/BiasAdd"}
78+
}
6379
64-
4) Neuroflight was developed using [Tensorflow-1.8.0](https://github.com/tensorflow/tensorflow/releases/tag/v1.8.0).
80+
```
81+
82+
2) **Install Tensorflow** Update: A patched version of Tensorflow is now
83+
available [here](https://github.com/wil3/tensorflow-neuroflight). If you'd like
84+
to patch your own copy of Tensorflow continue reading,
85+
86+
Neuroflight was developed using [Tensorflow-1.8.0](https://github.com/tensorflow/tensorflow/releases/tag/v1.8.0).
6587
There appears to be a bug/issue in Tensorflow-1.8.0-rc1 preventing the ABI type from being passed to tfcompile used to compile the neural network. A quick hack to force the correct ABIType is to modify compiler/xla/service/llvm_ir/llvm_util.cc. At the end of the
6688
function SetTargetOptions place,
6789
```C++
@@ -70,7 +92,17 @@ target_options->FloatABIType = llvm::FloatABI::Hard;
7092
Need to investigate whether these bugs have been fixed in newer versions or
7193
come up with a better method to handle this. Install [Bazel](https://bazel.build/) and then build Tensorflow.
7294

73-
5) There appears to be a second bug in which `tensorflow/compiler/aot/runtime.cc` does not import `malloc.h`.
95+
There appears to be a second bug in which `tensorflow/compiler/aot/runtime.cc` does not import `malloc.h`.
96+
97+
3) **Install Python Dependencies**
98+
99+
Use a virtual environment to isolate Python packages. In this directory,
100+
101+
```
102+
python3 -m venv env
103+
source env/bin/activate
104+
pip3 install -r requirements.txt
105+
```
74106

75107
### Neuroflight compilation
76108
1) In `make/local.mk` define `TENSORFLOW_DIR` to the location where you have
@@ -88,6 +120,12 @@ execution of the neural network. Flight controllers known to work,
88120

89121
* Matek F722-STD
90122

123+
To build firmware,
124+
```
125+
make TARGET=MATEKF722
126+
```
127+
Flash FC with `obj/neuroflight_3.3.3_MATEKF722.hex`
128+
91129
## Configuration
92130

93131
Neuroflight is compatible with the [Betaflight

0 commit comments

Comments
 (0)