Software > Software

Occupancy Grid - beginner

<< < (2/5) > >>

activex:
jwatte

At this point, I have a fixed 2D array to represent the grid. I have pose estimation using wheel encoder and MEM with EKF so the pose estimation I got now is reasonable. Also, I have successfully map the laser data from the real world coordinate over to the 2D Array map. This means, I have the robot position and heading, and able to map the laser measurements into the 2D Array map at the moment.

The problem I am having right now is the calculation of probability of occupant part :( I though I have a good understanding of how Bayes theorem works but when it comes to this problem, I am not sure if the theorem can apply straight forwardly.

So, for a Bayes theorem, I know that

P(H|D) = P(H)*P(D|H)/P(D)

where H is hypothesis and D is the data.

So, I am not sure what is my P(H) and my P(D) and my P(D|H).

Initially, all cells will have an occupancy probability of 0.5.

Help!!

jwatte:
Each time you take a reading, you update the value for all the tiles that the measurement spans.
The data for tiles between the robot and the detected blocker is "0" and the data for the tile that the block is detected into is "1."
So, run measurement, update tiles, repeat forever.

activex:
No, this is not how I want it to be. I want this grid to be dynamic. That is, I have to update the map every time a new sensor data is retrieved (only update the cells that within range of the sensors.)

Do you know what I mean?

jwatte:
That's exactly what I described.

activex:
Clearly what you mention doesn't make sense. If every time you you update the map cell to hold 1 whenever the laser measurement return object, even if its a dynamic objects, that cell will always holds 1 and would never return (or converge) to 0 since you are not updating (or looping) the same cells.