Subject:
|
Re: Connection between two different teams of robots
|
Newsgroups:
|
lugnet.robotics.rcx.nqc
|
Date:
|
Thu, 23 Nov 2000 11:24:18 GMT
|
Viewed:
|
2136 times
|
| |
| |
Hi Giancarlo,
I had a similar situation but only with two RCXs which had to exchange
information with another constantly. Since both of them were sending and
transmitting via their IR interface, the messages had to be identified and
assigned to the corresponding robot.
In your case I would setup 4 classes of messages, each class standing for a
transmitting robot. Assuming that you have to exchange status messages from 0 -
9 for each robot, you could do this classification:
10 - 19 : robot 1
20 - 29 : robot 2
30 - 39 : robot 3
40 - 49 : robot 4
If a robot gets a message and e.g. it should only listen to robot 3, you
analyse it with
cmd = Message ();
if ((cmd / 10) == 3) cmd = cmd - cmd / 10;
If robot 3 sent a "35" message, cmd will be 5.
Of course you can do the classification in another way if you want to send
bigger numbers than 9 (e.g. 1-50: robot 1, 51 - 100: robot 2, etc.).
Don't forget that there is a lot of "noise" around since every robot is
transmitting.
I would do the receiving and analysing part in a separate task, being executed
in parallel to your other tasks. The task must be quick and check the message
input buffer continuously. It should present the result in a global variable
which is 0, if the robot should ignore it or it is equal cmd (i.e. > 0)
otherwise.
With 2 RCXs it worked perfectly and I couldn't detect any significant delay.
Best regards
Bernd
|
|
Message has 1 Reply:
Message is in Reply To:
4 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|