abhineet123 / ORB_SLAM2

Modified version of ORB SLAM for an autonomous navigation project
Other
305 stars 111 forks source link

About generate grid map algorithm #3

Open stevenyslins opened 7 years ago

stevenyslins commented 7 years ago

Dear all,

Thanks to share this code which I can run it to generate 2D grid map. I have some question about ros_mono_sub.cc, Does there have reference that I can refer to grid map algorithm? Because some of code I cannot understand what it is doing, such as

void updateGridMap
{
    ....
    kf_pos_x = kf_location.x*scale_factor;
    kf_pos_z = kf_location.z*scale_factor;

    kf_pos_grid_x = int(floor((kf_pos_x - grid_min_x) * norm_factor_x));
    kf_pos_grid_z = int(floor((kf_pos_z - grid_min_z) * norm_factor_z));

    if (kf_pos_grid_x < 0 || kf_pos_grid_x >= w)
        return;

    if (kf_pos_grid_z < 0 || kf_pos_grid_z >= h)
        return;
}

Thanks for your help.

abhineet123 commented 7 years ago

The related report is attached here. 2d-grid-mapping.pdf