Skip to content

Setting up project

Kaiyu Zheng edited this page Feb 27, 2022 · 7 revisions

Requirements

  • Ubuntu 18.04+
  • Python 3.8+

Check out instructions to use the Dockerfile if you don't meet these requirements

Setup Repo

Clone the repo:

git clone [email protected]:zkytony/cos-pomdp.git

After cloning do the following three commands separately.

source setup.bash
source setup.bash -I
source setup.bash -s

It is recommended to use a virtualenv with Python3.8+

To test if it is working: Do pip install pytest and then go to tests/ folder and run

pytest

You are expected to see something like:

-- Docs: https://docs.pytest.org/en/stable/warnings.html
======= 14 passed, 2 skipped, 3 warnings in 43.71s ======

Note: setup for SAVN, MJOLNIR etc. were attempted during the project; MJOLNIR can run but does not work well.

At this point, you should be able to run a basic object search domain with COS-POMDP. A

python -m cospomdp_apps.basic.search

pygame window will be displayed

To Run in Ai2Thor

(Skip this if you are running on a computer connected to a display) If you are running offline, or on a server, make sure there is an x server running. You can do this by:

  1. Creating the xorg_conf file. (Check this out)
  2. Then run:
sudo Xorg -noreset +extension GLX +extension RANDR +extension RENDER -config xorg_conf :0

Note that depending on your local configuration you may want to use something other than :0. If there is already an x server running at :0 but your $DISPLAY shows nothing, you should run it at another display number.

Now, download necessary models by running the following script. This will download three files: yolov5-training-data.zip, yolov5-detectors.zip, corrs.zip, place them in the desired location and decompress them.

# run at repository root
python download.py

Then, main test we will run is

cd tests/thor
python test_vision_detector_search.py

This will run a search trial for AlarmClock in a bedroom scene. When everything works, you may see something like this:

Note that the search process may vary due to random sampling during planning.

Clone this wiki locally