floriankagerer / bed-bpp-env

This repository contains a gym environment that can be used for developing solvers for robotic 3D bin packing problems.

Home Page:https://floriankagerer.github.io/dataset

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Banner_Image


BED-BPP: Benchmark Dataset for Robotic Bin Packing Problems

Paper Accepted

I am happy to announce that our paper "BED-BPP: Benchmarking Dataset for Robotic Bin Packing" has been accepted for publication in the International Journal of Robotics Research (IJJR).

Whenever you use the dataset, please cite our publication:

Kagerer F, Beinhofer M, Stricker S, Nüchter A. BED-BPP: Benchmarking dataset for robotic bin packing problems. The International Journal of Robotics Research. 2023;42(11):1007-1014. doi:10.1177/02783649231193048
[BibTeX] [DOI]

Getting Started

Please find below the instructions on how to setup and use the code in this repository.

Preliminaries (Python and Blender)

To use all features and functions in this repository, make sure that you have installed Python and Blender on your system.

Blender. Download and install Blender. If script_evaluate_packing_plan.py does not find the location of Blender, add the Blender path to bed-bpp_env.conf.

Python. Depending on your system, we suggest to use different Python versions (Take a look for which platform and Python version the Visualization Toolkit wheels are available.). We suggest to use the environment with

Platform Python Version
macOS (with M1 chip) Python >= 3.9
Ubuntu/Linux Python >= 3.8

Note, that we will use python3.9 in the following instructions.


Install (Requirements in Python venv)
  1. Create and activate a virtual Python environment

    (a) Check your Python version with

    dev@nb:~$ compgen -c python

    This command should list all available Python versions.


    (b) Create a virtual environment with

    dev@nb:~$ python3.9 -m venv /path/to/venv/bed-bpp

    ⚠️
    Change /path/to/venv/bed-bpp according to your needs.
    Note that you can remove a virtual environment with sudo rm -rf /path/to/venv/bed-bpp.


    (c) Activate the virtual environment with

    dev@nb:~$ source /path/to/venv/bed-bpp/bin/activate

    Now your terminal should look similar to

    (bed-bpp) dev@nb:~$ 

    (d) Add the full path to code/ to your PYTHONPATH.

⚠️
We added the script activate_venv.sh which automatically activates the venv and updates the PYTHONPATH.
Just enter your location of the virtual environment in line 2 and run the script with

source activate_venv.sh


  1. Install the required packages

    (a) Upgrade pip with

    (bed-bpp) dev@nb:~$ /full/path/to/venv/bed-bpp/bin/python3 -m pip install --upgrade pip

    (b) Install the requirements with

    (bed-bpp) dev@nb:~$ pip install -r requirements.txt

⚠️ Note for Debugging with VS Code.
If you can’t find the Python interpreter of the virtual environment, you might set a venv path in VS Code. To do this, open the settings with "Ctrl + ," and search for "venv". Then, add the folder where your venv is stored to the field "Python: Venv Path".


Usage

Change the current working directory to

(bed-bpp) dev@nb:~$ cd RepoDir/bed-bpp-env/code/

and check whether the setup was successful by running

(bed-bpp) dev@nb:~/RepoDir/bed-bpp-env/code$ python3 demo_gym_palenv-py -v

After a few seconds you should see an image that is similar to the following

test_image

😀 Happy Coding 😀


Scripts

Here is an overview about the scripts in this repo.

demo_gym_palenv.py This script demonstrates the use of this repository and the palletizing environment.

script_evaluate_packing_plan.py This script evaluates packing plans and stores the results.

run_heuristic_O3DBP_3_2.py The script which we used to create the packing plan for the task Online 3D bin packing with preview `p=3` and selection `s=2`.

script_visualize_packing_plan.py This script visualizes a packing plan, which is given as dict with order ids as key and a list of actions as values, and finally creates a video of the palletization for each order.

run_your_solver.py This script can be used for your solver.

Participation

We encourage you to develop solvers for the three-dimensional bin packing problem and submit your results to the leaderboard.

For details, visit https://floriankagerer.github.io/dataset and https://floriankagerer.github.io/leaderboard.

Leaderboardr_Image

Till now, we integrated the following solvers in this repo and used BED-BPP as benchmark:

About

This repository contains a gym environment that can be used for developing solvers for robotic 3D bin packing problems.

https://floriankagerer.github.io/dataset


Languages

Language:Shell 23.4%Language:C++ 21.1%Language:Roff 19.5%Language:Python 17.6%Language:Groovy 7.7%Language:Java 5.7%Language:Makefile 4.1%Language:M4 0.8%Language:C 0.1%