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

Error: Cascade File haarcascade_frontalface_alt.xml

asked 2016-08-24 10:04:53 -0500

CodyLL gravatar image

updated 2016-08-24 10:13:25 -0500

gvdhoorn gravatar image

Moving from ROS Hydro to Indigo on the PR2 robot (via Clearpath Robotics upgrade), the face_detector package (git) did not work. I have purged and reinstalled through apt-get and used git clone.

When running

$ roslaunch face_detector face_detector.wide.launch​

I get

[ERROR]: Cascade file /usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml doesn't exist.

I have found the file at the following locations.

$ locate haarcascade_frontalface
/opt/ros/indigo/share/OpenCV-3.1.0-dev/haarcascades/haarcascade_frontalface_alt.xml
/opt/ros/indigo/share/OpenCV-3.1.0-dev/haarcascades/haarcascade_frontalface_alt2.xml
/opt/ros/indigo/share/OpenCV-3.1.0-dev/haarcascades/haarcascade_frontalface_alt_tree.xml
/opt/ros/indigo/share/OpenCV-3.1.0-dev/haarcascades/haarcascade_frontalface_default.xml

Is there a solution to this other than sudo cp?

Thanks

edit retag flag offensive close merge delete

Comments

Not an expert, but looking at param/classifier.yaml it would seem the path to that file is configurable. Have you tried changing/updating it?

gvdhoorn gravatar image gvdhoorn  ( 2016-08-24 10:16:16 -0500 )edit

That was introduced in wg-perception/people#15.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-24 10:17:44 -0500 )edit

Thank you this does seem like a solution with the code cloned or with a higher level launch file.

CodyLL gravatar image CodyLL  ( 2016-08-24 10:25:54 -0500 )edit

Yeah. The released pkgs probably expect OpenCV 2 to have been installed. Is the OpenCV-3.1.0-dev dir something 'official'?

gvdhoorn gravatar image gvdhoorn  ( 2016-08-24 13:18:18 -0500 )edit

The pr2 server computers were returned from Clearpath Robotics in that configuration. On a side note the launch file is still not running. It dies on start up error code -11. No other details. Works file on my laptop. I am assuming face_detector is not compatible with opencv 3

CodyLL gravatar image CodyLL  ( 2016-08-24 13:36:41 -0500 )edit

Might want to report this to both Clearpath as well as the wg-perception/peopleissue tracker.

gvdhoorn gravatar image gvdhoorn  ( 2016-08-25 01:37:15 -0500 )edit

Thank you for the assistance. I had reported the problem to them both before posing onto ROS answers.

CodyLL gravatar image CodyLL  ( 2016-08-25 13:11:53 -0500 )edit
gvdhoorn gravatar image gvdhoorn  ( 2019-09-11 05:33:11 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2019-09-11 05:07:01 -0500

Nada Aweaa gravatar image

If opencv file dose not exits in /usr/share, Create folder in /usr/share called ''opencv'' using SUDO then create "haarcascades". search for " haarcascade_frontalface_alt.xml " in all your files then copy it using '' sudo cp -i /home/catkin_ws/ haarcascade_frontalface_alt.xml /usr/share/opencv/haarcascade/ " change /home/catkin_ws/ haarcascade_frontalface_alt.xml to haarcascade_frontalface_alt.xml original file directory.

edit flag offensive delete link more

Comments

This would not be a good thing to do on an OS which has a package manager (as that is going to complain loudly if you ever try to install OpenCV the proper way.

On the PR2 this would probably also not be good advice.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-11 05:32:12 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-24 10:04:32 -0500

Seen: 1,631 times

Last updated: Aug 24 '16