To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 26328
Subject: 
NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics, lugnet.robotics.nxt, lugnet.announce, lugnet.events.brickfest
Followup-To: 
lugnet.robotics.nxt
Date: 
Tue, 8 Aug 2006 04:50:29 GMT
Highlighted: 
! (details)
Viewed: 
11550 times
  
I’m interested in trying some experiments in swarm robotics. The basic idea is that simple robots with simple programming can behave in complex ways, provided that there are 1.) a lot of them, and 2.) they can communicate locally in some fashion. You then end up with a swarm of robots acting collectively. The robots’ programming controls their individual behavior, but the behavior of the entire collective arises from the robots’ interactions with their environment and their neighbors’ actions.

Here is an example swarm built using the LEGO RCX system:

http://www.idi.ntnu.no/grupper/ai/eval/fdagene/

“All robots in the group are the same and perform a very simple behavior: when they run into an obstacle, they back up a bit, turn, and go forward again. Instead of proximity sensors, we use standard LEGO touch sensors.”

Their emergent behavior has the effect of collecting scattered objects into a pile in the center of their habitat. The cool thing is that this swarm actually doesn’t communicate locally -- the robots simply react to their environment.

So, imagine what a swarm of Bluetooth-enabled NXT robots talking to each other could do!

If this project sounds interesting, we should hurry up and design a simple robot that anyone can build using only parts in the consumer NXT set (8527). In fact, the basic driving base could be used. We’ll also have to design some programs that will (hopefully) create interesting collective behaviors. Everyone would then bring their robot(s) to BrickFest and we’d watch the swarm do its thing.

What do you all think?


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.technic
Followup-To: 
lugnet.robotics.nxt
Date: 
Tue, 8 Aug 2006 04:55:30 GMT
Viewed: 
13978 times
  
I forgot to cross-post this to lugnet.technic.


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 02:09:18 GMT
Viewed: 
11798 times
  
The spec says that at most three other Bluetooth units may be connected to each NXT unit for any given program, but with proper setup one unit could act as a message-passing server for all the others in a swarm, or a simple broadcast relay protocol could be designed to pass messages on through an arbitrary ad-hoc chain of NXT units. With too many units in the same place, radio interference would become a problem, but even if the swarms were only four units big, it would certainly be cool just to try out what a small team of NXT units could do in some sort of competition, task-oriented problem-solving or just plain swarming.

I’m not going to BrickFest, but I would be happy to see this happen. It would be very useful for a course on AI programming and interactive systems this spring at the university where I work. If I’m lucky and I can present a good a plan for what to do with them, I might be allowed to buy 10 NXT kits on my employer’s expense and design advanced lab assignments around them. :D

Stefan G


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 13:26:03 GMT
Viewed: 
11820 times
  
In lugnet.robotics.nxt, Stefan Gustavson wrote:

   The spec says that at most three other Bluetooth units may be connected to each NXT unit for any given program, but with proper setup one unit could act as a message-passing server...



The problem (I think; somebody want to prove me wrong?) is that the “master” NXT can send messages to at most three “slave” NXTs, but the “slaves” can not then act as BT masters to still more units. In other words, it seems very very easy to link four NXT together via BT, but very difficult to extend this using single NXT units. You could dynamicly switch the BT net around if a NXT-G program could set up new BT connections on its own, but this is a functionality that you do from the menu system. I’m certain there’s a way to do it - but I’ve not found it yet in NXT-G. Then again, most of us don’t have 4+ NXT units to play with (OK, almost none of us), so it may be interesting to see what gets learned at BrickFest.

-- Brian Davis


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 17:47:45 GMT
Viewed: 
12147 times
  
It’s good that people are interested!

With the RCX couldn’t you just have a robot broadcast a message to anything that could see the IR signal and was waiting for specific messages to arrive? Can a similar thing be done with BT?

Would we be better off waiting until BrickFest and playing around with the programming then, or try to do some of it ahead of time? Like you said, almost no one owns 4+ NXTs (I just own one), and this is also why I thought BrickFest was a perfect place to try it.


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 18:18:35 GMT
Viewed: 
12249 times
  
