utiasDSL / safe-control-gym

PyBullet CartPole and Quadrotor environments—with CasADi symbolic a priori dynamics—for learning-based control and RL
https://www.dynsyslab.org/safe-robot-learning/
MIT License
595 stars 124 forks source link

Example verbose_api.py invoked an AttributeError: task #123

Closed Solomon-GC closed 1 year ago

Solomon-GC commented 1 year ago

Hi,

I am trying to familiarize myself with the safe-control environment and followed the example "verbose_api.py". I've encountered with an issue that also reproduced in the google Colab version attached in the repo.

Here is the print of the error invoked while running it:

python3 verbose_api.py --system cartpole --overrides verbose_api.yaml pybullet build time: /.../safe-control-gym/safe_control_gym/utils/configuration.py:73: UserWarning: No agent/task config given. warnings.warn("No agent/task config given.") Traceback (most recent call last): File "/.../lib/python3.8/site-packages/munch/init.py", line 103, in getattr return object.getattribute(self, k) AttributeError: 'Munch' object has no attribute 'task'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/.../lib/python3.8/site-packages/munch/init.py", line 106, in getattr return self[k] KeyError: 'task'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "verbose_api.py", line 160, in run() File "verbose_api.py", line 32, in run if config.task == 'cartpole': File "/.../lib/python3.8/site-packages/munch/init.py", line 108, in getattr raise AttributeError(k) AttributeError: task

Thanks, Sol

JacopoPan commented 1 year ago

Hello @Solomon-GC

you should use --task instead of --system` as in:

python3 verbose_api.py --task quadrotor --overrides verbose_api.yaml

where did you find that example?