OpenAI with ROS: Chapter 2: how to use openai_ros pkg on a local pc

It has taken me a long time to run openai_ros package on my local computer.
But it still doesn’t work.
Could you help me?Thanks.

roslaunch cartpole_v0_training start_training.launch
just like below.there is no gazebo ,no episode reward and so on

setting /run_id to 103744b2-b156-11ea-94e5-000c29953d78
process[rosout-1]: started with pid [53250]
started core service [/rosout]
process[cartpole_gym-2]: started with pid [53258]
/usr/local/lib/python2.7/dist-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
warnings.warn(colorize(’%s: %s’%(‘WARN’, msg % args), ‘yellow’))

You have to give us a bit more detail about what you are exactly trying to do, and what you have done so far. @rtellez maybe you can have a look

Thanks for your reply.I did it.
I should run “roslaunch cartpole_description main.launch” first.

1 Like

Hi @simon.steinmann91

I was trying to reproduce the my_cartpole_training on my local PC. That is a
Unit 2 exercise from Using OpenAI with ROS course.
System Information:
Ubuntu 18.04
ROS: Melodic

When I launch the training by executing below commands,
roslaunch my_cartpole_training start_training.launch

There is no Gazebo GUI neither no log after PID execution,
SUMMARY
========

PARAMETERS
 * /cartpole_v0/alpha: 0.5
 * /cartpole_v0/control_type: velocity
 * /cartpole_v0/epsilon: 0.1
 * /cartpole_v0/epsilon_discount: 0.999
 * /cartpole_v0/gamma: 0.9
 * /cartpole_v0/init_pos: 0.0
 * /cartpole_v0/max_base_pose_x: 2.5
 * /cartpole_v0/max_base_velocity: 50
 * /cartpole_v0/max_pole_angle: 0.7
 * /cartpole_v0/min_base_pose_x: -2.5
 * /cartpole_v0/min_pole_angle: -0.7
 * /cartpole_v0/n_actions: 4
 * /cartpole_v0/nepisodes: 1000
 * /cartpole_v0/nsteps: 1000
 * /cartpole_v0/number_splits: 10
 * /cartpole_v0/pos_step: 0.016
 * /cartpole_v0/running_step: 0.04
 * /cartpole_v0/wait_time: 0.1
 * /rosdistro: melodic
 * /rosversion: 1.14.10

NODES
  /
    cartpole_gym (my_cartpole_training/start_training.py)

auto-starting new master
process[master]: started with pid [24881]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 7fefc694-2a50-11eb-acff-342eb74c7dc2
process[rosout-1]: started with pid [24892]
started core service [/rosout]
process[cartpole_gym-2]: started with pid [24895]
1 Like