mats-robotics / yolov5_ros

A complete ROS interface for running YOLOv5 inference
GNU General Public License v3.0
220 stars 64 forks source link

ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost) #2

Closed abhishekt711 closed 2 years ago

abhishekt711 commented 2 years ago

I am getting this error

[ERROR] [1653988149.797134, 0.000000]: bad callback: <bound method Yolov5Detector.callback of <main.Yolov5Detector object at 0x7f3d3e241040>> Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback cb(msg) File "/home/winet/yolov5/src/yolov5_ros/src/detect.py", line 112, in callback im = CvBridge().imgmsg_to_cv2(data, desired_encoding="bgr8") File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 163, in imgmsg_to_cv2 dtype, n_channels = self.encoding_to_dtype_with_channels(img_msg.encoding) File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 99, in encoding_to_dtype_with_channels return self.cvtype2_to_dtype_with_channels(self.encoding_to_cvtype2(encoding)) File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 91, in encoding_to_cvtype2 from cv_bridge.boost.cv_bridge_boost import getCvType ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)

abhishekt711 commented 2 years ago

Solved using this https://cyaninfinite.com/ros-cv-bridge-with-python-3/