The following error occurs when running the example/controls/cartpole.py:
Read blend: /home/gauenk/Documents/packages/pytorch-blender/examples/control/cartpole_gym/envs/cartpole.blend
Traceback (most recent call last):
File "./cartpole.py", line 39, in <module>
main()
File "./cartpole.py", line 30, in main
obs = env.reset()
File "/home/gauenk/.local/lib/python3.8/site-packages/gym/wrappers/order_enforcing.py", line 16, in reset
return self.env.reset(**kwargs)
File "/home/gauenk/Documents/packages/pytorch-blender/pkg_pytorch/blendtorch/btt/env.py", line 292, in reset
obs, info = self._env.reset()
File "/home/gauenk/Documents/packages/pytorch-blender/pkg_pytorch/blendtorch/btt/env.py", line 64, in reset
obs = ddict.pop('obs')
KeyError: 'obs'
This happens because in btt/env.py (pytorch's env.py) the reset function pops off a key "obs" for the observation. However, an observation is not sent from the blender side, btb/env.py in the _pre_animation function. The dict sent from the blender side is defined as follows,
The following error occurs when running the
example/controls/cartpole.py
:This happens because in btt/env.py (pytorch's env.py) the
reset
function pops off a key "obs" for the observation. However, an observation is not sent from the blender side, btb/env.py in the_pre_animation
function. The dict sent from the blender side is defined as follows,