This is the cloth simulation environment used in UniFolding. It is built on RFUniverse which is a a platform developed in Unity for robot simulation and reinforcement learning. The GPU-based cloth simulator in this project is based on Cloth Dynamics plugin in Unity Asset Store.
- Windows 11 with WSL2
- Ubuntu 20.04 (recommended)
-
Clone Project.
git clone https://github.com/xiaoxiaoxh/UniFolding
-
Install Unity Hub and install Unity Editor 2022.3 LTS through Unity Hub.
Install the Unity Hub | Unity Hub | 3.0
You can install it according to the official documentation:
Downloading and installing Editors and modules with the Unity Hub | Unity Hub | 3.0
-
Add and Open Project (
RFUniverse
) in Unity Editor. -
The ClothDynamics plugin is used in the project for clothing simulation. Since it is a paid plug-in, you need to purchase it and import it into the project.
Unity Asset Store Link:Cloth Dynamics | Unity Asset Store
The version that has been verified and used in the project is 2.0.9 beta.
When importing, do not replace existing scripts with the same name in the project. Because there are some modifications.
-
Open And Play
RFUniverse/Assets/Scenes/Scene.unity
-
Select the
Main
object in the scene -
Click the LoadMesh button to load clothes.
Click the RandomFold button to random folding.
Follow the normal process to build an executable program. You can follow the official documentation:
Unity - Manual: Publishing Builds
This executable program supports two-way messaging with the python interface (pyrfuniverse).
Currently, we have implemented some basic primitives (e.g. fling
) in Main.cs
. If you want to implement your own action primitives, please refer
to the documentation of dynamic message
.