Mapping · University · about 25 min
What a map has to do for a robot, why a grid is the usual answer, and what a cell costs.
[1 mark]What does this program print?
CELL = 5.0 x, y = 102.4, 187.6 col = int(x / CELL) row = int(y / CELL) print(col, row) print(col * CELL + CELL / 2, row * CELL + CELL / 2)
[1 mark]What does this program print?
CELL = 5.0 grid = [0] * 40 x = -7.0 grid[int(x / CELL)] = 1 print(grid.index(1))
[1 mark]Why do occupancy grids beat feature maps for planning, despite using far more memory?
[1 mark]A 200 by 200 cm mat is mapped with 1 cm cells, each stored as a 4 byte float. How many bytes does the grid need?
[1 mark]Which cell size best follows the page's rule of thumb for a robot that must fit through 20 cm gaps, with a sensor whose noise is about 2 cm?
[1 mark]Every mapping task in U8 gives the robot its true pose from the overhead camera. Why?
The robot stands at (100, 50) on the mat facing straight up it. Print cells:, how many cells a 5 cm grid needs for this mat, and hit col: and hit row:, the cell the reading ahead lands in.
from bugbot import * connect() CELL = 5.0 W = 40
Plan your program here, then type it in and press Run.