face_detector not detecting faces
I have successfully built face_detector package with catkin_make and fixed the launch file's depth and rgb topic based on Face Detector Example Usage.
Besides this, I made a face_detection_behavior
node which subscribes to topic /face_detector/people_tracker_measurements_array
and /face_detector/faces_cloud
.
rostopic info /face_detector/people_tracker_measurements_array
Type: people_msgs/PositionMeasurementArray
Publishers:
* /face_detector (http://192.168.31.164:43851/)
Subscribers:
* /face_detection_behavior (http://192.168.31.164:45399/)
rostopic info /face_detector/faces_cloud
Type: sensor_msgs/PointCloud
Publishers:
* /face_detector (http://192.168.31.164:43851/)
Subscribers:
* /face_detection_behavior (http://192.168.31.164:45399/)
However, no faces can be detected.
rostopic echo /face_detector/faces_cloud
rostopic echo /face_detector/people_tracker_measurements_ar
The above returns no messages.
This is my face_detector launch file:
<launch>
1
2 <arg name="camera" default="camera" />
3 <arg name="depth_ns" default="depth_registered" />
4 <arg name="rgb_ns" default="rgb" />
5 <arg name="image_topic" default="image_rect_color" />
6 <arg name="depth_topic" default="image_rect_raw" />
7 <arg name="fixed_frame" default="/camera_rgb_optical_frame" />
8
9 <!--include file="$(find openni_launch)/launch/openni.launch"/-->
10 <node name="$(anon dynparam)" pkg="dynamic_reconfigure" type="dynparam" args="set_from_p
arameters $(arg camera)/driver">
11 <param name="depth_registration" type="bool" value="true" />
12 </node>
13
14 <node pkg="face_detector" type="face_detector" name="face_detector" output="screen">
15 <remap from="camera" to="$(arg camera)" />
16 <remap from="image_topic" to="$(arg image_topic)" />
17 <remap from="depth_topic" to="/hw_registered/$(arg depth_topic)" />
18 <remap from="depth_ns" to="$(arg depth_ns)" />
19 <remap from="rgb_ns" to="$(arg rgb_ns)" />
20 <param name="fixed_frame" type="string" value="$(arg fixed_frame)" />
21 <param name="classifier_name" type="string" value="frontalface" />
22 <rosparam command="load" file="$(find face_detector)/param/classifier.yaml"/>
23 <param name="classifier_reliability" type="double" value="0.9"/>
24 <param name="do_continuous" type="bool" value="true" />
25 <param name="do_publish_faces_of_unknown_size" type="bool" value="true" />
26 <param name="do_display" type="bool" value="true" />
27 <param name="use_rgbd" type="bool" value="true" />
28 <param name="approximate_sync" type="bool" value="true" />
29
30 </node>
31
32 </launch>
Here is what I have checked: face detector node:
rosnode info /face_detector
--------------------------------------------------------------------------------
Node [/face_detector]
Publications:
* /face_detector/faces_cloud [sensor_msgs/PointCloud]
* /face_detector/feedback [face_detector/FaceDetectorActionFeedback]
* /face_detector/people_tracker_measurements_array [people_msgs/PositionMeasurementArray]
* /face_detector/result [face_detector/FaceDetectorActionResult]
* /face_detector/status [actionlib_msgs/GoalStatusArray]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /camera/depth_registered/camera_info [sensor_msgs/CameraInfo]
* /camera/depth_registered/hw_registered/image_rect_raw [sensor_msgs/Image]
* /camera/rgb/camera_info [sensor_msgs/CameraInfo]
* /camera/rgb/image_rect_color [sensor_msgs/Image]
* /face_detector/cancel [unknown type]
* /face_detector/goal [unknown type]
* /tf [tf2_msgs/TFMessage]
* /tf_static [unknown type]
Services:
* /face_detector/get_loggers
* /face_detector/set_logger_level
camera depth image_rect_raw node:
rostopic info /camera/depth_registered/hw_registered/image_rect_raw
Type: sensor_msgs/Image
Publishers:
* /camera/camera_nodelet_manager (http://192.168.31.135:38017/)
Subscribers:
* /face_detector (http://192.168.31.164:43851/)
camera rgb image_rect_color node:
rostopic info /camera/rgb/image_rect_color
Type: sensor_msgs/Image
Publishers:
* /camera/camera_nodelet_manager (http://192.168.31.135:38017/)
Subscribers:
* /face_detector (http://192.168.31.164:43851/)
The cascade file I'm using is from Haar cascades, Frontal Face. What could be the problem here?
Edit: Using Kinect and openni_launch package.
Edit2: I could not found the cause of the problem. But I have manually applied haar's cascade using the rgb and depth topic published from ...