|
From: Namal S. <nam...@gm...> - 2010-09-17 05:23:25
|
Hi all,
I have been working with the robot2d + laser2d + ognode +
laser2ogcombination for sometime and I noticed that when the laser
return is equal
to
the maximum range, an occupancy value is not generated. So when a robot
moves to an area where obstacles are outside the range of the laser
sensor, the cell values remain unchanged instead of being changed to
"unoccupied".
I looked through the code of laser2og and found that in laser2og.cpp,
Laser2Og::process function, any scan return which is greater than or equal
to the
maxLaserRange_ is ignored as follows
// for each return
for ( int i=0; i<(int)scan.ranges.size(); i++ )
{
// Ignore non-returns
if ( scan.ranges[i] >= maxLaserRange_-1e-3 ) continue;
The if condition effectively ignores any return which signals free space,
thus resulting in an Ogmap with less information
I don't know whether there was another reason for this condition to be in
the code, but commenting the if condition solved this problem for me.
thanks
BR,
Namal
|