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

error in cv_bridge_nosetests #293

Open
frpunzalan opened this issue Sep 30, 2019 · 0 comments
Open

error in cv_bridge_nosetests #293

frpunzalan opened this issue Sep 30, 2019 · 0 comments

Comments

@frpunzalan
Copy link

Issue:
I am trying to migrate from ros kinetic to melodic. I compiled the vision_opencv since I am using a gpu-enabled version of opencv for my code. The vision_opencv tests runs ok in kinetic but when I migrated to melodic, an error occurs in the cv_bridge_nosetests. I am using the same opencv version for both kinetic and melodic version and the code is the same. Can anyone please point me to any solution for the following error:

My system config: (inside docker container)
Ubuntu 18.04
ROS melodic
gcc 7.4.0
OpenCV 3.4.7

Error log:

$ catkin_make run_tests_cv_bridge_nosetests
...
======================================================================
ERROR: test_encode_decode_cv2_compressed (conversions.TestConversions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/od-automower/base/src/vision_opencv/cv_bridge/test/conversions.py", line 66, in test_encode_decode_cv2_compressed
    compress_rosmsg = cvb_en.cv2_to_compressed_imgmsg(original, f)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/cv_bridge/core.py", line 219, in cv2_to_compressed_imgmsg
    cmprs_img_msg.data = np.array(cv2.imencode(ext_format, cvim)[1]).tostring()
error: OpenCV(3.4.7) /root/opencv-3.4.7/modules/imgcodecs/src/grfmt_pxm.cpp:431: error: (-5:Bad argument) Portable bitmap(.ppm) expects BGR image in function 'write'


----------------------------------------------------------------------
Ran 4 tests in 3.543s

FAILED (errors=1)
floriantschopp added a commit to ethz-asl/vision_opencv that referenced this issue Jan 3, 2020
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

1 participant