Hello, after installing pi_face_tracker and running it I don't have any image showed on the screen. I run it on groovy using
roslaunch pi_face_tracker face_tracker_uvc_cam.launch
EDIT: After adding waitkey to the ros2opencv.py node the window is now shown. but the face tracker keeps waiting for published images to "input_rgb_image". I checked with rostopic echo /input_rgb_image and there was indeed images published to this topic from my webcam. Why is my programm idle not doing anything?
I'm using a recent logitech C525 webcam.
here is the face_tracker_uvc_cam.launch
<launch>
<arg name="auto_face_tracking" default="True" />
<node pkg="pi_face_tracker" name="pi_face_tracker" type="face_tracker.py" output="screen">
<remap from="input_rgb_image" to="/camera/image_raw" />
<remap from="output_image" to="/pi_face_tracker/image" />
<param name="auto_face_tracking" value="$(arg auto_face_tracking)" />
<rosparam>
use_haar_only: False
use_depth_for_detection: False
use_depth_for_tracking: False
auto_min_features: True
min_features: 50
abs_min_features: 6
good_feature_distance: 5
add_feature_distance: 10
std_err_xy: 3.0
max_mse: 10000
show_text: True
show_features: True
fov_width: 1.094
fov_height: 1.094
max_face_size: 0.28
expand_roi: 1.02
flip_image: False
feature_type: 0 <!-- 0 = Good Features To Track, 1 = SURF -->
surf_hessian_quality: 100
</rosparam>
<param name="cascade_frontal_alt" value="$(find pi_face_tracker)/params/haarcascade_frontalface_alt.xml" />
<param name="cascade_frontal_alt2" value="$(find pi_face_tracker)/params/haarcascade_frontalface_alt2.xml" />
<param name="cascade_profile" value="$(find pi_face_tracker)/params/haarcascade_profileface.xml" />
</node>
</launch>
And Rqt_graph shows also that the subscription between both nodes is working well
Originally posted by Mehdi. on ROS Answers with karma: 3339 on 2014-06-04
Post score: 0
Original comments
Comment by Pi Robot on 2014-06-05:
Are you running the 'roslaunch ros2opencv uvc_cam.launch' command first to connect to your webcam?
Comment by Mehdi. on 2014-06-05:
yes this node is publishing images to /camera/image_raw and I can view them using rosrun image_view image_view image:=/camera/image_raw . So I am really wondering why pi_face_tracker gets stuck at rospy.wait_for_message in init
Comment by Pi Robot on 2014-06-05:
That is very odd because the face_tracker_uvc_cam.launch file remaps the /input_rgb_image topic to the /camera/image_raw topic which works fine on my machine. Can you post your version of the face_tracker_uvc_cam.launch file along with your original question?
Comment by Mehdi. on 2014-06-05:
I just posted it. If i understood well the remapping is only in pi_face_tracker.py and only tells ros2opencv.py that input_rgb_image means /camera/image_raw and if I do rostopic list there is no "real" input_rgb_image. My problem is not the remapping but the code being stuck not seeing the messages
Comment by Pi Robot on 2014-06-08:
I just tried checking out the pi_vision stack from scratch and it works with two different cameras on my Ubuntu 12.04 machine running ROS Groovy. If you haven't already done so, can you try checking out pi_vision from scratch and starting again? I'm wondering if your modifications to ros2opencv.py are causing it to hang.
Comment by Mehdi. on 2014-06-08:
I deleted pi_vision and uvc_cam and recloned pi_vision. I installed a more recent uvc_cam driver using apt-get install ros-groovy-camera_umd and changed the dependencies in manifest.xml from uvc_cam to uvc_camera. rosmake pi_vision works. then:
$ roslaunch pi_face_tracker camera_node.launch
$ roslaunch pi_face_tracker face_tracker_uvc_cam.launch
Still Idle, last log info is "Starting pi_face_tracker", I can see the camera images using image_view. Using OpenCV 2.4.6.
Comment by Mehdi. on 2014-06-08:
Using dmesg l on another terminal I saw the error messages. Everytime I run $ roslaunch pi_face_tracker camera_node.launch, I get the error : uvcvideo: Failed to query (SET_CUR) UVC control 10 on unit 2: -32 (exp. 2). but the program doesn't crash. And when I run the face tracker I get: python[20138]: segfault at 10 ip 00007fa14649d321 sp 00007fa1019c2d80 error 4 in libopencv_highgui.so.2.4.8[7fa146456000+8d000]
But the program doesn't crash either, weird.