Error while using OpenAI Gym in ROS Noetic
I have installed OpenAI Gym and ROS Noetic. Now, I'm following this tutorial in YouTube in my local installation. However, after executing the following command rosrun cartpole_v0_training start_training.py
, I am getting below error:
/usr/lib/python3/dist-packages/requests/__init__.py:89: RequestsDependencyWarning: urllib3 (1.26.12) or chardet (3.0.4) doesn't match a supported version!
warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported "
Traceback (most recent call last):
File "/home/zahra/openai_ws/src/cartpole_v0_training/scripts/start_training.py", line 29, in <module>
env = gym.make('MyCartPole-v0')
File "/usr/local/lib/python3.8/dist-packages/gym/envs/registration.py", line 669, in make
env = PassiveEnvChecker(env)
File "/usr/local/lib/python3.8/dist-packages/gym/wrappers/env_checker.py", line 24, in __init__
assert hasattr(
AssertionError: The environment must specify an observation space. https://www.gymlibrary.dev/content/environment_creation/