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

Using OpenCV4Tegra in ROS

asked 2016-07-30 21:10:50 -0600

SamTew gravatar image

I am running L4T 21.4 in TK1. I installed ROS by running the script from https://github.com/jetsonhacks/instal... . I am trying to run opencv4tegra in ROS. However, when I catkin_make my workspace, it show " No rule to make target `/usr/lib/arm-linux-gnueabihf/libopencv_videostab.so.2.4.8'. I have tried sudo apt-get install libopencv-videostab2.4 but it remove a lot of packages including opencv4tegra and ROS. I also tried the solution from https://devtalk.nvidia.com/default/to... but still no luck.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-09-29 08:23:34 -0600

marting gravatar image

libopencv_videostab might be located in your /usr/lib folder. You should be able to bypass this issue by creating a symbolic link from the correct location of the library to /usr/lib/arm-linux-gnueabihf/libopencv_videostab.so.2.4.8.

I had a simular issue on the TX 1. You can create the symbolic using the following lines: (replace with your architecture and version number)

ln -s /usr/lib/libopencv_calib3d.so /usr/lib/aarch64-linux-gnu/libopencv_calib3d.so.2.4.9
ln -s /usr/lib/libopencv_contrib.so /usr/lib/aarch64-linux-gnu/libopencv_contrib.so.2.4.9
ln -s /usr/lib/libopencv_core.so /usr/lib/aarch64-linux-gnu/libopencv_core.so.2.4.9
ln -s /usr/lib/libopencv_detection_based_tracker.so /usr/lib/aarch64-linux-gnu/libopencv_detection_based_tracker.so.2.4.9
ln -s /usr/lib/libopencv_esm_panorama.so /usr/lib/aarch64-linux-gnu/libopencv_esm_panorama.so.2.4.9
ln -s /usr/lib/libopencv_facedetect.so /usr/lib/aarch64-linux-gnu/libopencv_facedetect.so.2.4.9
ln -s /usr/lib/libopencv_features2d.so /usr/lib/aarch64-linux-gnu/libopencv_features2d.so.2.4.9
ln -s /usr/lib/libopencv_flann.so /usr/lib/aarch64-linux-gnu/libopencv_flann.so.2.4.9
ln -s /usr/lib/libopencv_gpu.so /usr/lib/aarch64-linux-gnu/libopencv_gpu.so.2.4.9
ln -s /usr/lib/libopencv_highgui.so /usr/lib/aarch64-linux-gnu/libopencv_highgui.so.2.4.9
ln -s /usr/lib/libopencv_imgproc.so /usr/lib/aarch64-linux-gnu/libopencv_imgproc.so.2.4.9
ln -s /usr/lib/libopencv_imuvstab.so /usr/lib/aarch64-linux-gnu/libopencv_imuvstab.so.2.4.9
ln -s /usr/lib/libopencv_legacy.so /usr/lib/aarch64-linux-gnu/libopencv_legacy.so.2.4.9
ln -s /usr/lib/libopencv_ml.so /usr/lib/aarch64-linux-gnu/libopencv_ml.so.2.4.9
ln -s /usr/lib/libopencv_objdetect.so /usr/lib/aarch64-linux-gnu/libopencv_objdetect.so.2.4.9
ln -s /usr/lib/libopencv_photo.so /usr/lib/aarch64-linux-gnu/libopencv_photo.so.2.4.9
ln -s /usr/lib/libopencv_stitching.so /usr/lib/aarch64-linux-gnu/libopencv_stitching.so.2.4.9
ln -s /usr/lib/libopencv_superres.so /usr/lib/aarch64-linux-gnu/libopencv_superres.so.2.4.9
ln -s /usr/lib/libopencv_tegra.so /usr/lib/aarch64-linux-gnu/libopencv_tegra.so.2.4.9
ln -s /usr/lib/libopencv_video.so /usr/lib/aarch64-linux-gnu/libopencv_video.so.2.4.9
ln -s /usr/lib/libopencv_videostab.so /usr/lib/aarch64-linux-gnu/libopencv_videostab.so.2.4.9
ln -s /usr/lib/libopencv_vstab.so /usr/lib/aarch64-linux-gnu/libopencv_vstab.so.2.4.9

You can also get complaints about libopencv_ocl. This library does not exist in opencv4tegra. I managed to bypass this error by creating a dummy shared library containing no functions (but correctly compiled) and naming it libopencv_ocl.so.X.X.X and placing it in the directory you mentioned.

edit flag offensive delete link more

Comments

hi, Thanks a lot for the solution. we encountered the same problem and followed your instruction accordingly. For the last step though, can you please guide us on how I can prepare a shared library? Thanks a lot!

Jetson_student_group gravatar image Jetson_student_group  ( 2018-03-12 04:51:43 -0600 )edit
0

answered 2016-08-03 13:52:25 -0600

skr_robo gravatar image

I think you will need to try different workarounds mentioned in the Nvidia forum, like the one you have in your question.

You can get the normal OpenCV working on Jetson. I am using OpenCV 2.4.13 on Jetson TX1. Here is the link . Make sure you specify the 2.4 branch during the git clone command.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2016-07-30 21:10:50 -0600

Seen: 961 times

Last updated: Aug 03 '16