Bug Algorithms Shmuel Wimer Bar Ilan Univ School

Bug Algorithms Shmuel Wimer Bar Ilan Univ. , School of Engineering April 2011 1

Bug 1 and Bug 2 Algorithm • Move towards the goal, unless an obstacle is encountered. • Circumnavigate the obstacle until motion toward the goal is again allowable. • Robot is assumed to be a point with perfect positioning. • Robot has a contact sensor which detects the obstacle boundary if it touches it. • The robot can measure the distance d(x, y) between any two points. • The workspace is bounded. April 2011 2

The Bug 1 algorithm successfully finds the goal. April 2011 3

• Bug 1 exhibits two behaviors: – motion to goal, and – boundary following. • The robot moves along a line from qstart to qgoal until it hits an obstacle at a hit point - q 1, hit. • It circumnavigate the obstacle until it returns the hit point. • It then determines the nearest point to qgoal and traverses along the boundary to that leave point - q 1, leave. • From q 1, leave it heads straight to qgoal again. • The algorithm terminates when qgoal is reached or the planner determines that qgoal is not reachable. April 2011 4

The Bug 1 algorithm reports the goal is unreachable. April 2011 5

The Bug 2 algorithm successfully finds the goal. April 2011 6

The Bug 2 algorithm reports the goal is unreachable. April 2011 7

• Bug 2 also exhibits two behaviors: – motion to goal, and – boundary following. • The motion line is fixed, connecting qstart to qgoal. • From a hit point qi, hit it circumnavigate an obstacle until it reaches a new point along the motion line, closer to qgoal. • If it returns to qi, hit the goal is not reachable. • At first glance it seems that Bug 1 is more effective than Bug 2, yielding a shorter path. • This is not always the case. April 2011 8

April 2011 9

For Bug 1, when the robot hits an obstacle it completely circumnavigate the boundary and then returns to the leave point, traversing it 1. 5 times in the worst case. If there are n obstacles then: Let the motion line connecting qstart to qgoal intersects and obstacle ni times. Bug 2 may perform a complete traversal of the boundary on half of those point. Therefore: LBug 2 can be arbitrarily longer than LBug 1. April 2011 10

Tangent Bug The robot has an azimuth distance sensor with infinitesimal angular resolution. For every point of an obstacle, azimuth distance is defined: The range of the sensor is usually limited. April 2011 11

ρR is piecewise continuous. The tangent Bug planner assumes that the robot can detect discontinuities in ρR. April 2011 Intervals of continuity: [O 1, O 2] , [O 3, O 4], [O 5, O 6] and [O 7, O 8] 12

• Like Bug 1 and Bug 2, Tangent Bug has motion-to-goal and boundary-following behaviors. • Unlike Bug 1 and Bug 2, its motion-to-goal behavior may have both straight and boundary following phases. Similarly, in boundary-following behavior it may have a straight motion phase. • The robot starts in a motion-to-goal by moving straight towards the goal until it senses an obstacle at distance of R units. • By definition, the line connecting the robot to the goal must intersect an interval of continuity. April 2011 13

The robot is sensing WO 1 and WO 2, but ignores WO 1. After touching WO 2 the first time, an interval [O 1, O 2] of continuity is defined. The robot then moves towards Oi that maximally decreases a heuristic distance to goal, for example, d(x, Oi)+d(Oi, qgoal). April 2011 14

Motion-to-goal is also following boundary April 2011 15
- Slides: 15