strands-project / strands_perception_people

long-term detection, tracking and recognition of people
96 stars 70 forks source link

Upper Body Detector Detects Once then Stops #219

Closed yumdiddlyscrumptious closed 6 years ago

yumdiddlyscrumptious commented 6 years ago

Hello,

I hope this is the right place to ask this question, if not, oops!

I am currently working on getting the upper_body_detector to work in tandem with the leg_detector. For the upper body detector I am using a ZED camera.

I have been able to get up to two detections at a time, in the sense that I have gotten two images to be published on the /upper_body_detector/image topic. Although, for some reason it stops there.

So far in my approach I have:

1) Changed topics subscribed to by upper_body_detector to topics published by the ZED including a) /zed/depth/depth_registered b) /zed/rgb/image_rect_color c) /zed/depth/camera_info 2) Modified the upper_body_detector.yaml a) Changing dImWidth and dImHeight to 1280 and 720, which are the parameters for the zed camera 3) Used "ground_plane_really_fixed.launch" a) in the really_fixed_gp.yaml file I switched the distance to .5 from 1.67 (my robot is shorter) b) checked that upper_body_detector subscribes to the ground_plane topic, it does. 4) In the main.cpp file in upper_body_detector/src a) changed the AgePenalty of the MySyncPolicy to 5000 from 1000 (I did this because I am running the upper_body detector on a separate computer than the ground_plane node is running on, so I wanted to account for any time discrepancies.)

When I have been able to get a detection, they appear to be mostly false positive results. The image being published on the /upper_body_detection/image that is produced (viewed in rviz) usually does not contain an upper body. The image never has contained a bounding box in the image.

I frequently get an error stemming from the UBD/src/detections.cpp file that says:

"[INFO]: upper_body_detector: compute freespace -pos_x: -1/121, pos_z: 70/141 - out of range!"

The numbers do vary when I get this error, and when I do get the error it comes up many times rapidly.

When there is information being published on the /upper_body_detector/detections topic it appears to be "empty". The pos_x, pose_y, width, height, dist and median_depth are all represented with empty brackets: [ ] . The frame_id is set at zed_left_camera_optical_frame.

Again, only one or maybe two detections are able to happen, then there are no more detections published. Most of these "detections" have been false positives, based on the images produced on the UBD/image topic.

Has anyone had a similar issue? Is there something I am forgetting to do? Did I do something stupid? Please let me know.

Thanks in advance.

yumdiddlyscrumptious commented 6 years ago

Something else that I forgot to add is that the UBD/roi topic does not seem to be publishing when the UBD/image topic publishes.

lucasb-eyer commented 6 years ago

Hi, sorry I will not be of much help as I haven't really dealt with the code for a few years.

First, it is not clear what you mean by "it stops there" do you mean no detections anymore, or the node crashes?

I have the following suggestions:

Does the node's main callback get called regularly? (add a printf to see.)

If not, check the incoming messages, either one that it depends on is not getting sent/delivered, or the timestamps are out-of-sync. Especially since you mention it's running on a different machine, we had such problems when their clocks were not exactly in sync (for example, we use chrony to sync).

If it does get called but simply doesn't produce detections, it will be more difficult as it probably means there's something more you need to do to adapt to a new camera. I unfortunately don't know about the warning you get, but I can tell you that indeed the "freespace" is used for quickly filtering possible ROIs, so if something's wrong there, that may be.

About your last comment, you can see here that that's simply because the code is commented-out. You may actually try to add that code back in and have a look, it might help you debug further!

Other useful references could be #183, #176.

yumdiddlyscrumptious commented 6 years ago

Hey @lucasb-eyer,

Thanks so much for getting back to me, you're the man!

To clarify by stopping, I just meant that it would stop picking up detections. The node itself was never crashing.

You were correct on the timestamps being out of sync. I was able to get everything to launch on the same computer and it works much better now.

Although it works, I am still getting the same [INFO] message as I mentioned above.

I saw that in some of the other threads that you referred me to people were down or up-sampling their depth images to fit the 480x640 depth image that was originally being used with the code. I think that this error may be coming up because instead of taking that approach, I just changed the parameters in the upper_body_detection.yaml file.

It seems to work though, even with the [INFO] message being published, so I will probably just keep it that way.

Thanks again so much for the help!

lucasb-eyer commented 6 years ago

Awesome! We probably should put that as a FAQ into the readme, as this mistake also happened to us quite frequently :smile:

lucasb-eyer commented 6 years ago

Added a note to the UBD's README.