Okay so i successfully installed cv-bridge, and can compile some sample code from the cv bridge tutorials, and run the node no problem. There still need to be some modifications, but i made a modified .deb for ros-indigo-cv-bridge and changed around a few things:
First off, the default armhf deb for ros-indigo-cv-bridge sets different lib paths for setting the libraries in the cmake. For example, in the cv_bridgeConfig.cmake inside the .deb:
set(libraries "cv_bridge;/usr/lib/arm-linux-gnueabihf/libopencv_videostab.so;/usr/lib/arm-linux-gnueabihf/libopencv_video.so;.....
needs to instead be
set(libraries "cv_bridge;/usr/lib/libopencv_videostab.so;/usr/lib/libopencv_video.so;....
I took out the /arm-linux-gnueabihf/ out of the path because opencv4tegra libraries are installed in /usr/lib.
To get the cv-bridge debian so i could edit it, i did the following commands:
sudo apt-get install -d ros-indigo-cv-bridge ## -d just downloads, not install
cd /var/cache/apt/archives
sudo cp ros-indigo-cv-bridge_1.11.6-0trusty-20141201-2058-+0000_armhf.deb ~/Downloads
cd ~/Downloads
mkdir ros-indigo-cv-bridge-extracted
sudo dpkg-deb -R ros-indigo-cv-bridge_1.11.6-0trusty-20141201-2058-+0000_armhf.deb ros-indigo-cv-bridge-extracted
All dpkg-deb -R
does is extracts the .deb WITH the DEBIAN folder so that you can edit the DEBIAN/control file.
In the control file, i deleted a few things: libopencv-dev
, libopencv-python
, libopencv-core2.4
, libopencv-imgproc2.4
, since these were all already installed by opencv4tegra debian.
Once i edited all those things, i think built the package like so:
sudo dpkg-deb -b ros-indigo-cv-bridge-extracted ros-indigo-cv-bridge-tegra_1.11.6-l0g1x-2.deb
and then finally just use sudo dpkg -i ros-indigo-cv-bridge-tegra_1.11.6-l0g1x-2.deb
to install it.
I dont think i missed any steps, but attached is where the .deb file i made is. Just use dpkg -i to install it (after CUDA and opencv4tegra have been installed)
It would be nice if the ros arm buildfarm actually had a cv-bridge debian for the jetson.. maybe?
EDIT1: I wanted to clarify when i edit the DEBIAN/control file; when i say i "removed" libopencv-dev
, libopencv-python
, libopencv-core2.4
, libopencv-imgproc2.4
, all the re-movement does is remove what dependencies the package installer should check for;
EX) if there is a dependency listed in the control file, and the package manager sees that it is not installed on the system it will try to install that dependency (separately, like as its own .deb file). So since we know that libopencv-dev
, libopencv-python
, libopencv-core2.4
, libopencv-imgproc2.4
is already installed from the opencv4tegra .deb , we can remove them from the 'Depends:' line in DEBIAN/control
EDIT 2: Steps to take if you just download the .deb i made:
sudo dpkg -i <my_file>.deb
sudo apt-get update
sudo apt-get install libopencv4tegra libopencv4tegra-dev
EDIT 3: The modified cv-bridge.deb i made is only a quick fix/hack. I am currently working on making a permanent fix by modifying just the oepncv4tegra.deb, so that you wont have to use the quick fix cv-bridge hack and can update cv-bridge whenever with apt-get upgrade. Should have this done within the next day or two. For now i have rearranged things around so opencv4tegra libs actually in fact ... (more)
which L4T version are you on?
@l0g1x I'm using the latest 21.2.2 hacked with TheGrinch kernel
I forgot where I read this, but that dummy package works as is for 19.3, and that you have to slightly modify the dummy package for it to work with 21.2 opencv4tegra.
Not next to my board right now, but i will post instruction later on today if i figure it out
I tried every kind of modifications, but I cannot figure out what I was missing, I'm really curious.
As long as I get the solution I will post it on my guide to configure Jetson TK1 for a robotics application: http://myzharbot.robot-home.it/blog/s...
Naturally I will be really happy to post a link to "you" (website, blog, ecc) thanking for the help