Unit 6: How to change the learning algorithm: Cube

When I run launch, the following message appears. It doesn’t show the training logs, it doesn’t save the movingcube_model.pkl file and it seems to terminate without justification.

user:~$ roslaunch my_moving_cube_pkg start_training_cube_deepq.launch
… logging to /home/user/.ros/log/3eb63214-fec8-11ec-9ebb-0242ac130007/roslaunch-3_xterm-1643.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://3_xterm:46499/

SUMMARY

PARAMETERS

  • /moving_cube/buffer_size: 500
  • /moving_cube/end_episode_points: 1000
  • /moving_cube/exploration_final_eps: 0.02
  • /moving_cube/exploration_fraction: 0.1
  • /moving_cube/init_cube_pose/x: 0.0
  • /moving_cube/init_cube_pose/y: 0.0
  • /moving_cube/init_cube_pose/z: 0.0
  • /moving_cube/init_roll_vel: 0.0
  • /moving_cube/lr: 1e-3
  • /moving_cube/max_distance: 2.0
  • /moving_cube/max_pitch_angle: 0.2
  • /moving_cube/max_timesteps: 1000
  • /moving_cube/max_y_linear_speed: 100
  • /moving_cube/max_yaw_angle: 0.1
  • /moving_cube/move_distance_reward_weight: 1000.0
  • /moving_cube/n_actions: 5
  • /moving_cube/n_observations: 6
  • /moving_cube/print_freq: 100
  • /moving_cube/reward_task_learned: 10000
  • /moving_cube/roll_speed_fixed_value: 100.0
  • /moving_cube/roll_speed_increment_value: 10.0
  • /moving_cube/speed_step: 1.0
  • /moving_cube/y_axis_angle_reward_weight: 1000.0
  • /moving_cube/y_linear_speed_reward_weight: 1000.0
  • /rosdistro: noetic
  • /rosversion: 1.15.9

NODES
/
movingcube_gym (my_moving_cube_pkg/my_start_deepq.py)

ROS_MASTER_URI=http://3_simulation:11311

process[movingcube_gym-1]: started with pid [1651]
2022-07-08 14:20:13.969867: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
[WARN] [1657290016.219459, 0.000000]: ACTION SPACES TYPE===>Discrete(5)
[WARN] [1657290016.220474, 0.000000]: OBSERVATION SPACES TYPE===>Box(6,)
[WARN] [1657290016.250447, 0.005000]: Start Init ControllersConnection
[WARN] [1657290016.251655, 0.005000]: END Init ControllersConnection
input shape is (6,)
2022-07-08 14:20:16.696918: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2022-07-08 14:20:16.697309: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘libcuda.so.1’; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/user/catkin_ws/devel/lib:/home/simulations/public_sim_ws/devel/lib:/opt/ros/noetic/lib:/opt/ros/noetic/lib/x86_64-linux-gnu:/usr/local/cuda-10.2/lib64:/home/user/.catkin_ws_python3/src/TensorRT-7.0.0.11/lib:/usr/local/cuda-10.2/lib64:/home/user/.catkin_ws_python3/src/TensorRT-7.0.0.11/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins:/usr/lib/x86_64-linux-gnu/gazebo-11/plugins
2022-07-08 14:20:16.697341: W tensorflow/stream_executor/cuda/cuda_driver.cc:326] failed call to cuInit: UNKNOWN ERROR (303)
2022-07-08 14:20:16.697372: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (3_xterm): /proc/driver/nvidia/version does not exist
2022-07-08 14:20:16.698284: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
input shape is (6,)
Restoring from None
2022-07-08 14:20:16.994307: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2022-07-08 14:20:16.994971: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency: 2893305000 Hz
/usr/local/lib/python3.8/dist-packages/numpy/core/fromnumeric.py:3372: RuntimeWarning: Mean of empty slice.
return _methods._mean(a, axis=axis, dtype=dtype,
/usr/local/lib/python3.8/dist-packages/numpy/core/_methods.py:170: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
[ERROR] [1657290023.045825, 0.613000]: WRONG Cube Yaw Orientation==>0.2
[ERROR] [1657290023.995367, 0.747000]: WRONG Cube Yaw Orientation==>-0.3
[ERROR] [1657290026.005350, 1.651000]: WRONG Cube Yaw Orientation==>0.5
[ERROR] [1657290028.220861, 1.757000]: WRONG Cube Yaw Orientation==>0.4
[ERROR] [1657290032.610186, 3.615000]: WRONG Cube Yaw Orientation==>-0.2
[ERROR] [1657290033.370257, 0.520000]: WRONG Cube Yaw Orientation==>0.2
[ERROR] [1657290041.172211, 6.425000]: WRONG Cube Pitch Orientation==>0.3
[ERROR] [1657290041.733926, 0.415000]: WRONG Cube Yaw Orientation==>-0.2
[ERROR] [1657290047.705011, 4.855000]: WRONG Cube Pitch Orientation==>0.3
[ERROR] [1657290056.419838, 7.224000]: WRONG Cube Pitch Orientation==>0.3
[ERROR] [1657290062.668704, 5.085000]: WRONG Cube Pitch Orientation==>0.3
[movingcube_gym-1] process has finished cleanly
log file: /home/user/.ros/log/3eb63214-fec8-11ec-9ebb-0242ac130007/movingcube_gym-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor…
… shutting down processing monitor complete
done