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

openai_ros q-learning example not work

asked 2018-08-17 10:05:12 -0500

FloppyHank gravatar image

Hi guys, As I'm trying to follow this tutorial from OpenAI_ROS to play around Q learning on a Gazebo simulated turtlebot in a maze. However, I cannot initiate my turtlebot. I have succesfully downloaded and built openai_ros and openai_example_projects in my ROS workspace. I'm using Ubuntu 16.04+ROS-Kinetic + Gazebo-7.0.

Basically, I'm following these steps:
1. $ roslaunch gym_construct main.launch to start gazebo simulation (this part looks fine to me).
2. $ roslaunch turtle2_openai_ros_example start_training.launch and this will give me following error messages.

[ERROR] [1534517590.397706, 29.824000]: WORLD RESET
[ERROR] [1534517590.399843, 29.826000]: NOT Initialising Simulation Physics Parameters
[WARN] [1534517590.401831, 29.828000]: Start Init ControllersConnection
[WARN] [1534517590.401994, 29.828000]: END Init ControllersConnection
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2018-08-29 13:15:53 -0500

R. Tellez gravatar image

Hi, I'm one of the developers of the package. your steps are correct.

I think that you have no error when executing the code and that everything is working. The thing is that, due to going fast in the deployment of the code, we have used ERROR and WARN messages to show different colors of messages for our own debugging purpose. Then we forgot to put it back to normal info messages.

What I mean is that those messages are not error messages, just INFO messages. We are going to change this next week.

So you should have a list of messages like this:

* /turtlebot2/wait_time: 0.1

NODES
/
turtlebot2_maze (turtle2_openai_ros_example/start_qlearning.py)

ROS_MASTER_URI=http://10.8.0.1:11311

process[turtlebot2_maze-1]: started with pid [15644]
[ERROR] [1535564679.315268, 210.837000]: WORLD RESET
[ERROR] [1535564679.324640, 210.846000]: NOT Initialising Simulation Physics Parameters
[WARN] [1535564679.331335, 210.852000]: Start Init ControllersConnection
[WARN] [1535564679.331698, 210.852000]: END Init ControllersConnection
[WARN] [1535564680.745782, 211.494000]: START wait_until_twist_achieved... 
[WARN] [1535564680.778331, 211.550000]: Reached Velocity!
[WARN] [1535564680.778792, 211.550000]: END wait_until_twist_achieved...
[ERROR] [1535564680.797151, 211.566000]: WORLD RESET
[WARN] [1535564681.186834, 211.714000]: new_ranges=5
[WARN] [1535564681.188497, 211.714000]: mod=144
[WARN] [1535564681.189583, 211.714000]: NOT done Validation >>> item=0.749866962433< 0.5
[WARN] [1535564681.190660, 211.714000]: NOT done Validation >>> item=0.922657012939< 0.5
[WARN] [1535564681.191821, 211.714000]: NOT done Validation >>> item=2.44325733185< 0.5
[WARN] [1535564681.192948, 211.714000]: NOT done Validation >>> item=2.64469790459< 0.5
[WARN] [1535564681.194034, 211.714000]: NOT done Validation >>> item=0.914873301983< 0.5
[WARN] [1535564681.195369, 211.714000]: ############### Start Step=>0
[WARN] [1535564681.196458, 211.714000]: Next action is:2
[WARN] [1535564681.215806, 211.714000]: START wait_until_twist_achieved...
[WARN] [1535564681.274124, 211.772000]: Not there yet, keep waiting...
[WARN] [1535564681.330621, 211.828000]: Reached Velocity!
[WARN] [1535564681.331351, 211.828000]: END wait_until_twist_achieved...
...

... and so on.

So your robot should start moving and trying actions.

Please confirm that it is working. Otherwise, copy here the whole output of your command.

edit flag offensive delete link more

Comments

Yes, you are right. I figured out this a couple of days before but forgot to check this answer back. Thank you.

FloppyHank gravatar image FloppyHank  ( 2018-09-24 22:42:15 -0500 )edit
0

answered 2018-08-29 15:23:14 -0500

tspthomas gravatar image

I was facing the same issue as you and I've noticed I didn't download and setup Turtlebot from Construct repository. I've noticed they recently updated the instructions with some extra help.

In my case, I just did the following:

cd ~/catkin_ws/src/
git clone https://bitbucket.org/theconstructcore/turtlebot.git
cd turtlebot
git checkout kinetic

Install other needed packages (maybe only to my case)

apt install ros-kinetic-pid
apt install ros-kinetic-controller-manager-msgs

Build everything

cd ~/catkin_ws
catkin_make

I hope that helps!

edit flag offensive delete link more

Comments

I think the developers answered my question. It was just the log type issue not a real error. I did not install the additional packages (or maybe they were included in default ROS installation), but still thank for helping out here.

FloppyHank gravatar image FloppyHank  ( 2018-09-24 22:44:13 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-08-17 10:05:12 -0500

Seen: 1,076 times

Last updated: Aug 29 '18