在给ur5和Azure Kinect进行手眼标定时踩得坑。

在给ur5和Azure Kinect进行手眼标定时踩得坑。,第1张

在给ur5和Azure Kinect进行手眼标定时踩得坑。 1. importError:(PyInit__tf2)
importError: dynamic module does not define module export function (PyInit__tf2)

在手眼标定的launch文件写完之后,运行发现出现的第一个问题就是这个问题。

Traceback (most recent call last):
  File "/home/bjh/catkin_ws/src/learning_tf2/nodes/static_turtle_tf2_broadcaster.py", line 8, in 
    import tf
  File "/home/bjh/catkin_ws/devel/lib/python2.7/dist-packages/tf/__init__.py", line 35, in 
    exec(__fh.read())
  File "", line 30, in 
  File "/home/bjh/catkin_ws/devel/lib/python2.7/dist-packages/tf2_ros/__init__.py", line 35, in 
    exec(__fh.read())
  File "", line 38, in 
  File "/home/bjh/catkin_ws/devel/lib/python2.7/dist-packages/tf2_py/__init__.py", line 35, in 
    exec(__fh.read())
  File "", line 38, in 
importError: dynamic module does not define module export function (PyInit__tf2)

 查了很多资料发现,这个问题是当初安装anaconda时python冲突导致的,和下面出现的问题一样:

Could not import "pyqt" bindings of qt_gui_cpp library - so C++ plugins will not be available:
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/qt_gui_cpp/cpp_binding_helper.py", line 43, in 
    from . import libqt_gui_cpp_sip
importError: dynamic module does not define module export function (PyInit_libqt_gui_cpp_sip)

这些问题都是因为anaconda和ubuntu18.04自带的python版本不同所导致的,因此,解决方法为:

gedit ~/.bashrc

 

 在 unset __conda_setup后面加上

conda deactivate

 

 2.AttributeError: 'module' object has no attribute'CALIB_HAND_EYE_TSAI'

出现这个问题的原因在于python的opencv版本过低,低版本的opencv中没有手眼标定的函数,因此需要更新opencv版本即可。

pip2 install opencv-python==4.2.0.32

 https://github.com/IFL-CAMP/easy_handeye/issues/78

 

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/4827700.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-11-10
下一篇 2022-11-10

发表评论

登录后才能评论

评论列表(0条)

保存