Here we demonstrate how to set up a typical scene in RCareWorld. There are three ways to load a scene.
example_scene_setup.py in rcareworld_workspace/rcare_py/pyrcareworld/Examples . Then, click ‘run’ in Unity. You will see a square box in the scene.<aside>
💡 JSON files should be placed under Assets/StreamingAssets/SceneData by default. Do not try to move these files.
</aside>
<aside>
💡 You might need to do pip install open3d to proceed.
</aside>
from pyrcareworld.envs import RCareWorld
# Specify the name of the scene configuration file
env = RCareWorld(scene_file='my_new_scene.json')
print(env.instance_channel.data)
while True:
env._step()
Empty scene and click Run .Click ExportSceneToJson , it will create a json file under Assets/StreamingAssets/SceneData with the same name as your scene. This json file will record the position and properties of all the objects with XXXAttr .


Run example_tongue.py , you might need to modify the path of the executable file.
from pyrcareworld.envs import RCareWorld
# Specify the path of the exectuable file
env = RCareWorld(executable_file=<path_to_executable>)
while True:
env._step()
It will load the scene which is the same in Unity. The viewpoint will be the same from the main camera.