ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

pi_face_tracker Idle waiting for image input

asked 2014-06-04 00:29:45 -0500

Mehdi. gravatar image

updated 2014-06-05 23:23:35 -0500

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 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

  <arg name="auto_face_tracking" default="True" />

  <node pkg="pi_face_tracker" name="pi_face_tracker" type="" 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)" />

      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

    <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" />

And Rqt_graph shows also that the subscription between both nodes is working well image description

edit retag flag offensive close merge delete


Are you running the 'roslaunch ros2opencv uvc_cam.launch' command first to connect to your webcam?

Pi Robot gravatar image Pi Robot  ( 2014-06-05 13:42:41 -0500 )edit

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__

Mehdi. gravatar image Mehdi.  ( 2014-06-05 20:48:12 -0500 )edit

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?

Pi Robot gravatar image Pi Robot  ( 2014-06-05 22:52:53 -0500 )edit

I just posted it. If i understood well the remapping is only in and only tells 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

Mehdi. gravatar image Mehdi.  ( 2014-06-05 23:26:30 -0500 )edit

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 are causing it to hang.

Pi Robot gravatar image Pi Robot  ( 2014-06-08 08:59:38 -0500 )edit

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.

Mehdi. gravatar image Mehdi.  ( 2014-06-08 21:24:44 -0500 )edit

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[7fa146456000+8d000] But the program doesn't crash either, weird.

Mehdi. gravatar image Mehdi.  ( 2014-06-08 21:42:04 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-08-08 00:06:45 -0500

Mehdi. gravatar image

updated 2014-09-25 21:12:24 -0500

I think this was an error coming from my OpenCV libraries. Now that I recompiled the latest version it seems like it disappeared.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-06-04 00:29:45 -0500

Seen: 384 times

Last updated: Sep 25 '14