| | Re: Ooops! NXT Software Comparison correction
|
|
(...) Nearly all of the speed test numbers on Steve's page are wrong. That's because Steve's loop boils down to "how fast can you reliably read the LEGO Ultrasonic Sensor". You can't reliably read a value from that device faster than about once (...) (17 years ago, 2-Sep-07, to lugnet.robotics.nxt)
|
|
| | Re: Ooops! NXT Software Comparison correction
|
|
(...) So if I cheat I can move the I2C transaction out of the actual timing loop (which may be what some other folks are doing, effectively) then with a "read" of the Ultrasonic sensor value in the loop and all sensors and motors attached I get (...) (17 years ago, 2-Sep-07, to lugnet.robotics.nxt)
|
|
| | Re: Ooops! NXT Software Comparison correction
|
|
I can further manipulate the numbers for this timing test by using the enhanced standard firmware's support for adjusting a thread's priority. Here's the results when I tweak priorities: W/O LCD LCD Priorities ---...--- 50617 22608 40/5 63211 27375 (...) (17 years ago, 2-Sep-07, to lugnet.robotics.nxt)
|
|
| | RE: Ooops! NXT Software Comparison correction / I2C Messaging Speed
|
|
(...) I wasn't aware of this firmware limitation. I could not duplicate it when using the ROBOTC firmware. I've done three different test runs of 500K messages each with perfect results each time. Each test run used a different sensor. The delay (...) (17 years ago, 5-Sep-07, to lugnet.robotics.nxt)
|
|
| | Re: Ooops! NXT Software Comparison correction / I2C Messaging Speed
|
|
Hi Dick, (...) actually I2C runs at something close to 12kHz in the LEGO firmware (I forgot the exact value). Jürgen (17 years ago, 5-Sep-07, to lugnet.robotics.nxt)
|
|
| | Re: Ooops! NXT Software Comparison correction / I2C Messaging Speed
|
|
(...) The errors that occur are that the sensor does not properly report variable distances as it is positioned at varying distances from an obstacle. If you slow down the read rate then it works correctly (i.e., with a wait of ~15 ms between read (...) (17 years ago, 5-Sep-07, to lugnet.robotics.nxt)
|
|
| | Re: Ooops! NXT Software Comparison correction / I2C Messaging Speed
|
|
(...) I think I understand. In this case, the limiting factor is the US sensor itself, how fast it can ing and interprete a return. Or from my standpoint (a physicist), it's a fundemental limitation of the physics of sound, not a limitation that has (...) (17 years ago, 5-Sep-07, to lugnet.robotics.nxt)
|
|
| | RE: Ooops! NXT Software Comparison correction / I2C Messaging Speed
|
|
(...) Nobody cheated or is dishonest. Everyone who writes firmware for the NXT is well-intentioned "good" people. Let's not mislabel good modern programming practice -- i.e. hardware device drivers integrated into the low-level firmware -- as (...) (17 years ago, 6-Sep-07, to lugnet.robotics.nxt)
|
|
| | RE: Ooops! NXT Software Comparison correction
|
|
(...) After tuning, NBC achieved 73K test cycles. It achieved these great results by setting the task "priority" to 200. Unfortunately, unless the NXT-G task scheduler has been rewritten, these results might be a little too high. A NXT-G task (or (...) (17 years ago, 6-Sep-07, to lugnet.robotics.nxt)
|
|
| | RE: Ooops! NXT Software Comparison correction / I2C Messaging Speed
|
|
(...) I want to list both. First, the one-to-one mapping, and second (with some explanation) the code with a second task. Several other pieces of software have an "optimized" version of code, and it makes sense to do the same for NBC. Steve (17 years ago, 6-Sep-07, to lugnet.robotics.nxt)
|
|
| | Ultrasonic Sensor iS "Slow"
|
|
Original Thread title was "Re: Ooops! NXT Software Comparison correction / I2C Messaging Speed". I've renamed as worth a separate thread. (...) You're right!! If you poll the sensor too fast, it definitely reports wrong distances. I'm doing some (...) (17 years ago, 7-Sep-07, to lugnet.robotics.nxt)
|
|
| | Re: Ultrasonic Sensor iS "Slow"
|
|
(...) The 15 ms that John reported is the time it takes for a sound pulse to travel 500 mm, the round trip distance at the maximum advertised range of the US sensor. An interesting coincidence? Roger Glassey (17 years ago, 11-Sep-07, to lugnet.robotics.nxt)
|