Loading...

Build ros-kinetic-opencv3 package for Jetson TX2

ros-kinetic-opencv3 package is very useful for ROS users, but this package is not supported cuda.
So, we built ros-kinetic-opencv3 packages with cuda modules in Jetson TX2.
Compiled binary is here.

Usage is below.
1.install dependencies

sudo apt update
sudo apt build-dep opencv
sudo apt install libvtk6-qt-dev libgoogle-glog-dev 

2.remove ros-kinetic-opencv3

sudo apt remove ros-kinetic-opencv3

3.install dpkg

sudo dpkg -i ros-kinetic-opencv3_3.3.1-0xenial_arm64.deb

We built this .deb file in this way.(<a href=”https://qiita.com/kendemu/items/a805b0b9828b6f6031db”>reference</a>)
1.get ros-kinetic-opencv3 source from apt-get

git clone -b 3.1.0-with-cuda8 https://github.com/daveselinger/opencv opencv
sudo echo &amp;quot;deb-src http://packages.ros.org/ros/ubuntu xenial main&amp;quot; &amp;gt;&amp;gt; /etc/apt/sources.list.d/ros-latest.list
sudo apt-get update
sudo apt-get source ros-kinetic-opencv3  

2.remove source files which occurs cuda error.

cp opencv/modules/cudalegacy/src/graphcuts.cpp  ros-kinetic-opencv3-3.1.0/modules/cudalegacy/src/graphcuts.cpp

3.generate .deb file

sudo apt-get install devscripts build-essential
cd ros-kinetic-opencv3-3.1.0
sudo apt-get build-dep ros-kinetic-opencv3-3.1.0
sudo dpkg-buildpackage -b -uc 
cd ../

then, you will find “ros-kinetic-opencv3_3.3.1-0xenial_arm64.deb”

 

18 thoughts on “Build ros-kinetic-opencv3 package for Jetson TX2

Leave a Reply