Planning · University · about 30 min
Grow the obstacles by the robot's radius and the robot becomes a point, which is the whole reason planning is tractable.
[1 mark]A robot has a 10 cm square chassis and can turn freely. By how much, in cm to two decimal places, must the obstacles be grown so the robot is safe as a point at every heading?
[1 mark]The simulator models the 7 cm square BugBot as a 3.5 cm circle. Why is that not safe on a real robot?
[1 mark]What is the price of planning with the 4.95 cm circle around the square chassis?
[1 mark]For a holonomic robot with a circular footprint, why does the heading drop out of the configuration space?
[1 mark]What does this program print?
BLOCK = (80.0, 90.0, 40.0, 16.0)
MARGIN = 10.0
bx, by, bw, bh = BLOCK
print(bw + 2 * MARGIN)
free = 0
for x in range(0, 200, 10):
if not (bx - MARGIN <= x <= bx + bw + MARGIN):
free += 1
print(free)
60.0 13
Grown by 10 cm on both sides the block spans 70 to 130, 60 cm wide. The lanes at 70, 80, 90, 100, 110, 120 and 130 all touch it, so 13 of the 20 lanes are free.
[1 mark]The start and the goal lie in different connected components of the free space. What will a correct planner do?
[1 mark]A planner mysteriously fails on a map where a route looks possible by eye. What does the page say to look for first?
Standing still, print inflated:, the width of the block in centimetres after growing it by the margin on both sides, and free lanes:, how many of the twenty lanes at x = 0, 10, 20 ... 190 a point robot could drive straight up from y = 30 to y = 170 without entering the grown block.
from bugbot import * connect() BLOCK = (80.0, 90.0, 40.0, 16.0) # x, y, width, height on the mat MARGIN = 6.0 # the 4.95 cm around the square, plus a little
The hint students can ask for: The chassis radius is about 3.5 cm, so grow the block by 6 cm on every side and then treat the robot as a single point. A lane at x runs straight up the mat from y = 30 to y = 170, so it is free exactly when the grown block does not cover that x. Try x = 0, 10, 20 and so on up to 190.
from bugbot import *
connect()
BLOCK = (80.0, 90.0, 40.0, 16.0) # x, y, width, height on the mat
MARGIN = 6.0 # chassis radius 3.5 cm, plus a little
bx, by, bw, bh = BLOCK
print("inflated:", round(bw + 2 * MARGIN, 1))
# with the block grown, the robot is a point, so a lane is free unless the grown block covers it
lo, hi = bx - MARGIN, bx + bw + MARGIN
free = 0
for x in range(0, 200, 10):
if x < lo or x > hi:
free += 1
print("free lanes:", free)
Any program that meets the task's checks is marked correct in the simulator; this is one way, not the only way.