190 likes | 308 Views
Signal Processing. Jeremy Wyatt Intelligent Robotics School of Computer Science. Sonar. Sound wave transmitter/receiver Sound wave bounces back off objects Counter measures time of flight Calculates the distance assuming speed of sound is ~335ms -1 Errors due to specular reflection.
E N D
Signal Processing Jeremy Wyatt Intelligent Robotics School of Computer Science
Sonar • Sound wave transmitter/receiver • Sound wave bounces back off objects • Counter measures time of flight • Calculates the distance assuming speed of sound is ~335ms-1 • Errors due to specular reflection
Metres per millisecond 0.5 msecs in each millisecond Sound travels twice the distance to the object Typical data • We gathered 100 samples from a sonar in three positions relative to a wall • You get a figure for time of flight (T) in units of 0.5 microseconds • To convert to metres
Median and mean • Order the values by size • take the central value, here 1.425 • mean is ~1.458 • median is more robust to outliers 1.41, 1.38, 1.71, 1.45, 1.42, 1.39, 1.43, 1.47 1.38, 1.39, 1.41, 1.42, 1.43, 1.45, 1.47, 1.71
Mapping • We took 25 sonar readings each at 100 equally spaced angles between 0 and 360 degrees
Plot range versus angle Range in metres Angle in degrees
Convert to Cartesian frame x y r q
(x,y) q r r
Finding Walls • Assume walls are straight lines • Each point is on many possible lines • Each line can be described by an equation
w f
Hough Transform Create f and w for all possible lines Create an array A indexed by f and w for each point (x,y) for each angle f w = x*cos(f)+ y*sin(f) A[f,w] = A[f,w]+1 end end where A > Threshold return a line
Summary • Use median • Hough finds lines • But because of width of sonar beam gives bad results • May be better with Infra Red • Smooth in Hough Space • Use property of sonar