1 #ifndef SLAM_CTOR_UTILS_CONSOLE_VIEW_H_INCLUDED 2 #define SLAM_CTOR_UTILS_CONSOLE_VIEW_H_INCLUDED 5 double d_x_left,
double d_x_right,
6 double d_y_up,
double d_y_down) {
12 for (delta_c.y = top_left.y; -bot_right.y <= delta_c.y; --delta_c.y) {
13 for (delta_c.x = -top_left.x; delta_c.x <= bot_right.x; ++delta_c.x) {
14 auto coord = center_cell + delta_c;
15 auto cell_occ = map[coord];
16 char map_cell_content;
17 if (center_cell == coord) {
18 map_cell_content =
'C';
19 }
else if (0.75 < cell_occ) {
20 map_cell_content =
'#';
21 }
else if (cell_occ < 0.25) {
22 map_cell_content =
'.';
24 map_cell_content =
'~';
26 std::cout << map_cell_content;
28 std::cout << std::endl;
33 double d_x,
double d_y) {
Coord world_to_cell(const Point2D &pt) const
void show_grid_map(const GridMap &map, const Point2D ¢er, double d_x_left, double d_x_right, double d_y_up, double d_y_down)