attaoveisi / occupancy_grid_mapping

This is a pseudo C++ package for doing mapping based on the occupancy grid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

occupancy_grid_mapping

This is a pseudo C++ package for doing mapping based on the occupancy grid

In robotics, mapping takes place after SLAM. In the SLAM, the robot pose and environment map is generated while in the mapping, the poses are taken filtered and assumed as known.

image

Posterior Probability

Going back to the graphical model of mapping with known poses, the goal is to implement a mapping algorithm and estimate the map given noisy measurements and assuming known poses.

The Mapping with Known Poses problem can be represented with P(m∣z1:t,x1:t) function. With this function, we can compute the posterior over the map given all the measurements up to time t and all the poses up to time t represented by the robot trajectory.

In estimating the map, we’ll exclude the controls u since the robot path is provided to us from SLAM. However, keep in mind that the robot controls will be included later in SLAM to estimate the robot’s trajectory.

image

First Approach:P(m∣z1:t,x1:t)

It is obvious that maps have high dimensionality. Consequently, it will be too pricey in terms of computational memory to compute the posterior under this first approach.

Second Approach:P(mi∣z1:t,x1:t)

A better approach to estimating the posterior map is to decompose this problem into many separate problems. In each of these problems, we will compute the posterior map mi at each instant. However, this approach still presents some drawbacks because we are computing the probability of each cell independently. Thus, we still need to find a different approach that addresses the dependencies between neighboring cells.

Third Approach:∏iP(mi∣z1:t,x1:t)

In the third approach we relate cells and overcome the need for huge computational memory in order to estimate the map with the product of marginals or factorization.

Inverse Measurement Model - P(x | z1:t): Estimating a posterior over the system state given the measurement.

The inverse measurement model is generally used when measurements are more complex than the system's state.

Because in the occupancy grid approach, the cells are either occupied or free (or unknown), we need a binary bias filter:

image

where the initial belief represents the initial state of the system before taking any sensor measurements into consideration.

Occupancy grid mapping algorithm

image

In this pseudo implementation, a robot is equipped with eight sonar rangefinder sensors circulating in an environment to map it. This robot is provided with its exact poses at each timestamp.

image

the advatage of using the odds log probablity is due its numerical stability around zero and one as it can be seen:

image

The inverse sensor model takes the following inputs

image

and delivers if the cell is occupied, free, or unknown. Then, based on the pose data:

image

Result

image

About

This is a pseudo C++ package for doing mapping based on the occupancy grid

License:BSD 2-Clause "Simplified" License


Languages

Language:C++ 99.5%Language:CMake 0.5%Language:C 0.0%Language:Ruby 0.0%