File "test_while.py", line 1, in <module>
from robot_control_class import RobotControl
File "/home/simulations/public_sim_ws/src/all/ros_basics_examples/python_course_class/robot_control_class.py", line 7, in <module>
from tf.transformations import euler_from_quaternion, quaternion_from_euler
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)
Hi @bolokangkk,
it seems that you may have forgotten to also run the source below before running your script:
source ~/.catkin_ws_python3/bin/activate
Could you try that, please?
This is the same error reported by another user some time ago.