Unit 6 Import Error

After executing the following in the terminal

source ~/.catkin_ws_python3/openai_venv/bin/activate
source ~/.catkin_ws_python3/devel/setup.bash
cd /home/user/catkin_ws
rm -rf build devel
catkin_make
source devel/setup.bash
roslaunch my_moving_cube_pkg my_start_training_deepq_version.launch

I get this as my output

... logging to /home/user/.ros/log/5c1c93de-9886-11ea-bcb1-0272b7374911/roslaunch-rosdscomputer-1001.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://rosdscomputer:41987/

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: 1
 * /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: kinetic
 * /rosversion: 1.12.14

NODES
  /
    movingcube_gym (my_moving_cube_pkg/my_start_deepq.py)

ROS_MASTER_URI=http://master:11311

process[movingcube_gym-1]: started with pid [1041]
Logging to /tmp/openai-2020-05-17-22-13-38-852248
Traceback (most recent call last):
  File "/home/user/catkin_ws/src/my_moving_cube_pkg/scripts/my_start_deepq.py", line 8, in <module>
    import my_one_disk_walk
  File "/home/user/catkin_ws/src/my_moving_cube_pkg/scripts/my_one_disk_walk.py", line 10, in <module>
    from tf.transformations import euler_from_quaternion
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf/__init__.py", line 28, in <module>
    from tf2_ros import TransformException as Exception, ConnectivityException, LookupException, ExtrapolationException
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38, in <module>
    from tf2_py import *
  File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 38, in <module>
    from ._tf2 import *
ImportError: dynamic module does not define module export function (PyInit__tf2)
[movingcube_gym-1] process has died [pid 1041, exit code 1, cmd /home/user/catkin_ws/src/my_moving_cube_pkg/scripts/my_start_deepq.py __name:=movingcube_gym __log:=/home/user/.ros/log/5c1c93de-9886-11ea-bcb1-0272b7374911/movingcube_gym-1.log].
log file: /home/user/.ros/log/5c1c93de-9886-11ea-bcb1-0272b7374911/movingcube_gym-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done
1 Like

@bayodesegun Can you take a look?