ros-perception / opencv_apps

http://wiki.ros.org/opencv_apps
65 stars 70 forks source link

[face_detection] add test for face_detection/face_image topic #47

Closed furushchev closed 8 years ago

furushchev commented 8 years ago
furushchev commented 8 years ago

After I added test code, I found that current code does not work on hydro. (see error log below)

Possible solutions:

Any suggestion? @k-okada

  /opt/ros/hydro/share/rostest/cmake/../../../bin/rostest --pkgdir=/home/travis/catkin_ws/src/opencv_apps --package=opencv_apps --results-filename test_test-face_detection__gui_false.xml /home/travis/catkin_ws/src/opencv_apps/test/test-face_detection.test gui:=false 
... logging to /home/travis/.ros/log/rostest-214de1bd3875-4952.log 
[ROSUNIT] Outputting test results to /home/travis/catkin_ws/build/opencv_apps/test_results/opencv_apps/rostest-test_test-face_detection__gui_false.xml 
[ERROR] [1476625985.751183984]: --Error loading /usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml 
[ERROR] [1476625985.751461345]: --Error loading /usr/share/opencv/haarcascades/haarcascade_eye_tree_eyeglasses.xml 
[ERROR] [1476625994.735697977]: --Error loading /usr/share/opencv/haarcascades/haarcascade_frontalface_alt.xml 
[ERROR] [1476625994.735977197]: --Error loading /usr/share/opencv/haarcascades/haarcascade_eye_tree_eyeglasses.xml 
testface_detection_test ... ok 
testface_image_test ... ok 

[ROSTEST WARNINGS]-------------------------------------------------------------- 

 * [/home/travis/catkin_ws/src/opencv_apps/launch/face_detection.launch] unknown <arg> attribute 'doc' 
 * [/home/travis/catkin_ws/src/opencv_apps/launch/face_detection.launch] unknown <arg> attribute 'doc' 
 * [/home/travis/catkin_ws/src/opencv_apps/launch/face_detection.launch] unknown <arg> attribute 'doc' 
 * [/home/travis/catkin_ws/src/opencv_apps/launch/face_detection.launch] unknown <arg> attribute 'doc' 
 * [/home/travis/catkin_ws/src/opencv_apps/launch/face_detection.launch] unknown <arg> attribute 'doc' 

[ROSTEST]----------------------------------------------------------------------- 

[opencv_apps.rosunit-face_detection_test/test_hz][passed] 
[opencv_apps.rosunit-face_image_test/test_publish][FAILURE]--------------------- 
Topic [face_detection/face_image] is not published 
  File "/usr/lib/python2.7/unittest/case.py", line 327, in run 
    testMethod() 
  File "/home/travis/catkin_ws/src/opencv_apps/test/publishtest", line 145, in test_publish 
    'Topic [%s] is not published' % (checker.topic_name)) 
  File "/usr/lib/python2.7/unittest/case.py", line 420, in assertTrue 
    raise self.failureException(msg) 
-------------------------------------------------------------------------------- 

SUMMARY 
 * RESULT: FAIL 
 * TESTS: 2 
 * ERRORS: 0 
 * FAILURES: 1 
furushchev commented 8 years ago

added hydro to allow_failures

k-okada commented 8 years ago

how about skip run_test code on hydro? with null TEST_PKGS? https://github.com/jsk-ros-pkg/jsk_travis/blob/master/travis.sh#L260

◉ Kei Okada

2016-10-18 22:48 GMT+09:00 Furushchev notifications@github.com:

added hydro to allow_failures

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ros-perception/opencv_apps/pull/47#issuecomment-254512943, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeG3JH3tJXpHOtPq5MPkkBt30NyZLeQks5q1M5DgaJpZM4KX-R3 .

furushchev commented 8 years ago

@k-okada Unfortunatelly, this repository does not use jsk_travis. Instead I added condition to skip testing on hydro https://github.com/ros-perception/opencv_apps/pull/47/commits/29f231e6ecaa87a3bfaa913df0839c7429e93e69#diff-b4553af39acae935d505c76e139d4aa3R81

furushchev commented 8 years ago

@k-okada Any other request for improvement?

k-okada commented 8 years ago

please look at https://github.com/ros-perception/opencv_apps/pull/49

furushchev commented 8 years ago

i was confused, face_detection node is not working hydro not because recent change, I think we can fix by changing file path

That's right! But switching path by roslaunch for hydro looks tricky...

do we have to use publishtest? is hztest is not work for this case?

Yes, because face image is published only when face is found and not periodic.

k-okada commented 8 years ago

2016-10-24 22:49 GMT+09:00 Furushchev notifications@github.com:

Yes, because face image is published only when face is found and not periodic.

i see, but test seems working, because it calculate the hz by averaging them????

◉ Kei Okada

furushchev commented 8 years ago

@k-okada maybe yes. It actually depends on how often people's face are appeared in input camera images.