question about ScanMatcher::score
in this function ,to caculate pfree,there are
double freeDelta=map.getDelta()*m_freeCellRatio;and
pfree.x+=(*r-map.getDelta()*freeDelta)*cos(lp.theta+*angle); pfree.y+=(*r-map.getDelta()*freeDelta)*sin(lp.theta+*angle);;
obviously r - delta^2sqrt(2) (freeDelta = sqrt(2))
i think r - deltasqart(2) can show the range of pfree ,but the equation above i don't know its mean.
me too! I need the explanation.
I have the same question ,have you sloved it?
me too! I think there's a bug!
I think this is a bug that was shadowed by another bug, https://github.com/ros-perception/openslam_gmapping/issues/25
making everything about pfree, ipfree, pf and fcell irrelevant.
And yes,
pfree.x+=(*r-map.getDelta()*freeDelta)*cos(lp.theta+*angle);
pfree.y+=(*r-map.getDelta()*freeDelta)*sin(lp.theta+*angle);
should be replaced with
pfree.x+=(*r-*freeDelta)*cos(lp.theta+*angle);
pfree.y+=(*r-*freeDelta)*sin(lp.theta+*angle);
With these two bugs solved, gmapping stops looking for best score inside a wall.
Oh, there is a PR to fix that: https://github.com/ros-perception/openslam_gmapping/pull/10