0% found this document useful (0 votes)
14 views

Bug Algo - C Space Lectures

The document discusses early BUG algorithms for path planning using a point robot. It describes the BUG-1 and BUG-2 algorithms, comparing their performance on different obstacle shapes. It then discusses enhancing the algorithms to use a range sensor and represent the robot's physical dimensions in configuration space.

Uploaded by

Pranjal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Bug Algo - C Space Lectures

The document discusses early BUG algorithms for path planning using a point robot. It describes the BUG-1 and BUG-2 algorithms, comparing their performance on different obstacle shapes. It then discusses enhancing the algorithms to use a range sensor and represent the robot's physical dimensions in configuration space.

Uploaded by

Pranjal
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

The earliest BUG algorithms

Dr. Ashish Dutta


Professor, Dept. of Mechanical Engineering
Indian Institute of Technology Kanpur, INDIA
Motion of bugs / insects Bahavior:

Requirement:

Locomotion
Different types of mobile robots
Working of mobile robots (differential drive)
Internal details of mobile robots

- Motor (12 V DC motors with inbuilt gears)


- Battery (12 Li ion / Lead Acid rechargeable battery)
- Caster wheel (plastic mounted with rubber)
- Wireless module (ZBEE module)
- Controller : Atmega 16 micro controller
Top view

Bottom view
Range sensor : Ultrasonic sensor
Infra red sensors
Tactile sensors for detecting contact with object
as a low-resolution encoder…
on/off switch
analog input: “Active antenna”

Tactile sensor (capacitive aray) Touch/pressure sensor


BUG Algorithm
• Robot is a point robot (no physical dimensions)

• It has a touch sensor to detect contact with obstacles.


• Algorithm input: start point, goal point, obstacles.

• Behavior : Motion to goal


: Boundary following
The earliest BUG algorithms for path planning
• Objective : Reach a goal point from a start point avoiding obstacles.
BUG – 1 Algorithm
- Connect start to goal by straight line
- Follow straight line
- q1H – hit point on obstacle
- Circumnavigate obstacle and come back to q1H
- q1L leave point (nearest to goal/next obstacle)
- continue
BUG 1 Algorithm
• Let qL = qstart; i = 1
0
• repeat
– repeat
• from qLi-1 move toward qgoal
– until goal is reached or obstacle encountered at qH
i
– if goal is reached, exit
– repeat
• follow the obstacle boundary by moving left or right
– until qgoal is reached or qiH is re-encountered

– Determine the point qiL on perimeter that has the shortest


distance to the goal.
i
– Go to qLi
– if move toward qgoal moves into obstacle
• exit with failure
– else
• i=i+1
• continue
BUG 1 – Failure case : enclosed obstacle
BUG – 2 Algorithm - better
Call the line from the starting
point to the goal the m-line

1) head toward goal on the m-line


Call the line from the
starting point to the
goal the m-line
1)head toward goal on the m-line
2)if an obstacle is in the way, follow it
until you encounter the m-line again.
“Bug 2” Algorithm
m-line

1)head toward goal on the m-line


2)if an obstacle is in the way, follow it
until you encounter the m-line again.
3)Leave the obstacle and continue toward
the goal
“Bug 2” Algorithm

1) head toward goal on the m-line


2)if an obstacle is in the way,
Start
follow it until you encounter the
m-line again closer to the goal.
3)Leave the obstacle and continue
toward the goal

Goal
BUG 2 - Algorithm
• Let qL = qstart; i = 1
0
• repeat
– repeat
• from qLi-1 move toward qgoal along the m-line
– until goal is reached or obstacle encountered at qH
i
– if goal is reached, exit
– repeat
• follow boundary by moving left or right
– until qgoal is reached or qH iis re-encountered or
m-line is re-encountered, x is not qH i, d(x,qgoal) < d(qHi,qgoal) and way
to goal is unimpeded
– if goal is reached, exit
– if qH is reached, return failure
i
– else
• qL = m
i
• i=i+1
• continue

Howie Choset, etc al. - Principles of Robot Motion,


Search for a path
• Exhaustive search – Bug 1 - more complete

• Opportunistic search – Bug 2 – greedy

• Which is better Bug 1 or Bug 2


Comparison of Bug 1 and Bug 2
Obstacle shapes in which Bug 2 does better than Bug 1

