strands-project / strands_perception_people

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

work towards associating UBD and tracker output #148

Closed vonovak closed 9 years ago

vonovak commented 9 years ago

The changes enable to find out which UBD detections were used for a particular tracker hypothesis by providing sequence numbers of the UBD messages and an index into the arrays within those UBD messages. So using the sequence nr. and the index (provided by the people_array message of MDL tracker), one can link back to the data inside the UBD messages.

The most obvious changes are in MdlPeopleTracker.msg and a corresponding change is in Hypo.h. The important stuff then happens in Tracker.cpp within the extend_trajectories and make_new_hypos methods where the sequence numbers and indices are taken from the detections and pushed into the Hypos. For the rest of the changes is relatively simple to see what they do. Notice little change to Hypo's copy constructor. @cdondrup

cdondrup commented 9 years ago

Thank you very much! I'll check it out once I have time and make the necessary changes to the bayes people tracker.

cdondrup commented 9 years ago

I just tested it on the robot. There is one thing that I don't like too much. The seq and index arrays accumulate all the UBD sequences that were received. Since the tracker is hard wired to the UBD, why list all the previous detections in every message? That creates a lot of overhead and very large messages being transmitted. Also, sometimes the array is reset and all the data is deleted.

cdondrup commented 9 years ago

After talking to @lucasb-eyer that seems to make more sense to me now. We'll try it again next week.

cdondrup commented 9 years ago

Can't reproduce this. But after talking to @lucasb-eyer the observed behaviour makes more sense. Will merge.

lucasb-eyer commented 9 years ago

:+1:

lucasb-eyer commented 9 years ago

TL;DR: Don't rely on this yet!

Note: this doesn't work correctly as-is.

  1. In one test-sequence (_2015-02-12-12-33-26.bag), we found out that the index is wrong: when there were two persons their index was consistently switched.
  2. In another test-sequence with more tracked people (_2015-02-12-14-32-38.bag), we can see many problems, or maybe many symptoms of the same underlying problem? Not sure:
header: 
  seq: 8610
  stamp: 
    secs: 1423747985
    nsecs: 189277368
  frame_id: /head_xtion_rgb_optical_frame