On Fri, August 11, 2006 1:47 pm, Jordan Bradford wrote:
   It’s good that people are interested!

With the RCX couldn’t you just have a robot broadcast a message to anything that could see the IR signal and was waiting for specific messages to arrive? Can a similar thing be done with BT?

Would we be better off waiting until BrickFest and playing around with the programming then, or try to do some of it ahead of time? Like you said, almost no one owns 4+ NXTs (I just own one), and this is also why I thought BrickFest was a perfect place to try it.

Jordan,

I think swarming would be very fun to explore, but, for me, there isn’t enough time before BF.

Here’s something you could play around with before BF: http://news.lugnet.com/events/brickfest/?n=3514

Start by getting your robot to follow the line on the test pad.

To answer your question, the NXT can NOT broadcast a message. It only sends to a specific target.

Hopefully, there will be other bluetooth stuff we (you) can play with at BF.

Steve


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Fri, 11 Aug 2006 23:17:50 GMT
Viewed: 
12256 times
  
On 8/11/06, Brian Davis <brdavis@iusb.edu> wrote:
   The problem (I think; somebody want to prove me wrong?) is that the "master"
NXT can send messages to at most three "slave" NXTs, but the "slaves" can not
then act as BT masters to still more units. In other words, it seems very very

As I was working on my ruby-nxt module, I managed to get the nxt to
connect to my laptop as both a master and a slave.  On my laptop (a
MacBookPro) I created an incoming bluetooth serial port and an
outgoing serial port on the DEV-B device service on the NXT.  I then
initiated a connection from the NXT to the laptop on Connection 1 and
then initiated a connection from my laptop to the NXT on the DEV-B
port.  On the NXT screen under bluetooth connections, it showed my
laptop on both Connection 0 and Connection 1.

I haven't tried to actually communicate on both connections at the
same time yet and I only have one NXT so perhaps it wouldn't work
between NXTs, but it seems to be possible for the NXT to act as both a
master and slave when connecting to other bluetooth devices... I'll
experiment with it some more this weekend.


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 13 Aug 2006 02:46:02 GMT
Viewed: 
12362 times
  
On Fri, August 11, 2006 7:17 pm, Tony Buser wrote:
On 8/11/06, Brian Davis <brdavis@iusb.edu> wrote:
   The problem (I think; somebody want to prove me wrong?) is that the "master"
NXT can send messages to at most three "slave" NXTs, but the "slaves" can not
then act as BT masters to still more units. In other words, it seems very very

On the NXT screen under bluetooth connections, it showed my
laptop on both Connection 0 and Connection 1.

I haven't tried to actually communicate on both connections at the
same time yet and I only have one NXT so perhaps it wouldn't work
between NXTs, but it seems to be possible for the NXT to act as both a
master and slave when connecting to other bluetooth devices... I'll
experiment with it some more this weekend.

I played around with this a little bit, trying to confirm what I've been told.  It
is possible to have an NXT connect as either a master or a slave, but not both at
the same time.  I'm sure this is true.

Here's what I did: I took three NXTs with the latest firmware.
(A) Master to B
(B) Slave to A and Master to C
(C) Slave to B

When you connect two NXTs, the < in the top left corner becomes a diamond (like <>).
Connecting A to B, both show they are connected.
Then, connecting B to C, A no longer shows that it's connected.
Then, connecting A to B, all three show they are connected, and B shows (from the
connections screen) that it's connected to both A and C.

However, when I ran a program to send messages from A to B, and B to C, the message
did not go from A to B.  And, looking at the Connections on B, it only shows the
connection to C.

Bottom line: An NXT can be either a master or a slave, but not both, at the same time.

Steve


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 13 Aug 2006 14:59:15 GMT
Viewed: 
12406 times
  
Here's an idea of how to get more than 3 NXTs connected via Bluetooth
(BT). It involves using a PC as a "relay point".

I think standards allow up to seven simultaneous connections per BT
device. The limitation to three connections on the NXT may be a
function of the Bluecore hardware/firmware "module" that is used on
the NXT. If I'm accurate on this, then it should be simple to write a
PC based relay program that would accept up to seven NXT
simultaneously connected via BT on the PC; whenver PC receives a
message would forward it out on the other six connections. Hopefully
the NXT "Fantom" driver on the PC supports multiple connections.

Furthermore, I think you canhave multiple BT devices plugged into a
single PC. So with three dongles, you could network 21 NXTs!


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Sun, 13 Aug 2006 15:28:16 GMT
Viewed: 
12879 times
  
In lugnet.robotics.nxt, Dick Swan wrote:

Here's an idea of how to get more than 3 NXTs connected
via Bluetooth (BT). It involves using a PC as a "relay
point".

   My problems with this solution are two-fold. First, NXT-G currently can't
send anything back to the PC, as it's not running anything to get the NXT-G
message structure (yes, folks could write this... almost certainly will. But
likely not me). And this may allow much more than 7 connections, because while
NXT-G doesn't allow you to set up a BT connection under SW control, I'll bet a
well-programmed computer certainly could. The second problem is I admit just a
bias of mine - I want my control On The NXT, not off the brick. Autonomy is in
some senses a pretty silly, artificial constraint anyway (hey, I program the NXT
with a laptop, right?)... but so is working with LEGO and not sheet metal.

   What I do *not* know as yet is if the three connection limit, and the
inability to set up BT connections under on-the-NXT SW control, is due to the SW
(NXT-G doesn't have the ability), or the FW (the LEGO FW can't command those
modes), or due to the BlueCore FW itself (i.e., we're stuck with it due to the
chipset on the NXT). Anyone know?

--
Brian Davis


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Tue, 15 Aug 2006 01:05:46 GMT
Viewed: 
15354 times
  
In article <J3y0B4.FM0@lugnet.com>, Brian Davis <brdavis@iusb.edu> wrote
In lugnet.robotics.nxt, Dick Swan wrote:

Here's an idea of how to get more than 3 NXTs connected
via Bluetooth (BT). It involves using a PC as a "relay
point".

  My problems with this solution are two-fold. First, NXT-G currently can't
send anything back to the PC, as it's not running anything to get the NXT-G
message structure (yes, folks could write this... almost certainly will. But
likely not me).

I shall have PC software to do this, and probably others will have
similar tools before I finish.

And this may allow much more than 7 connections,

I believe 7 is the number of connections specified in the Bluetooth
standard, for each radio.

because while
NXT-G doesn't allow you to set up a BT connection under SW control, I'll bet a
well-programmed computer certainly could.

I am not sure what your definition of "set up of a bt connection"
covers.

Pairing generally requires user input, for the password.

Connecting to a previously paired device under software control should
be possible.  One wrinkle will be on the receiving device, and ensuring
the 'allow "NXT 1" to connect?' query will be handled.

Paired device should be identified by their MAC address, rather than by
their friendly name.  I guess these are stored in a file.

The second problem is I admit just a
bias of mine - I want my control On The NXT, not off the brick. Autonomy is in
some senses a pretty silly, artificial constraint anyway (hey, I program the
NXT
with a laptop, right?)... but so is working with LEGO and not sheet metal.

  What I do *not* know as yet is if the three connection limit, and the
inability to set up BT connections under on-the-NXT SW control, is due to the
SW

Making a connection should be possible, at least with a previously
paired device.

(NXT-G doesn't have the ability), or the FW (the LEGO FW can't command those
modes), or due to the BlueCore FW itself (i.e., we're stuck with it due to the
chipset on the NXT). Anyone know?

If I am reading the datasheet correctly the Bluetooth chipset supports 7
concurrent connections, but only 3 if they are high speed connections.
Perhaps due to RAM space for buffers, more probably the CPU has to do
more work for each connection.
Reference the datasheet here:
        http://www.csr.com/products/bc4ext_over.htm


Constraints I have noticed in the Lego NXT development kit
documentation:

1. The master NXT can only communicate with one of the slave units
   during a given moment, meaning that if the master NXT is
   communicating with NXT Slave 1 and NXT Slave 3 starts sending data to
   the master NXT , the master NXT will not evaluate the received data
   until it switches to NXT slave 3.
   An NXT is not able to function as both a master and slave device at
   the same time because this could cause lost data between NXT devices.
   p12, Lego Mindstorms NXT Hardware Development Kit

