OpenPTrack / open_ptrack

Original open source people tracking library (now deprecated with the release of OPT v2 "Gnocchi").
http://openptrack.org/
BSD 3-Clause "New" or "Revised" License
319 stars 109 forks source link

tracking with openni2 not working #132

Closed brtwist closed 7 years ago

brtwist commented 7 years ago

Hi, I ran single camera tracking and detection with a Kinect1 no problem but I need to modify it to support a few more types of camera.

e.g. to run an Xtion the only modification needed is to instead launch the openni2 driver. however we're no longer picking up any tracking or detection results. Camera pose calibration etc. all works fine but not tracking.

Any idea where the problem might be? (There is no error or warnings in the output when launching the node either for single camera or multi-camera)

thanks in advance

brtwist commented 7 years ago

it seems that openni2 / Xtions do not publish anything to the depth/disparity topic (even when depth_registered_processing is set to true)

still no idea on a solution though...

marketto89 commented 7 years ago

Hi @brtwist

the very important thing for OpenPTrack is that you should receive the point cloud information from your camera.

If not, do you see any error when you are launching openni2? Unfortunately, I cannot replicate the error since I do not have a Xtion here.

brtwist commented 7 years ago

Thanks for your response.

Openptrack in general gets the point cloud data for camera pose calibration etc. only the detector and the disparity topic seems to be the problem: the detector is only subscribed to two topics, one for camera info and one for registered depth disparity (which is empty from the xtion).

Our guess: A Kinect1 publishes to the depth disparity topic, but a Kinect2 or a Swissranger would not do so (?) so there must be a workaround for detecting even from cameras without disparity info...

marketto89 commented 7 years ago

@brtwist

Of course, having an empty depth topic is wrong given that is essential for building the point cloud. To reply to your last sentence: also the Kinect v2 and the Swissranger publish a depth topic. Taking the Kinect v2 as an example, you can see from kinect2_bridge (openni2 for the Kinect v2) here how the point cloud is built. As you can see, an input required is the depth image (in our case /$(arg sensor_name)/depth_lowres/image).

If you are not able to see anything in the depth topic (I assume you are checking with rostopic hz /topic_name or rostopic echo /topic_name ?) I suggest you to check openni2 output and/or try the camera on another computer to see if the issue is still the same. Lastly, remember that the Xtion is not officially supported by OpenPTrack, so you could have other issues (even if I am expecting it will work given that is not too different from a Kinect v1).

Let us know if you fix the issue!

jburkeucla commented 7 years ago

Can we close this issue?

ggalan87 commented 6 years ago

The disparity is actually exposed by the driver but it is initially disabled as you can see in the corresponding launch file: https://github.com/ros-drivers/openni2_camera/blob/indigo-devel/openni2_launch/launch/openni2.launch

It's pretty straightforward if you enable the options about disparity processing and hardware registration. I successfully run a single XTION detector node, although I need to do more tests to conclude that it is compatible with openptrack.