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

Import errror with tf2_ros on Melodic #37

Closed
harelb opened this issue May 21, 2021 · 3 comments
Closed

Import errror with tf2_ros on Melodic #37

harelb opened this issue May 21, 2021 · 3 comments

Comments

@harelb
Copy link
Contributor

harelb commented May 21, 2021

I am having an issue importing tf2_ros in the latest version of the driver. I am running ROS Melodic and I think the issue is tf2_ros is complied for Python 2 which is the default in Melodic.

  File "/home/.../spot_ros/spot_driver/scripts/spot_ros", line 3, in <module>
    from spot_driver.spot_ros import SpotROS
  File "/home/.../spot_ros/spot_driver/src/spot_driver/spot_ros.py", line 19, in <module>
    import tf2_ros
  File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 38, in <module>
    from tf2_py import *
  File "/opt/ros/melodic/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)

I can try to recompile tf2_ros for Python 3 but that breaks other packages. Is there a recommended procedure for installing a Python 3 version of tf2_ros for only this driver? Otherwise, has support for this driver moved to ROS Noetic which defaults to Python 3?

@dniewinski
Copy link
Contributor

Please follow the install instructions HERE. You will need to build a python3 version of geometry for the driver to work.

@harelb
Copy link
Contributor Author

harelb commented May 21, 2021

Thank you the updated instructions solved this issue. My apologizes, I didn't notice the updated build instructions when I pulled the latest version of the driver.

@harelb harelb closed this as completed May 21, 2021
@aamirhatim
Copy link

The documentation in the provided link should be updated to differentiate system architectures. The catkin_make command needs the DPYTHON_LIBRARY arg to be /usr/lib/aarch64-linux-gnu/libpython3.6m.so if using a Jetson for the backpack PC.

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

3 participants