2. p13 explains that the Bluecore chip VM runs a different profile for
   Master and Slave modes.

3. Appendix 8-LEGO MINDSTORMS NXT ARM7 Bluetooth Interface
specification.pdf has some potentially helpful info too.

Regards,
Tony
--
  "If you don't know, invent." - Robert Baden-Powell


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Tue, 22 Aug 2006 18:32:17 GMT
Viewed: 
11647 times
  
The NXT Robot Swarm has been scheduled for Saturday at 12:30 in Junior Ballroom 3. It seems the goal of this first event is to get some basic BT communication working, and if there’s time, actually try a swarm-like experiment. If anything else, it will be fun to just hang out and talk about this stuff.

Please bring your NXT along with the basic robot that everyone with an NXT retail set has the necessary parts to build. I’m talking about the driving base that can be assembled and programmed in 30 minutes.

We also need at least one person to bring a laptop with BT capabilities so we can design/compile/upload the programs we end up writing. (I don’t have a laptop, sorry!)

It might also be interesting to do broadcast-type IR communication with some RCX robots, but I think we’ll be plenty busy just getting the NXTs to talk to each other.

I’ll see you there!


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Tue, 22 Aug 2006 18:42:47 GMT
Viewed: 
11555 times
  
In lugnet.robotics.nxt, Jordan Bradford wrote:
   The NXT Robot Swarm has been scheduled for Saturday at 12:30 in Junior Ballroom 3. It seems the goal of this first event is to get some basic BT communication working, and if there’s time, actually try a swarm-like experiment. If anything else, it will be fun to just hang out and talk about this stuff.

Please bring your NXT along with the basic robot that everyone with an NXT retail set has the necessary parts to build. I’m talking about the driving base that can be assembled and programmed in 30 minutes.

We also need at least one person to bring a laptop with BT capabilities so we can design/compile/upload the programs we end up writing. (I don’t have a laptop, sorry!)

It might also be interesting to do broadcast-type IR communication with some RCX robots, but I think we’ll be plenty busy just getting the NXTs to talk to each other.

I’ll see you there!


I can loan out an iBook with BT - and it has the NXT retail software.

Joe Meno Event Coordinator


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Tue, 22 Aug 2006 18:45:49 GMT
Viewed: 
11645 times
  
On Tue, August 22, 2006 2:32 pm, Jordan Bradford wrote:
The NXT Robot Swarm has been scheduled for Saturday at 12:30 in Junior Ballroom
3

but I think we'll be plenty busy just getting the NXTs to talk to each
other.

Jordan,

Sorry to tell you this, but getting NXTs to talk to each other isn't going to take
very long.  Of course, figuring out what to say may take a bit.

People should be able to bring almost any NXT robot, and we'll be able to get them
to communicate.  Even a couple line-following robots can talk to each other...
(sorry, that's a different event)  :)

Also, I'll have my laptop w/bluetooth.

Steve


Subject: 
Re: NXT Robot Swarm at BrickFest -- featuring Bluetooth
Newsgroups: 
lugnet.robotics.nxt
Date: 
Tue, 22 Aug 2006 19:55:52 GMT
Viewed: 
11764 times
  
In lugnet.robotics.nxt, Steve Hassenplug wrote:
On Tue, August 22, 2006 2:32 pm, Jordan Bradford wrote:
The NXT Robot Swarm has been scheduled for Saturday at 12:30 in Junior Ballroom
3

but I think we'll be plenty busy just getting the NXTs to talk to each
other.

Jordan,

Sorry to tell you this, but getting NXTs to talk to each other isn't going to take
very long.  Of course, figuring out what to say may take a bit.

People should be able to bring almost any NXT robot, and we'll be able to get them
to communicate.  Even a couple line-following robots can talk to each other...
(sorry, that's a different event)  :)

Also, I'll have my laptop w/bluetooth.

Steve

I meant busy in the context of the other subthread in this thread, in which
people proposed hacking a way around the master-slave restrictions.

But still, that's good news, so we'll have to think of some stuff for the robots
to do that will be interesting.


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR