Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
machenxiang opened this issue Jul 1, 2019 · 1 comment

Comments

@machenxiang
Copy link

machenxiang commented Jul 1, 2019

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.

@Mayankm96
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants