pyrfuniverse
is a python package used to interact with RFUniverse
simulation environment. It is developed upon
ML-Agents and produce new features.
Note: current branch is under development.
conda create -n rfuniverse python=3.8 -y
conda activate rfuniverse
git clone https://github.com/mvig-robotflow/pyrfuniverse.git
cd pyrfuniverse
pip install -r requirements.txt
For users in China, please remember to change mirror by the following command. This can significantly accelerate downloading speed.
pip install -i https://mirrors.aliyun.com/pypi/simple -r requirements.txt
If you want to use pyrfuniverse
without modifying source code, run the following commands to copy source code to your conda directory.
python setup.py install
Otherwise, you may want to modify source code, then run the following command to construct the link in your conda directory.
pip install -e .
If you want to run RFUniverse
on ubuntu server, you will need headless mode so that no GUI window will be
generated. To fix this, we use virtual display
to render on virtual devices, inspired by
furniture.
You will need the following commands to configure your ubuntu server
sudo apt-get install xserver-xorg libglu1-mesa-dev freeglut3-dev mesa-common-dev libxmu-dev libxi-dev
Then, restart your server and connect your server to a screen. The screen won't render anything, but there must be a display device connecting to your server.
# Configure nvidia-x
sudo nvidia-xconfig -a --use-display-device=None --virtual=1280x1024
# Configure environment variable
export DISPLAY=:1
# Launch a virtual display
sudo /usr/bin/X :1 &
Here's a demo. I strongly recommend you run this demo first to test your virtual display configuration.
After this, you can use RFUniverse
on ubuntu server freely!