13.07.2015 Views

servo and sensor control on small mobile platforms - Engineering ...

servo and sensor control on small mobile platforms - Engineering ...

servo and sensor control on small mobile platforms - Engineering ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

J. Blanch, S. Tosunoglu, ASME Southeastern Regi<strong>on</strong> XI Technical Journal, Volume 2, Number 1, April 2003; also presented atthe ASME Southeastern Regi<strong>on</strong> XI Technical C<strong>on</strong>ference, Miami, Florida, April 4-5, 2003.getTicks( ) <str<strong>on</strong>g>and</str<strong>on</strong>g> TicksInASec<strong>on</strong>d( ) functi<strong>on</strong>s. Withthese two an approximate waiting functi<strong>on</strong> can bewritten:void WaitMS (int milisecs){UInt32 zero, ticks, time;zero = TimGetTicks( );ticks = zero +1;//c<strong>on</strong>vert time from ms to tickstime = (milisecs / 1000.0) *SysTicksPerSec<strong>on</strong>d( );while(ticks - zero read IRs⇒ move to Positi<strong>on</strong> 2⇒ waitMS(130) => read IRs⇒ move to Positi<strong>on</strong> 3⇒ waitMS(90) => read IRs]⇒ collisi<strong>on</strong> avoidance [⇒ change moti<strong>on</strong> (if necessary)]⇒ increment counter.This means that the HANDCOR needs at least0.015 + 0.079 + 0.122 + 0.082 = 298ms to gather thereadings for the obstacle avoidance subroutine.Because there are two forward looking <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s <str<strong>on</strong>g>and</str<strong>on</strong>g>each has three positi<strong>on</strong>s, if an object appearsimmediately after a reading is taken, it will take <strong>on</strong>efull cycle before that object is detected. A full cycleis 298 ms plus the time it takes the palm to run anyinternal functi<strong>on</strong>s (this varies, but is generally lessthan 50 ms). Each sweep pattern covers just over 45degrees, <str<strong>on</strong>g>and</str<strong>on</strong>g> they complement each other to providereas<strong>on</strong>able detecti<strong>on</strong> of obstacles ahead of the robot.When the obstacles are closer, the overlapping fieldsprovide even better detecti<strong>on</strong>. Given that theeffective range of the <str<strong>on</strong>g>sensor</str<strong>on</strong>g> is just over 40 cm(reliability starts failing after about 50 cm), the <str<strong>on</strong>g>sensor</str<strong>on</strong>g>refresh rate limits the forward speed of the robot to40 cm in 300 ms, or it would be possible to hit anobject before seeing it. The driving <str<strong>on</strong>g>servo</str<strong>on</strong>g>s’maximum speed is under 0.89 revoluti<strong>on</strong>s persec<strong>on</strong>d; with a wheel diameter of 7.6cm (3in), themaximum velocity the robot can achieve is under 24cm in 1 sec<strong>on</strong>d, which is well within safe range.And advantage to having both <str<strong>on</strong>g>sensor</str<strong>on</strong>g>s mounted <strong>on</strong><str<strong>on</strong>g>servo</str<strong>on</strong>g>s is that they can be directed, <str<strong>on</strong>g>and</str<strong>on</strong>g> they can becombined for greater accuracy. By usingtrig<strong>on</strong>ometry [12], two readings can be taken fromthe same obstacle <str<strong>on</strong>g>and</str<strong>on</strong>g> then compared to determine itsdistance with greater accuracy. If a <str<strong>on</strong>g>sensor</str<strong>on</strong>g> detects anobstacle at a distance d R when its orientati<strong>on</strong> is θ R (figure 9) it is very simple to c<strong>on</strong>vert it tocoordinates relative to the robot < 2 >, <str<strong>on</strong>g>and</str<strong>on</strong>g> then tocoordinates relative to the other <str<strong>on</strong>g>sensor</str<strong>on</strong>g> < 3 >.⎡dRX ⎤ ⎡d⋅cos(θR)⎤dR= ⎢ ⎥ = ⎢ ⎥⎣dRY⎦ ⎣d⋅sin(θR)⎦< 1 >⎡DX⎤ ⎡URX ⎤ ⎡dRX⎤D = ⎢ ⎥ = ⎢ ⎥ + ⎢ ⎥⎣DY⎦ ⎣URY ⎦ ⎣dRY⎦< 2 >⎡dLX⎤ ⎡DX⎤ ⎡ULX ⎤dL= ⎢ ⎥ = ⎢ ⎥ − ⎢ ⎥⎣dLY⎦ ⎣DY⎦ ⎣ULY ⎦< 3 >Finally, θ L is⎛ d ⎞LYθL= arctan⎜⎟< 4 >⎝ dLY⎠From the platform, U R = U L = 4 cm <str<strong>on</strong>g>and</str<strong>on</strong>g> the anglesφ R = 35 o φ L = -35 o . Back substituting into < 4 >⎡d⎢⎣dLXLY⎤ ⎡U⎥ = ⎢⎦ ⎣URXRY+ d+ dRXRY−U−ULXLY⎛ 4 ⋅ sin(35) + d ⋅ sin( θ⎞R)− 4 ⋅ sin( −35)θL= arctan⎜⎟⎝ 4 ⋅ cos(35) + d ⋅ cos( θR)− 4 ⋅ cos( −35)⎠Assuming that there is no other obstacle betweenthe sec<strong>on</strong>d <str<strong>on</strong>g>sensor</str<strong>on</strong>g> <str<strong>on</strong>g>and</str<strong>on</strong>g> the original obstacle, θ L can beused to get a sec<strong>on</strong>d reading, d L from the obstacle,which can then be transformed to a sec<strong>on</strong>d distancereading D. The redundant distance readings shouldresult in a more accurate reading when compilingmaps.⎤⎥⎦

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!