{"id":19184214,"url":"https://github.com/princeton-vl/packit_extra","last_synced_at":"2025-05-08T00:02:30.008Z","repository":{"id":108917275,"uuid":"281500525","full_name":"princeton-vl/PackIt_Extra","owner":"princeton-vl","description":"Code for generating data in ICML 2020 paper \"PackIt: A Virtual Environment for Geometric Planning\" ","archived":false,"fork":false,"pushed_at":"2024-12-15T00:19:06.000Z","size":38990,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-20T05:32:07.858Z","etag":null,"topics":["computer-vision","icml-2020","open-ai-gym","unity-ml-agents","virtual-environments"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/princeton-vl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-07-21T20:44:22.000Z","updated_at":"2024-12-15T00:19:11.000Z","dependencies_parsed_at":"2025-04-20T05:40:52.323Z","dependency_job_id":null,"html_url":"https://github.com/princeton-vl/PackIt_Extra","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princeton-vl%2FPackIt_Extra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princeton-vl%2FPackIt_Extra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princeton-vl%2FPackIt_Extra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/princeton-vl%2FPackIt_Extra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/princeton-vl","download_url":"https://codeload.github.com/princeton-vl/PackIt_Extra/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252973676,"owners_count":21834107,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["computer-vision","icml-2020","open-ai-gym","unity-ml-agents","virtual-environments"],"created_at":"2024-11-09T11:06:45.578Z","updated_at":"2025-05-08T00:02:29.969Z","avatar_url":"https://github.com/princeton-vl.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"images/packit.gif\" align=\"right\" width=\"30%\"/\u003e\n\n[**PackIt: A Virtual Environment for Geometric Planning**](http://arxiv.org/abs/2007.11121)  \n[Ankit Goyal](http://imankgoyal.github.io), [Jia Deng](https://www.cs.princeton.edu/~jiadeng/)  \n*International Conference on Machine Learning (ICML), 2020*\n```\n@inproceedings{goyal2020packit,\n  title={PackIt: A Virtual Environment for Geometric Planning},\n  author={Goyal, Ankit and Deng, Jia},\n  booktitle={International Conference on Machine Learning},\n  year={2020},\n}\n```\n*For reproducing the results of the paper and using our generated dataset, use the [main repository](https://github.com/princeton-vl/PackIt). This repository contains code for generating more data. We recommend using the main repository first and only use this one if more data is required.* \n\n\n## Getting Started\n\nFirst download/clone the repository. We would refer to the directory containing the code as `\u003cpackit_dir\u003e`.\n\n```\ngit clone git@github.com:princeton-vl/PackIt_Extra.git\n```\n\n#### Requirements\nThe PackIt environment is build using [Unity ML-agents](https://github.com/Unity-Technologies/ml-agents/tree/0.4.0) version **0.4.0**.\nWe provide standlone [Unity builds for Linux x86_64 platform](https://docs.unity3d.com/2017.4/Documentation/Manual/BuildSettingsStandalone.html).\nFor creating the builds, we use [Unity](https://unity.com/) version **2017.4.3**.  \n\n#### Download Data\nMake sure you are in `\u003cpackit_dir\u003e`. `download.sh` script downloads all the data, unzips them and, places them at correct locations. Note that symbolic links are created between the `\u003cpackit_dir\u003e/unity-build/StreamingAssets` folder and appropriate locations inside the unity data directory. This is necessary so that the data is accessible from the build unity game.\n```\nchmod +x download.sh\n./download.sh\n```\n\n## Code Organization\n- `\u003cpackit_dir\u003e/unity-assets`: Unity levels and C# scripts used for making unity builds from scratch.\n\n- `\u003cpackit_dir\u003e/unity-build`: Prebuild unity games and data for generating new packs.\n\n\n## Evolving new packs\n1. Make sure you have downloded everything before this step.  \n1. To generate a new pack, use the `\u003cpackit_dir\u003e/unity-build/generate.sh` script. To generate 5 new packs for the training data first `cd unity-build` and the use the command `./generate.sh --dataset tr --num_packs 5 --run 201`. This would generate packs at `\u003cpackit_dir\u003e/unity-build/StreamingAssets/pack_tr/201_tr`. For faster loading of data, we precompute some voxel features which would be generated in `\u003cpackit_dir\u003e/unity-build/StreamingAssets/pack_tr_precompute_\u003cunity/python\u003e/201_tr_\u003c0/1/2/3/4\u003e`.\n\n## Code for making you own unity build \nWe provide standlone unity build. In case you want to create your own unity builds follow the following steps. We strongly recommend familiarizing oneself with [Unity](https://unity.com/) first. Follow the steps below before making any unity build.\n\n1. Download and install [Unity 3D](https://unity.com/). We recommend installing version **2017.4.3**. Make sure you select the required `Build Support` while installing Unity. For example, select `Linux Build Support` if you want to make builds for Linux.\n\n1. Place the contents of `\u003cpackit_dir\u003e/unity-assets` inside  the `Assets` folder. The `Assets` folder should look like the following:\n\n    ![Assets](images/assets.png)\n\n1. To [set up ML-Agents inside Unity](https://github.com/Unity-Technologies/ml-agents/blob/0.4.0/docs/Basic-Guide.md), go to **Edit \u003e Project Settings \u003e Player**. In **(PC, Mac and Linux Standalone, iOS or Android)**, go to the **Other Settings** section.\nThen, select **Scripting Runtime Version to Experimental (.NET 4.6 Equivalent)** option. \n\n1. (Optional) You can place the `\u003cpackit_dir\u003e/unity-build/StreamingAssets` folder inside `Assets`. This would allow running the environment inside the editor.\n\n1. Now follow the steps of the particular unity build you want to make:\n\n- #### Packing\n  This unity build, along with `Precompute` is used for generating packs. \n  After running `download.sh`, this build is placed at `\u003cpackit_dir\u003e/unity-build/packing\u003c_Data/.x86_64\u003e`. \n  Following are the steps to make this build:  \n  \n  1. Go to **File \u003e Build Settings**.\n  1. Select **only** the `Level-Packing` in the **Scenes In Build** option. You might have to first open `Level-Packing` and then click `Add Open Scenes`. \n  1. Select the **Target Platform** and press **Build**. A sample image can be found below.\n  \n      ![Build](images/build.png)\n  \n  1. In case you didn't place the `\u003cpackit_dir\u003e/unity-build/StreamingAssets` folder inside `Assets`, you would have to create a symbolic link as done [here](https://github.com/princeton-vl/Packit_Extra/blob/master/download.sh#L19) for a Linux Build.\n\n- #### Precompute\n  This unity build, along with `Packing` is used for generating packs.\n  After running `download.sh`, this build is placed at `\u003cpackit_dir\u003e/unity-build/precompute\u003c_Data/.x86_64\u003e`. \n  Following are the steps to make this build:\n  \n  1. Go to **File \u003e Build Settings**.\n  1. Select **only** the **Level-Precompute** in the **Scenes In Build** option. You might have to first open **Level-Precompute** and then click **Add Open Scenes**. \n  1. Select the **Target Platform** and press **Build**.\n  1. In case you didn't place the `\u003cpackit_dir\u003e/unity-build/StreamingAssets` folder inside `Assets`, you would have to create a symbolic link as done [here](https://github.com/princeton-vl/Packit_Extra/blob/master/download.sh#L19) for a Linux Build.\n  \n- #### PackIt Env\n  This unity build is used for the packit environment in the [main repository](https://github.com/princeton-vl/PackIt). \n  After running `download.sh` in the [main repository](https://github.com/princeton-vl/PackIt), this build is placed at `\u003cpackit_dir\u003e/unity/envs/packit_\u003c_Data/.x86_64\u003e`.\n  Following are the steps to make this build:\n    \n  1. Update all the arguments in [`Assets/Scripts/PackingEnv/PackingAgent`](https://github.com/princeton-vl/PackIt/blob/master/unity-assets/Scripts/PackingEnv/PackingAgent.cs#L48-L57) for unity agent.\n  1. Open **Level-Main** and click **Academy \u003e Brain**. \n  1. In the **Brain Type** option, select **External**. Save the **Level-Main** scene.\n  \n      ![Brain-External](images/brain_external.png)\n      \n  1. Go to **File \u003e Build Settings**.\n  1. Select **only** the **Level-Main** in the **Scenes In Build** option. You might have to first open **Level-Main** and then click **Add Open Scenes**. \n  1. Select the **Target Platform** and press **Build**.\n  1. In case you didn't place the `\u003cpackit_dir\u003e/unity-build/StreamingAssets` folder inside `Assets`, you would have to create a symbolic link as done [here](https://github.com/princeton-vl/Packit_Extra/blob/master/download.sh#L19) for a Linux Build.\n\n- #### PackIt Viz Env\n  This unity build is used for the packit environment in the [main repository](https://github.com/princeton-vl/PackIt).\n  After running `download.sh` in the [main repository](https://github.com/princeton-vl/PackIt), this build is placed at `\u003cpackit_dir\u003e/unity/envs/packit_viz\u003c_Data/.x86_64/_mac.app\u003e`. \n  Following are the steps to make this build:\n  \n  1. Update all the arguments in [`Assets/Scripts/PackingEnv/PackingAgent`](https://github.com/princeton-vl/PackIt/blob/master/unity-assets/Scripts/PackingEnv/PackingAgent.cs#L48-L57) for visualizer.\n  1. Open **Level-Main** and click **Academy \u003e Brain**. \n  1. In the **Brain Type** option, select **Player**. Save the **Level-Main** scene.\n  \n      ![Brain-Player](images/brain_player.png)\n      \n  1. (Optional) In case you moved the `StreamingAssets` folder insider `Assets`, you can check the visualizer inside the Unity Editor. On clicking **Play**, the game would look as follows. Press `a` to execute the next action.\n  \n     ![Play](images/play.png)\n     \n  1. Go to **File \u003e Build Settings**.\n  1. Select **only** the **Level-Main** in the **Scenes In Build** option. You might have to first open **Level-Main** and then click **Add Open Scenes**. \n  1. Select the **Target Platform** and press **Build**.\n  1. In case you didn't place the `\u003cpackit_dir\u003e/unity-build/StreamingAssets` folder inside `Assets`, you would have to create a symbolic link as done [here](https://github.com/princeton-vl/Packit_Extra/blob/master/download.sh#L19) for a Linux Build.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprinceton-vl%2Fpackit_extra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprinceton-vl%2Fpackit_extra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprinceton-vl%2Fpackit_extra/lists"}