Error running openAI_ros with hopper robot

Hello! I tried to run the openAI_ros for hopper robot in my computer as explained in the live class #22. Before running this I downloaded the openAI_ros package and compiled it, then I installed gym like as said here. But I am getting the following error. Could someone explain why this is coming.

  • /alive_reward: 100.0
  • /alpha: 0.1
  • /desired_force: 7.08
  • /desired_pose/x: 0.0
  • /desired_pose/y: 0.0
  • /desired_pose/z: 1.0
  • /desired_yaw: 0.0
  • /discrete_division: 50
  • /done_reward: -1000.0
  • /episode_done_criteria: ['monoped_minimum…
  • /epsilon: 0.9
  • /epsilon_discount: 0.999
  • /gamma: 0.8
  • /init_joint_pose/haa: 0.0
  • /init_joint_pose/hfe: 0.0
  • /init_joint_pose/kfe: -1.6
  • /joint_increment_value: 0.05
  • /joint_limits_array/haa_max: 1.6
  • /joint_limits_array/haa_min: -1.6
  • /joint_limits_array/hfe_max: 1.6
  • /joint_limits_array/hfe_min: -1.6
  • /joint_limits_array/kfe_max: 0.0
  • /joint_limits_array/kfe_min: -1.6
  • /jump_increment: 0.8
  • /list_of_observations: [‘base_roll’, 'ba…
  • /max_height: 3.0
  • /max_incl: 1.6
  • /maximum_base_angular_velocity: 20.0
  • /maximum_base_linear_acceleration: 3000.0
  • /maximum_joint_effort: 10.0
  • /min_height: 0.5
  • /nepisodes: 100000
  • /nsteps: 1000
  • /rosdistro: kinetic
  • /rosversion: 1.12.14
  • /running_step: 0.001
  • /weight_r1: 0.0
  • /weight_r2: 0.0
  • /weight_r3: 0.0
  • /weight_r4: 0.0
  • /weight_r5: 0.0

NODES
/
monoped_gym (hopper_training/start_training_v2.py)

ROS_MASTER_URI=http://localhost:11311

process[monoped_gym-1]: started with pid [9022]
Traceback (most recent call last):
File “/home/hari/pholus_learning/src/hopper_training/src/start_training_v2.py”, line 22, in
import monoped_env
File “/home/hari/pholus_learning/src/hopper_training/src/monoped_env.py”, line 23, in
timestep_limit=100000,
File “/home/hari/gym/gym/envs/registration.py”, line 153, in register
return registry.register(id, **kwargs)
File “/home/hari/gym/gym/envs/registration.py”, line 147, in register
self.env_specs[id] = EnvSpec(id, *kwargs)
TypeError: init() got an unexpected keyword argument ‘timestep_limit’
[monoped_gym-1] process has died [pid 9022, exit code 1, cmd /home/hari/pholus_learning/src/hopper_training/src/start_training_v2.py __name:=monoped_gym __log:=/home/hari/.ros/log/90675702-feb5-11e9-bc31-484d7ee019cf/monoped_gym-1.log].
log file: /home/hari/.ros/log/90675702-feb5-11e9-bc31-484d7ee019cf/monoped_gym-1
.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor…
… shutting down processing monitor complete
done

Solved this error. the timestep_limit is renamed as max_episode_steps in the new gym libraries. So just renamed it in the env.py file

2 Likes

Good to know you solved it :wink: