Book: Learning ROS for Robotics Programming 2nd Edn; Chapter 5 homography.cpp:16:39: fatal error: opencv2/nonfree/nonfree.hpp: No such file or directory
Hello, I am studying the book for beginners to understand ROS. When I compile chapter 5 tutorials, I face this problem.
/home/khan/catkin_ws/src/chapter5_tutorials/src/homography.cpp:16:39: fatal error: opencv2/nonfree/nonfree.hpp: No such file or directory
To resolve this problem, I have already gone through the following method mentioned herelink text
sudo apt-get update
sudo add-apt-repository --yes ppa:xqms/opencv-nonfree
sudo apt-get update
sudo apt-get install libopencv-nonfree-dev
but in following that method, I got another error such as
E: Unable to locate package libopencv-nonfree-dev
to resolve this problem, I followed the method mentioned here as
sudo gedit /etc/apt/sources.list
and then make its backup and further change by adding these lines into the source.list file
deb http://kr.archive.ubuntu.com/ubuntu precise main restricted universe
deb-src http://kr.archive.ubuntu.com/ubuntu precise restricted main multiverse universe
deb http://kr.archive.ubuntu.com/ubuntu precise-updates main restricted universe
deb-src http://kr.archive.ubuntu.com/ubuntu precise-updates restricted main multiverse universe
and then finally updating it with
sudo apt-get update
After going through this whole method, still I am seeing this error
W: Failed to fetch http://ppa.launchpad.net/xqms/opencv-nonfree/ubuntu/dists/vivid/main/binary-amd64/Packages 404 Not Found
Please, help me in it, I have spent plenty of time in figuring it out and still my chapter5 tutorials are not being compiled. I shall buy cookies for you. :)
After going through the method explained by Dear Jarvis Schultz, I followed this problem further and I am getting this message. @Jarvisschults. i.e. undo the changes I made in source.list and run the following.
sudo add-apt-repository ppa:xqms/opencv-nonfree
I am getting this message.
Please be aware of potential patent issues when using this PPA. For a list of included algorithms see:
http://docs.opencv.org/modules/nonfree/doc/nonfree.html
More info: https://launchpad.net/~xqms/+archive/ubuntu/opencv-nonfree
I guess it is worth mentioning that I am using Linux 15.04 under ROS Jade with graphic card NVIDIA GeForce GT630. I feel there might be some issue with it as I read it from this link in which the message is,
please do not advise users to add the Proprietary GPU Drivers PPA when it is not necessary, the nvidia-352 drivers are available in the official Ubuntu repositories. Adding this PPA is an option when these drivers don't work properly and you want to install the latest official stable NVIDIA drivers from the NVIDIA short-lived branch.