Re: Ultrasonic sensor interactions

"David Schilling" <[email protected]> Sun, 21 May 2006 05:58:33 GMT
Newsgroups gmane.comp.hardware.lego.robotics
Organization None
Message-ID <[email protected]>
In lugnet.robotics, steve <[email protected]> wrote:
> John Barnes wrote:
>
>> Pulses emitted by "the other sensor" can arrive at just the wrong moment,
>> creating a false range reading. Clever numerical filtering can eliminate this
>> kind of thing under certain circumstances - for example you may be following
>> parallel to a wall and obtaining a series of readings which should be all within
>> a likely range. If you suddenly receive a reading which is outside the expected
>> range, you might discard it. In otherwords, if you maintain an average and only
>> accept readings within a certain range of that average as bona fide, then you
>> may be able to guard against this kind of interference to a certain extent.
>
> A better alternative would be to develop protocols in which the NXT
> controllers use their communications to tell each other what they are
> about to do.  If you can sent a message that says "I'm about to do an
> ultrasound 'ping' - so you'd better ignore any readings you are about
> to get and refrain from doing a 'ping' of your own."  then do a range
> measurement and finally send another message "Thanks - I'm done with
> the ultrasound system for a while."...then the systems can arrange to
> avoid interfering with each other.
>
> After all, robots move slowly - you are unlikely to need high speed
> readings.
>
> I guess it all assumes that you have software control of the ultrasound
> sensor so that you can control when it sends a ping and make it shut
> down between pings.
>
> For competitive NXT events, it might be worthwhile for this group to
> come up with a standard protocol that contest organisers could
> require everyone's entries to adhere to if they wish to use the
> sonar system.

This is a great idea except for one very important item: there is no such thing
as a broadcast message (ie: a message sent to everyone) using Bluetooth. So for
any such system to work, each robot has to know about every other robot, and
send individual messages to them all. In a competition environment (especially
something like FLL), that likely won't happen at all -- there are too many other
NXTs that you have to set up communication with. Even in a more structured and
less crowded environment, it isn't a trivial problem because of the limited
number of BT channels.

*Possibly* a better solution (I've not tried it, so who knows!) is to set up a
scheduling system: synchronize the clocks on the NXTs in the area with a set of
BT messages. Then each robot has its own pre-specified 1/5th of a second that it
can use the ultrasonic sensor. Depending on how accurate the clocks on different
NXTs are, once a minute or so you might need to resynchronize all the clocks.

--
  David Schilling