ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

No module named '_tf2'

asked 2017-09-30 08:10:31 -0600

AlexS gravatar image

I am running ROS kinetic and catkin_make works fine. Then several nodes start but two don't start. Error message:

File "/opt/ros/kinetic/lib/python2.7/dist-packages/tf2_py/__init__.py", line 37, in <module> from _tf2 import * ImportError: No module named '_tf2'

When I check the environment then I have there also /opt/ros/kinetic/lib/python2.7/dist-packages

Question is what I have to do to make it running? There is no module called '_tf2' that I could install.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-10-02 03:24:00 -0600

tfoote gravatar image

_tf2 is a compiled output of tf2_py which is the python wrapper of the core tf2 libray. You should make sure that tf2_py is either installed or built in your workspace and the installation directories are sourced.

edit flag offensive delete link more

Comments

Hi, how can I check the tf2_py was properly installed/built/sourced? Thanks a lot! I was following the steps shown at http://wiki.ros.org/tf/Tutorials/Introduction%20to%20tf, but at roslaunch turtle_tf turtle_tf_demo.launch I get only one turtle shown and ImportError: No module named '_tf2'.

RosF110 gravatar image RosF110  ( 2017-10-13 20:20:12 -0600 )edit

I have the same problem, but in my case once it is imported with no problem and once imedietly it gives the import error. I have described it here: https://github.com/hill-a/stable-base...

I'd be glad if anyone had any clue what I could try

azerila gravatar image azerila  ( 2020-07-02 16:48:04 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2017-09-30 08:10:31 -0600

Seen: 3,028 times

Last updated: Oct 02 '17