airsim_ros_client icon indicating copy to clipboard operation
airsim_ros_client copied to clipboard

ImportError: dynamic module does not define module export function (PyInit__tf2)

Open machenxiang opened this issue 5 years ago • 1 comments

Hi ,i am sorry to bother you. i use your airsim_ros_client pubImages.launch. And then it occurs this error

**So... logging to /home/mcx/.ros/log/4fbdd0f6-9bea-11e9-8ce3-b881980ddda6/roslaunch-mcx-Lenovo-Rescuer-15ISK-7289.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://mcx-Lenovo-Rescuer-15ISK:34899/

SUMMARY

PARAMETERS

  • /airsim_img_publisher/Fx: 320
  • /airsim_img_publisher/Fy: 320
  • /airsim_img_publisher/cx: 320
  • /airsim_img_publisher/cy: 180
  • /airsim_img_publisher/height: 360
  • /airsim_img_publisher/loop_rate: 10
  • /airsim_img_publisher/width: 640
  • /robot_description: <?xml version="1....
  • /rosdistro: kinetic
  • /rosversion: 1.12.14
  • /use_gui: False

NODES / airsim_img_publisher (airsim_ros_client/img_publisher.py) robot_state_publisher (robot_state_publisher/state_publisher)

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

setting /run_id to 4fbdd0f6-9bea-11e9-8ce3-b881980ddda6 process[rosout-1]: started with pid [7315] started core service [/rosout] process[robot_state_publisher-2]: started with pid [7329] process[airsim_img_publisher-3]: started with pid [7333] Traceback (most recent call last): File "/home/mcx/catkin_ws/src/airsim_ros_client/scripts/img_publisher.py", line 13, in import tf2_ros File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_ros/init.py", line 38, in from tf2_py import * File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_py/init.py", line 38, in from ._tf2 import * ImportError: dynamic module does not define module export function (PyInit__tf2) [airsim_img_publisher-3] process has died [pid 7333, exit code 1, cmd /home/mcx/catkin_ws/src/airsim_ros_client/scripts/img_publisher.py __name:=airsim_img_publisher __log:=/home/mcx/.ros/log/4fbdd0f6-9bea-11e9-8ce3-b881980ddda6/airsim_img_publisher-3.log]. log file: /home/mcx/.ros/log/4fbdd0f6-9bea-11e9-8ce3-b881980ddda6/airsim_img_publisher-3*.log**

i have some questions want to ask for you. 1 I think this error iis wrong with the version of python .So which version of python do you use? Thank you in advance.

machenxiang avatar Jul 01 '19 10:07 machenxiang

Hey!

As you said, the error seems to be connected to your Python. ROS Kinetic only works with Python 2.7. Can you try running following command and sharing outputs?

python -c "import tf"

and

python2.7 -c "import tf"

It will show if you can correctly import tf library.

Mayankm96 avatar Jul 01 '19 12:07 Mayankm96