people: 
  - 
    header: 
      seq: 1872
      stamp: 
        secs: 1423747985
        nsecs: 189277368
      frame_id: /head_xtion_rgb_optical_frame
    traj_x: [1.827958355758122, 1.8276415936718615, 1.8102466960614305, 1.8120683642025397, 1.8173191020522192, 1.812823995962221, 1.8151577959363374, 1.8123675985967154, 1.8146588240698671, 1.8078133903968683, 1.8044909881303584, 1.8094359117229835]
    traj_y: [-0.26280656644302747, -0.2505704297024338, -0.28287174435402496, -0.28287174435402496, -0.2603391993488533, -0.272917566699174, -0.2655294828053336, -0.2722517442245084, -0.2565796626472733, -0.26430969014777506, -0.25261523702624333, -0.2666938744138535]
    traj_z: [2.244250379777771, 2.130496600322052, 2.0808232254416574, 2.0123667665422924, 1.9395301765285018, 1.8630927574912504, 1.8127391354385545, 1.7434052430007663, 1.6772751345438415, 1.609072337468513, 1.533772774271448, 1.494029030559304]
    traj_x_camera: [-0.6478176092676075, -0.6583965620998332, -0.621710225612957, -0.6225855035214465, -0.6448695371816795, -0.6316784326301594, -0.6392791657754182, -0.6320430716565173, -0.646888454617837, -0.6368200785795363, -0.6454798176414104, -0.6355087289751795]
    traj_y_camera: [1.729402031591935, 1.7232449919195485, 1.7235097678062343, 1.725107379586124, 1.7188858302448633, 1.720987273718007, 1.7194841896896917, 1.720267095612628, 1.7147463656007462, 1.712457022620476, 1.7039242909352263, 1.715025538200236]
    traj_z_camera: [2.244250379777771, 2.130496600322052, 2.0808232254416574, 2.0123667665422924, 1.9395301765285018, 1.8630927574912504, 1.8127391354385545, 1.7434052430007663, 1.6772751345438415, 1.609072337468513, 1.533772774271448, 1.494029030559304]
    dir: [-0.0013817170293111223, 0.0, -0.9999990050656361]
    speed: 0.0651994198561
    id: 155
    uuid: c28b3949-cb65-5086-8814-1ebf6436bd2f
    score: 3.49942988648
    seq: [1872]
    index: [0]
  - 
    header: 
      seq: 1872
      stamp: 
        secs: 1423747985
        nsecs: 189277368
      frame_id: /head_xtion_rgb_optical_frame
    traj_x: [1.5881015638388942, 1.6068592368962704, 1.6238128613188934, 1.6334043658968322, 1.6521876236289084, 1.6614951290637108, 1.652090246206816]
    traj_y: [-0.6694494194635896, -0.6323162129437124, -0.6250201337912555, -0.6300055850808319, -0.5856523123301351, -0.5767604686688829, -0.6280299496364008]
    traj_z: [3.3072780721153068, 3.320385035394576, 3.344544158264113, 3.329450174213385, 3.322976833579743, 3.33427574883331, 3.3172494285744736]
    traj_x_camera: [-0.17594309822835308, -0.21752181572017104, -0.23206641598462519, -0.23230269192766884, -0.2802257354257949, -0.29249600988685753, -0.2430135542710813]
    traj_y_camera: [1.7144308468041185, 1.7130395967507996, 1.724402376129522, 1.7352095893830903, 1.7303716686929562, 1.7342620293144442, 1.7506479405330286]
    traj_z_camera: [3.3072780721153068, 3.320385035394576, 3.344544158264113, 3.329450174213385, 3.322976833579743, 3.33427574883331, 3.3172494285744736]
    dir: [0.9880752252799876, 0.0, 0.15397176367984447]
    speed: 0.0107934903353
    id: 139
    uuid: 06381912-f4ea-54a4-950a-8c0dd4180a1a
    score: 2.21317129061
    seq: [1851, 1852, 1853, 1854, 1855, 1856, 0, 1860, 1862, 1863, 1864, 1865, 1866, 1867, 1868, 1869, 1870, 1871, 1872]
    index: [1, 1, 1, 1, 1, 1, -1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
  - 
    header: 
      seq: 1872
      stamp: 
        secs: 1423747985
        nsecs: 189277368
      frame_id: /head_xtion_rgb_optical_frame
    traj_x: [1.3493204120145412, 1.3446914138140658, 1.3526791358151897, 1.3604675342340344, 1.351529131207627, 1.3416595844892267, 1.3512156937461581]
    traj_y: [-1.1488574585409603, -1.1593860552903283, -1.1582208131511174, -1.1584117409099997, -1.1623775890923995, -1.1722801187671494, -1.161027826360344]
    traj_z: [4.384279317496534, 4.333277778452628, 4.3089343289121, 4.287088410000399, 4.275235459570206, 4.273737222858846, 4.2738551324474825]
    traj_x_camera: [0.35923000809043537, 0.37068778658740364, 0.36582791064458964, 0.3622531735698846, 0.3700259792528261, 0.3834526807011024, 0.3689928317148089]
    traj_y_camera: [1.7353653320300113, 1.736364474544982, 1.742809868080732, 1.7497320684669173, 1.743798562565381, 1.739900904986162, 1.742875140321883]
    traj_z_camera: [4.384279317496534, 4.333277778452628, 4.3089343289121, 4.287088410000399, 4.275235459570206, 4.273737222858846, 4.2738551324474825]
    dir: [0.017161119564436042, 0.0, -0.9998527452778858]
    speed: 0.0184067413211
    id: 153
    uuid: 5ac225f4-ebe8-50e2-91a2-7d9d832b79c1
    score: 2.20752408342
    seq: [1868, 1869, 1870, 1871, 1872]
    index: [2, 1, 1, 1, 1]