I am trying to set up the CartPoleStayUp example from the using ros with openai course on my own laptop. To do this I download both the openai_tutorial_xamples and the cart_pole simulation in a catkin_ws. I then build the catkin p installed the ROS dependencies using rosdep install --from-path ./src --ignore-src --rosdistro=melodic --os=ubuntu:bionic
. However when I try to launch the example using the roslaunch cartpole_openai_ros_examples start_training_original_qlearn.launch
command I get the following error:
Traceback (most recent call last):
File "/home/ricks/Development/robot_academy_ws/src/cartpole_openai_ros_examples/scripts/start_training_original_qlearn.py", line 29, in <module>
env = gym.make('CartPoleStayUp-v0')
File "/home/ricks/venvs/cart_pole_venv/local/lib/python2.7/site-packages/gym/envs/registration.py", line 142, in make
return registry.make(id, **kwargs)
File "/home/ricks/venvs/cart_pole_venv/local/lib/python2.7/site-packages/gym/envs/registration.py", line 86, in make
spec = self.spec(path)
File "/home/ricks/venvs/cart_pole_venv/local/lib/python2.7/site-packages/gym/envs/registration.py", line 128, in spec
raise error.UnregisteredEnv('No registered env with id: {}'.format(id))
gym.error.UnregisteredEnv: No registered env with id: CartPoleStayUp-v0
When I switch the openai_ros to version 1 instead of version 2 the error is not present and the simulation does load succesfully. Can anybody maybe explain to me how to use the Cartpole 3D environment together with openai_ros version 2? In the documentation, it says the robot environment should be downloaded automatically.