在给ur5和realsense d435进行手眼标定时踩得坑

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

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

Thanks for the help @lyh458 !
I had a cv problem(cv2.CALIB_HAND_EYE_TSAI) yesterday.
I find the path of python in ROS:(/opt/ros/kinetic/lib/python2.7/dist-packages) is in front of many other path of python, but the cv2.so in ROS is not approprite because of lack CALIB_HAND_EYE_TSAI.(I have use pip3 install opencv-python python -m pip install opencv-contrib-python to install module and it's installed in ~/.local/lib/python2.7 which is after the path of python in ROS)

I have to use the code below to find the correct of cv2.
import sys
sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages')
import cv2
sys.path.append('/opt/ros/kinetic/lib/python2.7/dist-packages')

I'd like to know is there any other solution. Thanks!

My environment:
ubuntu16, ros-kinetic

 

github上面的解决方案

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

posted @ 2022-04-21 16:02  feifanren  阅读(446)  评论(0编辑  收藏  举报