ROS Answers: Open Source Q&A Forum - RSS feedhttps://answers.ros.org/questions/Open source question and answer forum written in Python and DjangoenROS Answers is licensed under Creative Commons Attribution 3.0Wed, 27 Aug 2014 00:58:17 -0500Gmapping - entropyhttps://answers.ros.org/question/191140/gmapping-entropy/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!Sun, 24 Aug 2014 23:48:26 -0500https://answers.ros.org/question/191140/gmapping-entropy/Comment by anamcarvalho for <p>Hi everyone,</p>
<p>I am using Gmapping package to obtain entropy.</p>
<p>In the gmapping .cpp file, the code where it computes the entropy is:</p>
<pre><code>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;
}
</code></pre>
<p>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)?</p>
<p>Hope you understand my question! If you could answer quickly I would appreciate since I need to solve this ASAP!</p>
<p>Thanks in advance!</p>
https://answers.ros.org/question/191140/gmapping-entropy/?comment=191338#post-id-191338Sorry, 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 spamTue, 26 Aug 2014 20:46:43 -0500https://answers.ros.org/question/191140/gmapping-entropy/?comment=191338#post-id-191338Comment by ahendrix for <p>Hi everyone,</p>
<p>I am using Gmapping package to obtain entropy.</p>
<p>In the gmapping .cpp file, the code where it computes the entropy is:</p>
<pre><code>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;
}
</code></pre>
<p>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)?</p>
<p>Hope you understand my question! If you could answer quickly I would appreciate since I need to solve this ASAP!</p>
<p>Thanks in advance!</p>
https://answers.ros.org/question/191140/gmapping-entropy/?comment=191330#post-id-191330Downvoting because you aren't following the community [etiquitte guidelines](http://wiki.ros.org/Support#Guidelines_for_asking_a_question_.28Please_read_before_posting.29). In particular, editing your post without new information just to push it to the top of the list and requesting a response ASAP.Tue, 26 Aug 2014 19:08:01 -0500https://answers.ros.org/question/191140/gmapping-entropy/?comment=191330#post-id-191330Comment by ahendrix for <p>Hi everyone,</p>
<p>I am using Gmapping package to obtain entropy.</p>
<p>In the gmapping .cpp file, the code where it computes the entropy is:</p>
<pre><code>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;
}
</code></pre>
<p>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)?</p>
<p>Hope you understand my question! If you could answer quickly I would appreciate since I need to solve this ASAP!</p>
<p>Thanks in advance!</p>
https://answers.ros.org/question/191140/gmapping-entropy/?comment=191332#post-id-191332This 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.Tue, 26 Aug 2014 19:09:34 -0500https://answers.ros.org/question/191140/gmapping-entropy/?comment=191332#post-id-191332Comment by ahendrix for <p>Hi everyone,</p>
<p>I am using Gmapping package to obtain entropy.</p>
<p>In the gmapping .cpp file, the code where it computes the entropy is:</p>
<pre><code>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;
}
</code></pre>
<p>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)?</p>
<p>Hope you understand my question! If you could answer quickly I would appreciate since I need to solve this ASAP!</p>
<p>Thanks in advance!</p>
https://answers.ros.org/question/191140/gmapping-entropy/?comment=191348#post-id-191348A downvote _is_ a warning. Don't take it too harshly.Wed, 27 Aug 2014 00:58:17 -0500https://answers.ros.org/question/191140/gmapping-entropy/?comment=191348#post-id-191348