Bug 2 beats Bug 1 Bug 1 beats Bug 2


Comparison of Bug 1 and Bug 2 – spiral
BUG 1 BUG 2
The point robot now has a ultrasonic range sensor

• The range sensor has a finite range of detection and it can sweep 360
degrees .

• The range sensor will prevent the robot from colliding with the
obstacle.

o Define a distance function to find shape of obstacles


as there are two variables now the distance from the
robot and the angle of the sensor
Raw Distance Function

Obstacle
No obstacle
Intervals of Continuity

• Tangent Bug relies on finding endpoints of finite, constant segments of


curves
Moving Toward goal to “following obstalces”

Transition

the motion-to-goal behavior “thinks” the robot can get to the


goal Now, it starts to see something --- what to do?
Ans: For any Oi such that d(Oi,qgoal) < d(x,qgoal),
choose the pt Oi that minimizes d(x,Oi) + d(Oi,qgoal)
Minimize Heuristic Example

At x, robot knows only what it sees and where the goal is,

so moves toward O2. Note the line connecting O2 and so moves toward O4. Note some “thinking” was involved
goal pass through obstacle and the line connecting O4 and goal pass through obstacle

For any Oi such that d(Oi,qgoal) < d(x,qgoal),


choose the pt Oi that minimizes d(x,Oi) + d(Oi,qgoal)
Motion To Goal Example

For any Oi such that d(Oi,qgoal) < d(x,qgoal),


choose the pt Oi that minimizes d(x,Oi) + d(Oi,qgoal)
Transition from Motion-to-Goal

Choose the pt Oi that minimizes


d(x,Oi) + d(Oi,qgoal)

Problem: what if this distance


starts to go up?

Ans: start to act like a BUG


and follow boundary –
TANGENT BUG
Boundary Following

M is the point on the “sensed” obstacle


Move toward the Oi on which has the shorted
distance to the goal
the followed obstacle
in the “chosen”
direction Followed obstacle: the obstacle that we are
currently sensing

Blocking obstacle: the obstacle that intersects


the segment
Maintain dmin and dleave

• dmin is the shortest distance, observed thus far, between the sensed boundary of the obstacle and the
goal

• dleave is the shortest distance between any point in the currently sensed environment and the goal

• Terminate boundary following behavior when dleave < dmin


Example: Zero Senor Range

1. Robot moves toward goal until it hits obstacle 1 at H1


2. Pretend there is an infinitely small sensor range and the Oi which minimizes the
heuristic is to the right
3. Keep following obstacle until robot can go toward obstacle again
4. Same situation with second obstacle
5. At third obstacle, the robot turned left until it could not increase heuristic
6. dmin is distance between M3 and goal, dleave is distance between robot and goal
because sensing distance is zero
Example: Finite Sensor Range
Example: Infinite Sensor Range
Configuration Space

Prof. Ashish Dutta


Professor
Department of Mechanical engineering
IIT Kanpur
Kanpur 208016, India
Robots are of different shapes and sizes in the
real world
Circular robot that can only translate- Trace Boundary of
Workspace to find free space
Robot should not HIT an obstacle
• Point robot no physical dimensions.

• Real robot has physical dimensions (center coordinate and radius R).
• How to specify all the points in the robot)
Configuration space
• Robots occupy space and are of different shapes in the real world.
Robot should not hit obstacles
• No point of the robot should hit an obstacle?

• How much information is required to completely specify every point


of the robot ?
Example of circular robot
• A circular robot of radius ‘R’ can only translate but not rotate.

• If we know the centre point (x,y) and the radius then we know all
points of the robot.

• (x,y) represents the configuration of the robot.


• Two parameters (x,y) are enough to specify all the points of the robot.

• These two parameters make up the configuration of the robot.

• Configuration space or C-space is the space of all the configurations of the


robot.

• The configuration is just a point in the C-space (the robot is shrunk to a point)

Euclidean space of the robot C-space of the robot


Rectangular workspace with obstacle
Corner points
• The C- space looks like the Cartesian space (Euclidean space)

• The DOF of the system is the dimension of the configuration space.

• Mobile point robot DOF = 2

• As the robot shrinks by ‘R’ the obstacles and boundaries expand by


‘R’!!
Why does C space and cartesian space look
same?

You might also like