ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Jetson Nano comes with OpenCV 4.1.1., do I need to downgrade to 3.2. for melodic?

asked 2020-03-28 14:38:31 -0500

jorgemia gravatar image

I just got a Jetson Nano running Ubuntu 18.04 and it comes with OpenCV 4.1.1. pre installed. I've read ROS melodic is meant to work with OpenCV 3.2. and I'm getting some catkin make errors due to conflict between versions, for example:

usr/bin/ld: warning: libopencv_imgcodecs.so.3.2, needed by /opt/ros/melodic/lib/libcv_bridge.so, may conflict with libopencv_imgcodecs.so.4.1

Should I downgrade my system OpenCV to 3.2.?

edit retag flag offensive close merge delete

Comments

Do you mind sharing your recipe in recompiling cv_bridge? I am badly stuck. Thank you.

floda gravatar image floda  ( 2020-06-21 05:08:22 -0500 )edit

Hi, Please check the this vision_opencv to fix the issues with cv_bridge.

Akr2712 gravatar image Akr2712  ( 2020-08-18 14:52:50 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-05-08 12:06:04 -0500

kmfrick gravatar image

I encountered the same issue lately. You can downgrade with sudo apt -y --allow-downgrades install libopencv-dev=3.2.0+dfsg-4ubuntu0.1 and hold (avoid it being upgraded) with sudo apt-mark hold libopencv-dev.

If you have time, try to work on making your packages compatible with OpenCV 4 (e.g. by removing usage of the C API) since focal, and therefore noetic, drops support for OpenCV 3. To make everything work on melodic, your best bet right now is to downgrade and hold.

edit flag offensive delete link more

Comments

Thanks! Managed to find and install from source releases of certain packages that were compatible with OpenCV 4 but it has been a real pain to get it to work because had to rebuild CV Bridge and many others...I think downgrading is probably better as you say until more packages work with OpenCV 4.

Will the downgrade command you posted remove OpenCV 4 from the Nano?

jorgemia gravatar image jorgemia  ( 2020-05-09 13:09:18 -0500 )edit

Yes, it should remove OpenCV 4 and install version 3.2.0.

kmfrick gravatar image kmfrick  ( 2020-05-10 05:49:09 -0500 )edit

@jorgemia Do you mind posting your steps in recompiling cv_bridge? I got badly stuck there.

floda gravatar image floda  ( 2020-06-21 05:07:35 -0500 )edit

@floda Hey I did it a while back but basically installed someone's fork from github where they had changed files to support opencv 4. You can find info here that might be useful: Github Issue and you could check some of the pull requests on github. Some of them might have been merged already so cv_bridge might already support OpenCV4. Also, the latest noetic release of cv-bridge supports OpenCv4, you might be able to install that.

jorgemia gravatar image jorgemia  ( 2020-06-22 03:41:28 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-03-28 14:38:31 -0500

Seen: 4,086 times

Last updated: Mar 28 '20