EbOR: Environments for Example-based Object Rearrangement
Currently there are three environments in this repo:
| Circle-21Ball1Class-v0 | Cluster-21Ball3Class-v0 | CircleCluster-21Ball3Class-v0 |
|---|---|---|
![]() |
![]() |
![]() |
- Ubuntu >= 18.04
- python >= 3.6
- gym>=0.20.0,<0.25.0a0
- pybullet >= 3.2.5
- opencv-python >= 4.6.0
git clone https://github.com/AaronAnima/EbOR
cd EbOR
pip install -e .
Launch the environment and run a random agent to see the environment in action:
python random_agent.py --render
Minimal example:
import gym
import ebor
import cv2
env = gym.make('CircleCluster-21Ball3Class-v0') # choose the environment
state = env.reset(is_random=False) # if is_random=False, the env will reset to a target example state
cv2.imshow('target', env.render()) # show the target image
cv2.waitKey(1)
while True:
done = False
state = env.reset()
while not done: # get done in 100 steps
random_action="/?originalUrl=https%3A%2F%2Fgithub.com%2Fenv.action_space.sample()%2520%23%2520get%2520a%2520random%2520action%2520%2520%2520%2520%2520%2520%2520%2520state%2C%2520reward%2C%2520done%2C%2520info%2520%3D%2520env.step(random_action)%2520%23%2520take%2520a%2520step%2520%2520%2520%2520%2520%2520%2520%2520img%2520%3D%2520env.render()%2520%23%2520render%2520the%2520image%2520%2520%2520%2520%2520%2520%2520%2520cv2.imshow("img', img) # show the image
cv2.waitKey(1)
The environment
@inproceedings{
wu2022targf,
title={Tar{GF}: Learning Target Gradient Field for Object Rearrangement},
author={Mingdong Wu and Fangwei Zhong and Yulong Xia and Hao Dong},
booktitle={Advances in Neural Information Processing Systems},
editor={Alice H. Oh and Alekh Agarwal and Danielle Belgrave and Kyunghyun Cho},
year={2022},
url={https://openreview.net/forum?id=Euv1nXN98P3}
}
If you have any suggestion or questions, please get in touch at wmingd@pku.edu.cn or zfw@pku.edu.cn..
TarGF has an MIT license, as found in the LICENSE file.


