jetson_install - Extended-Object-Detection-ROS/wiki_english GitHub Wiki

NEW

For Jetson Xavier AGX

Problem is the same, system has multiple OpenCV versions. One version stored in /usr/lib/aarch64-linux-gnu, other in /usr/local/lib To fix that, everything of opencv in /usr/lib/aarch64-linux-gnu should be removed (or copied in other location) and replaced with symlinks to /usr/local/lib. I wrote simple script allowing do this from /usr/lib/aarch64-linux-gnu


for lib in opencv_calib3d opencv_core opencv_dnn opencv_features2d opencv_flann opencv_gapi opencv_highgui opencv_imgcodecs opencv_imgproc opencv_ml opencv_objdetect opencv_photo opencv_stitching opencv_video opencv_videoio opencv_alphamat opencv_aruco opencv_barcode opencv_bgsegm opencv_bioinspired opencv_ccalib opencv_cudaarithm opencv_cudabgsegm opencv_cudacodec opencv_cudafeatures2d opencv_cudafilters opencv_cudaimgproc opencv_cudalegacy opencv_cudaobjdetect opencv_cudaoptflow opencv_cudastereo opencv_cudawarping opencv_cudev opencv_datasets opencv_dnn_objdetect opencv_dnn_superres opencv_dpm opencv_face opencv_freetype opencv_fuzzy opencv_hdf opencv_hfs opencv_img_hash opencv_intensity_transform opencv_line_descriptor opencv_mcc opencv_optflow opencv_phase_unwrapping opencv_plot opencv_quality opencv_rapid opencv_reg opencv_rgbd opencv_saliency opencv_shape opencv_stereo opencv_structured_light opencv_superres opencv_surface_matching opencv_text opencv_tracking opencv_videostab opencv_viz opencv_wechat_qrcode opencv_xfeatures2d opencv_ximgproc opencv_xobjdetect opencv_xphoto
do
sudo ln -s /usr/local/lib/lib${lib}.so lib${lib}.so.4.2.0
sudo ln -s lib${lib}.so.4.2.0 lib${lib}.so.4.2
done

OLD

This section is about installing the package on Jetson series computers.

The problem is that at the time of this writing, support for Ubuntu 20.04 has not been released for Jetson, on which ROS Noetic is installed, in turn based on OpenCV 4.2.0, which has access to the DNN module. Thus, you simply cannot use a platform designed for fast graphical computing as intended for ROS. This requires reinstalling OpenCV.
__Note: __ reinstalling OpenCV and replacing cv_bridge may break other packages!

Tested on platforms:

Jetson platform JetPack version OpenCV version
Xavier AGX 4.4.1 4.4.0
  1. Install OpenCV 4.4.0 using script https://github.com/Extended-Object-Detection-ROS/nano_build_opencv
cd
mkdir Libs && cd Libs
git clone https://github.com/Extended-Object-Detection-ROS/nano_build_opencv
./build_opencv.sh 4.4.0

Version 4.2.0 is not supported by new JetPack 2. Create symlink /usr/include/opencv --> /usr/include/opencv4

cd /usr/include
sudo ln -s opencv4 opencv
  1. Download modified for cv4 cv_bridge
cd catkin_ws/src
git clone https://github.com/Extended-Object-Detection-ROS/cv_bridge_fixed_for_jetson 
catkin_build
  1. Then insatll package https://github.com/Extended-Object-Detection-ROS/extended_object_detection/wiki/eod_install