Robotics StackExchange | Archived questions

runtime erro ( openai_examples_projects )

I use Unbuntu 16.04 , kinetic . I use https://bitbucket.org/theconstructcore/openai_examples_projects.git But I have runtime erro.

If I run below command roslaunch myturtlebot3openaiexample starttraining.launch

I can see below runtime erro. please help me. thank you

hyunoklee@ubuntu:~/catkinws$ roslaunch myturtlebot3openaiexample start_training.launch

'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
process[turtlebot3world-1]: started with pid [22615]
Traceback (most recent call last):
File "/home/hyunoklee/catkin
ws/src/openaiexamplesprojects/myturtlebot3openaiexample/scripts/startqlearning.py", line 20, in
env = gym.make('TurtleBot3World-v0')
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 171, in make
return registry.make(id, kwargs)
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 123, in make
env = spec.make(
kwargs)
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/envs/registration.py", line 87, in make
env = cls(**kwargs)
File "/home/hyunoklee/catkin
ws/src/openairos/openairos/src/openairos/taskenvs/turtlebot3/turtlebot3world.py", line 27, in _init__
self.actionspace = spaces.Discrete(numberactions)
File "/home/hyunoklee/.local/lib/python2.7/site-packages/gym/spaces/discrete.py", line 15, in init
super().init((), np.int64)
TypeError: super() takes at least 1 argument (0 given)

Asked by hyunoklee on 2019-02-16 07:14:09 UTC

Comments

Answers

I solve this. If I install gym by " pip install gym " . the gym code is for python3 .

First Solution is to install gym by code level .
git clone https://github.com/openai/gym.git cd gym pip install -e .

Sencond Solution is the change code like below.
~/.local/lib/python2.7/site-packages/gym/spaces/discrete.py

super().init((), np.int64)

-> super(Discrete,self).init((), np.int64)

Asked by hyunoklee on 2019-02-16 10:21:07 UTC

Comments