Re: [SeattleRobotics] Re: nbot wall following
- On 6/19/2012 11:25 AM, dpa_io wrote:
> close range: turn SLIGHTLY away from the wall middle range: doI think that might have been similar one of my first attempts that did
> nothing (dead zone) far range: turn SLIGHTLY toward the wall out of
> range: turn AGGRESSIVELY towards the wall
work well. The Maxbotix sensors I'm using have a fairly narrow beam, and
the problem I ran into is that turning either towards or away from the
wall causes the apparent distance to increase (1/cos theta). That
didn't play well with straight proportional control (turn rate
proportional to distance error), and PID was just a mess.
Somehow the math needs to look at the rate of approach/retreat and the
current turn rate and feed that into the PID. The other thing may be to
use the derivative of the PID output as the turn rate.
Other things I've considered are using two side sensors or putting the
sensor on a servo and scanning left/right to locate the closest direction.