ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

problem of openai using turtlebot3 in ROS Noetic

asked 2022-11-03 09:30:35 -0500

jandisoon gravatar image

updated 2023-06-18 10:05:06 -0500

lucasw gravatar image

when i run this command roslaunch my_turtlebot3_openai_example start_training.launch I am getting below error:

Traceback (most recent call last):
File "/home/zahra/ros_ws/src/turtlebot3/my_turtlebot3_openai_example/scripts/start_qlearning.py", line 20, in     <module>
env = gym.make('TurtleBot3World-v0')
File "/home/zahra/.local/lib/python3.8/site-packages/gym/envs/registration.py", line 652, in make
raise e
File "/home/zahra/.local/lib/python3.8/site-packages/gym/envs/registration.py", line 640, in make
env = env_creator(**_kwargs)
File "/home/zahra/ros_ws/src/openai_ros/openai_ros/src/openai_ros/task_envs/turtlebot3/turtlebot3_world.py", line 64, in __init__
high = numpy.full((num_laser_readings), self.max_laser_value)
File "/usr/local/lib/python3.8/dist-packages/numpy/core/numeric.py", line 343, in full
a = empty(shape, dtype, order)
TypeError: expected a sequence of integers or a single integer, got '72.0'
[turtlebot3_world-2] process has died [pid 550934, exit code 1, cmd /home/zahra/ros_ws/src/turtlebot3/my_turtlebot3_openai_example/scripts/start_qlearning.py __name:=turtlebot3_world __log:=/home/zahra/.ros/log/1c6e38f4-5b80-11ed-bbb3-6d3fe910ccd7/turtlebot3_world-2.log].
log file: /home/zahra/.ros/log/1c6e38f4-5b80-11ed-bbb3-6d3fe910ccd7/turtlebot3_world-2*.log
edit retag flag offensive close merge delete

Comments

My advice is that you determine which version(s) of ros this openai_ros package works in. I took a quick look, but it seems the web page doesn't say and the git repo doesn't say either. The name of the git branch is kinetic-devel, so maybe that's a clue.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2022-11-05 04:59:56 -0500 )edit

okey is there any version suitable with noetic ?

jandisoon gravatar image jandisoon  ( 2022-11-05 07:06:17 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2023-06-12 02:40:00 -0500

Hi, did you solve it?? I'm having the same issue in ROS noetic, gym 0.25.2 and the 'version2' branch of openai_ros. I tried to do the solution below, but nothing, this stop the topic '/scan'.

edit flag offensive delete link more
0

answered 2023-01-13 07:32:10 -0500

jnzhnd gravatar image

I'm also trying to get this to work on noetic, I at least got the training running (it seems to not detect crashes though at the moment). As for your question, I got around this by doing this:

high = numpy.full(int(num_laser_readings), self.max_laser_value)

instead of

high = numpy.full((num_laser_readings), self.max_laser_value)
edit flag offensive delete link more

Comments

I did that, but didn't solve it. After that I obtain:

I'm using ROS noetic, gym 0.25.2 and the 'version2' branch of openai_ros. If someone could help me....

Alfarrow gravatar image Alfarrow  ( 2023-06-12 02:31:05 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-11-03 09:30:35 -0500

Seen: 311 times

Last updated: Dec 26 '22