This section describes the prerequisites and installation-steps of BARK.
- Bazel > 3(requires Java)
- Python3.7 (
sudo apt-get install python3.7 python3.7-dev python3.7-tk
) - Virtual Env (
pip3 install virtualenv==16.7.8
) (note that the newest version does not seem to link the Python.h) - gcc7 (needs to be set as the default compiler)
- Visual Studio Code
Using ad-rss-lib
- sqlite 3 (
sudo apt-get install libsqlite3-dev sqlite3
)
- pip3 install bark-simulator
We recommend to use an anaconda environment instead of your system's python installation. Otherwise, you can proceed with step 5.
- Install Anaconda: see https://docs.anaconda.com/anaconda/install/linux/ for more information
- Install Conda Environment with Python 3.7:
conda create -n bark_env python=3.7
- Activate the new environment:
conda activate bark_env
- Install Virtual Env:
pip3 install virtualenv==16.7.8
- Use
git clone https://github.com/bark-simulator/bark.git
or download the repository from this page. - Change directory to bark
- Run
bash install.sh
: creates a virtual environment (located in python/venv) and installs all python packages - Run
source dev_into.sh
: activates the virtual environment (make sure to run this before bazel) - Use
bazel test //...
to validate that BARK is working. - Finally, try one of the examples provided in BARK by running
bazel run //bark/examples:merging
.
- Install pyenv:
brew install pyenv
. - Install a newer version of tcl-tk:
brew upgrade tcl-tk
. - Run
pyenv install python3.7-dev
. If you run into trouble with TKInter have a look here. - Set this as your global Python version:
pyenv global 3.7-dev
. - Also add this Python version to your
~/.zshrc
by addingeval "$(pyenv init -)"
. - Install an older version of the virtualenv package by running:
pip install virtualenv==16.7.8
- In order to set TKAgg as backend have a look here.
- Modify the file
install.sh
by usingvirtualenv -p python ./python/venv
instead as python is now the pyenv version. - Now you can follow the same steps as when using Linux.
- Install twine using python3 -m pip install --user --upgrade twine
- Run script bash package.sh to build code, package and upload to pypi
Make sure that there is a 'Python.h' file in the python/venv
folder.
You might be running out of memory during the bazel build.
Try limiting the memory available to bark via
bazel build //... --local_ram_resources=HOST_RAM*.4
(or any other build or test call).
Once you activated the virtual environment (source dev_into.sh
), you can explore some examples of BARK.
Highway: ' bazel run //bark/examples:highway
:
Merging: bazel run //bark/examples:merging
:
Intersection: bazel run //bark/examples:intersection
: