Gmapping - entropy [closed]
Hi everyone,
I am using Gmapping package to obtain entropy.
In the gmapping .cpp file, the code where it computes the entropy is:
double SlamGMapping::computePoseEntropy()
{
double weight_total=0.0;
for(std::vector<GMapping::GridSlamProcessor::Particle>::const_iterator it = gsp_->getParticles().begin();
it != gsp_->getParticles().end();
++it)
{
weight_total += it->weight;
}
double entropy = 0.0;
for(std::vector<GMapping::GridSlamProcessor::Particle>::const_iterator it = gsp_->getParticles().begin();
it != gsp_->getParticles().end();
++it)
{
if(it->weight/weight_total > 0.0)
entropy += it->weight/weight_total * log(it->weight/weight_total);
}
return -entropy;
}
This entropy is regarding the whole map? If yes, then how can I get the entropy values for just the current field-of-view of the laser at that time (entropy of the last scan)?
Hope you understand my question! If you could answer quickly I would appreciate since I need to solve this ASAP!
Thanks in advance!
Downvoting because you aren't following the community etiquitte guidelines. In particular, editing your post without new information just to push it to the top of the list and requesting a response ASAP.
This is an all volunteer community, and the users here are donating their time. If someone knows the answer to your question, they will answer when they have time.
Sorry, could just have given me the warning and I would have stopped! And I didn't "request", I'm not a rude cold person! I just said I would appreciate if someone who knew the answer, and took a bit of their time to answer me! Just that! No need for the downvoting or get defensive! Sorry 4 the spam
A downvote _is_ a warning. Don't take it too harshly.