Following Walls
Control of Mobile Robots: Programming & Simulation Week 6
Jean-Pierre de la Croix
ECE Ph.D. Candidate
Georgia Inst. of Technology
Overview
This week we will add a new controller to follow walls.
1. Estimate a section of a wall (obstacle) using the IR sensors.
2. Compute a vector tangential to the wall and perpendicular to the
wall.
3. Combine the two vectors and steer in the direction of this new
vector.
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
Estimating the Wall
To follow wall on the left,
use two (of three) left IR
sensors with shortest
distance measured.
u gtg
u fw,t p2 p1
uao
2
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
Maintaining Spacing from the Wall
We can find a vector from
the robot to the closest
point on u_fw_tp.
u gtg
ua p1
u 'fw,t
u fw,t
u fw,t
x
up
y
uao
u fw, p ua u p ((ua u p ) u 'fw,t )u 'fw,t
3
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
Maintaining Spacing from the Wall
u gtg
u 'fw, p u fw, p d fw
u fw, p Find a vector that points in
u fw, p
u fw, p
d fw
uao
4
the opposite direction of
u_fw_p and weighed by
the distance we want to
maintain from the wall.
u fw, p
u fw, p
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
Combining Vectors
Sum the two vectors into a
single vector.
u gtg
u fw u 'fw,t u 'fw, p
u fw
Steer robot to orientation of
u_fw.
uao
5
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
How well does this work?
Not the best estimate on
inside corners, but OK.
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
How well does this work?
Outside corners are more
problematic. We need a
good d_fw.
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
Implementation
Implement the missing logic and math in the following file:
+simiam/+controller/FollowWall.m
Controller accepts left and
right as input denoting the
side of the robot on which
to follow the wall.
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6
Tips
Refer to the section for Week 6 in the manual for more
details!
Experiment with different d_fw and combinations of the
vectors u_fw_t and u_fw_p.
Jean-Pierre de la Croix - Control of Mobile Robots: Programming & Simulation Week 6