Open cdondrup opened 10 years ago
Actually it doesn't seem to be that easy. @nbellotto could you please have a look why and where JPDA is missing?
Must be somewhere in this block:
if (alg == NN) { /// NN data association
amat.computeNN(CORRELATION_LOG);
// record unmatched observations for possible candidates creation
m_unmatched = amat.URow;
// data assignment
for (size_t n = 0; n < amat.NN.size(); n++) {
m_assignments.insert(std::make_pair(amat.NN[n].row, amat.NN[n].col));
}
}
else if (alg == NNJPDA) { /// NNJPDA data association (one sensor)
// compute associations
jpda->getAssociations();
jpda->getProbabilities();
vector< jpda::Association > association(znum.size());
jpda->getMultiNNJPDA(association);
// jpda->getMonoNNJPDA(association);
// data assignment
jpda::Association::iterator ai, aiEnd = association[0].end();
for (ai = association[0].begin(); ai != aiEnd; ai++) {
if (ai->t) { // not a clutter
m_assignments.insert(std::make_pair(ai->z, ai->t - 1));
}
else { // add clutter to unmatched list
m_unmatched.push_back(ai->z);
}
}
delete jpda;
}
else {
cerr << "###### Unknown association algorithm: " << alg << " #####\n";
return false;
}
seems JPDA is not really meant to be used: https://github.com/LCAS/bayestracking/blob/master/include/bayes_tracking/multitracker.h#L42
This is why I "fixed" it so you can't choose it in the config file any more when using the people tracker. Not sure why this is not supposed to be used, would have to ask @nbellotto
There are three different forms of data association:
A quick look at https://github.com/LCAS/bayestracking/blob/master/include/bayes_tracking/multitracker.h#L220 and https://github.com/LCAS/bayestracking/blob/master/include/bayes_tracking/multitracker.h#L263 suggests that actually JPDA is used if the user specifies that NNJPDA should be used. Since the JPDA case is not covered the tracker will out put
###### Unknown association algorithm: 1 #####
if JPDA is selected.If I am right a simple change of https://github.com/LCAS/bayestracking/blob/master/include/bayes_tracking/multitracker.h#L220 to
if (alg == JPDA)
should do the trick.