changes in kld walker
This commit is contained in:
@@ -74,10 +74,11 @@ namespace SMC {
|
|||||||
// with the resampled particle-set
|
// with the resampled particle-set
|
||||||
for (uint32_t i = 0; i < cnt; ++i) {
|
for (uint32_t i = 0; i < cnt; ++i) {
|
||||||
|
|
||||||
// slight chance to get a truely particle in range X m
|
// slight chance to get a truely random particle in range X m
|
||||||
if (distNewOne(gen) < 0.001) {
|
if (distNewOne(gen) < 0.001) {
|
||||||
const NM::NavMeshSub<Tria> reachable(particlesCopy[i].state.pos, 10.0);
|
const double radius = 50.0;
|
||||||
particles[i].state.pos = reachable.getRandom().drawWithin(particlesCopy[i].state.pos.pos, 10.0);
|
const NM::NavMeshSub<Tria> reachable(particlesCopy[i].state.pos, radius);
|
||||||
|
particles[i].state.pos = reachable.getRandom().drawWithin(particlesCopy[i].state.pos.pos, radius);
|
||||||
particles[i].weight = equalWeight;
|
particles[i].weight = equalWeight;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -210,6 +210,15 @@ namespace SMC {
|
|||||||
BoxGaus<float> boxGaus;
|
BoxGaus<float> boxGaus;
|
||||||
boxGaus.approxGaus(grid.image(), sigmaX, sigmaY, nFilt);
|
boxGaus.approxGaus(grid.image(), sigmaX, sigmaY, nFilt);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Das hier wird nicht funktionieren!
|
||||||
|
* Wir machen eine Transition von t zu t+1 und nehmen dann diese position um von der kde aus t+1 ein
|
||||||
|
* Gewicht zu erhalten... aber das bringt ja nichts, diese Gewicht haben wir doch schon auf den partikeln in t+1
|
||||||
|
* die transition macht ja nicht 2x was anderes, sondern wieder genau das gleiche.
|
||||||
|
* was das smoothing gut macht, sind die Faltungen mit allen Partikeln (jeder mit jedem vergleichen).
|
||||||
|
**/
|
||||||
|
|
||||||
|
|
||||||
// Apply Position from Samples from q_t+1* into KDE of p(q_t+1 | o_1:T) to get p(q_t+1* | o_1:T)
|
// Apply Position from Samples from q_t+1* into KDE of p(q_t+1 | o_1:T) to get p(q_t+1* | o_1:T)
|
||||||
// Calculate new weight w(q_(t|T)) = w(q_t) * p(q_t+1* | o_1:T) * p(q_t+1* | q_t) * normalisation
|
// Calculate new weight w(q_(t|T)) = w(q_t) * p(q_t+1* | o_1:T) * p(q_t+1* | q_t) * normalisation
|
||||||
smoothedParticles = forwardHistory.getParticleSet(i);
|
smoothedParticles = forwardHistory.getParticleSet(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user