Ask Your Question
0

TurtleBot2 with openai_ros

asked 2019-04-11 05:55:17 -0500

Uls gravatar image

I am trying to set up the turtlebot2 with openai_ros on my local computer. I use Ubuntu 16.04, kinetic. I've downloaded all the packages I think I need, and used catkin build.

I am following the instructions at http://wiki.ros.org/openai_ros/Turtle... , but when I get to 2c and launch using roslaunch my_turtlebot2_training start_training.launch I get the error

AttributeError: 'module' object has no attribute 'task_envs.turtlebot2.turtlebot2_maze.TurtleBot2MazeEnv'

The traceback of the code is

Traceback (most recent call last):
  File "/home/myuser/catkin_ws/src/my_turtlebot2_training/src/start_training.py", line 20, in <module>
    env = gym.make('TurtleBot2Maze-v0')
  File "/home/myuser/gym/gym/envs/registration.py", line 183, in make
    return registry.make(id, **kwargs)
  File "/home/myuser/gym/gym/envs/registration.py", line 125, in make
    env = spec.make(**kwargs)
  File "/home/myuser/gym/gym/envs/registration.py", line 88, in make
    cls = load(self._entry_point)
  File "/home/myuser/gym/gym/envs/registration.py", line 18, in load
    fn = getattr(mod, attr_name)
AttributeError: 'module' object has no attribute 'task_envs.turtlebot2.turtlebot2_maze.TurtleBot2MazeEnv'

I get the same error if I try to follow the instructions at http://www.theconstructsim.com/ros-pr... .

edit retag flag offensive close merge delete

Comments

I also encounter that problem, could you pls tell me how you solve it at the end?

christy gravatar imagechristy ( 2019-08-15 03:11:21 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2019-09-15 14:36:07 -0500

benwex93 gravatar image

In task_envs_list.py it should be 'openai_ros.task_envs.turtlebot2.turtlebot2_wall:TurtleBot2WallEnv' instead of 'openai_ros:task_envs.turtlebot2.turtlebot2_wall.TurtleBot2WallEnv' (notice the change of position of the colon and periods)

edit flag offensive delete link more

Comments

I have the same issue but this didn't help

rosmos gravatar imagerosmos ( 2019-09-16 05:17:02 -0500 )edit

you're getting the same exact error? Can you post it?

benwex93 gravatar imagebenwex93 ( 2019-09-16 05:32:41 -0500 )edit

Never mind! My bad I was apparently editing a different version that I seemed to have been a duplicated copy. Your solution worked!

rosmos gravatar imagerosmos ( 2019-09-16 09:28:53 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2019-04-11 05:55:17 -0500

Seen: 236 times

Last updated: Sep 15