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 / 25880
25879  |  25881
Subject: 
Re: NXT to NXT communication?
Newsgroups: 
lugnet.robotics
Date: 
Fri, 5 May 2006 12:53:45 GMT
Viewed: 
2946 times
  
In lugnet.robotics, Dick Swan wrote:

I haven't measured NXT to NXT communications to see if it has
the same performance as NXT to PC.

   I can't figure out a easy way for me to test PC-to-NXT timelag, but I tried
some simple bench tests on NXT-to-NXT. This is just the old standard of two
timed loops (10,0000 interations), one empty, and one with a single block (or
two), and calcuating the difference.

Empty loop, 10,000 iterations = 2300 ms

Math block (0+0)        0.137 ms
Math block (2x2)        0.137
Two math blocks (0+0)   0.196
Read light sensor       4.41 (sound sensor essentially the same)
Read touch sensor       1.29
Read US sensor          0.37 (huh?!?)
Write to variable (#)   0.0275
Read from variable (#)  0.0264 (zero if no "wire out")
Draw (single pixel)     1.35
Draw (100x63 image)     7.78

Send BT # (1)           2.77
Send BT # (1, no conn)  2.19 (this is if there is no valid connection)
Send BT text (alphabet) 3.40
Read BT # (1)           1.49

   First, are these similar to your results, or have a really messed up here?
Suggest a test and I'll try to do it.

   Second, it would seem BT messaging is faster in my tests: a 10,000 count loop
of "Send the number 1" returned a time delay of 27760, while the same operation
if there is no receiving NXT is just slightly shorter. For timing the "Read BT",
I made sure the sending NXT was sending faster than the receiving NXT could read
out of the mailbox (by slowing the reader loop with a Draw image block), so
those should be all valid reads (but I did *not* try to wire those messages out
of the Read BT block... and given the odd optimization of a Read Variable block
with no wire out, I'm not convinced I've nailed this down). The time to execute
a Read US sensor block is really short as well, but this does not say the
returned value is updated that fast.

   Incidently I'm still trying to accurately time file operations. I know
they're slow (relative to variables, or other blocks), but how slow is a little
tougher to figure out.

--
Brian Davis



Message is in Reply To:
  Re: NXT to NXT communication?
 
I haven't seen any discussion on the performance of the bluetooth messaging. I've measured PC to NXT round trip (send message and receive acknowledgement) as typically being 30 milliseconds. Has anyon else done these measurements and were your (...) (18 years ago, 5-May-06, to lugnet.robotics)

37 Messages in This Thread:













Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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