Remote launching programs
Sunday, May 11th, 2008As many of you know NXT-G is built upon LabView. This means that everything possible with LabView and the NXTToolkit can be encapsulated into an NXT-G block. Doing so, however, is usually hard work (especially if you want to do it right, i.e. have good control panel and icon drawing interface).
Here’s a project in progress. A few weeks ago I looked into the internal of the toolkit VI ‘Write Message’ which send BT string from master to slave devices and vise versa:

when you go deep into the internal codes (here’s one good use for the NXTToolkit. Unlike regular NXT-G implementation VIs these VIs are not password protected!) you find that for master BT devices the message string is converted into a ‘BT packet’ by this code fragment:

As some may recognize, this is a Direct Command message format. The 0×80 0×09 start means BT Write Message telegram w/o reply (unfortunatly the master BT can’t request reply, since the firmware does not support it. If it could, there’ve been many more possible uses for the kind of “trick” I show here). It then adds the mailbox, the message length and the message itself. All this is converted into a byte array and sent over BT using a VI called ‘BT Write Buffer’ (not shown).
Having seen this, I started thinking - what if I send other Direct Command telegrams from the master NXT to a slave NXT? As I said earlier, only non-reply telegrams are possible. Among the possible telegrams is the ‘Run Program’ command (0×00 command). Indeed, if I have a program called ‘remote’ on the slave NXT running the following code on a master NXT executes ‘remote’:

As I said in the beginning, this can be cast into an NXT-G block which can either run a program by name on a connected NXT, or stop the current program (0×01 Direct Command). The question is - will it be useful for anything? I will be happy to get your feedback on this at this forum topic.
Guy Ziv
Posted in personal, news, software | Comments Off
Parsing GPS NMEA message
Tuesday, September 18th, 2007
After few hours of LabView coding, I finally made an NXT code (see larger image here) that can parse NMEA (GPS) $GPGGA message (i.e. GPS fix data). I thank Dick Swan for his RobotC code which inspired the algorithm. Timing tests show that the NXT using firmware 1.05 runs this code in around 92 milisecond. This would be good enough for update rates of few Hz.
Next I plan to design the NXT-G block for BT GPS. I was thinking of a block with two ‘action’ options - ‘update’ and ‘read’. The former delays the program till it reads a BT buffer (or a timeout occurs), and tries to parse the new NMEA message. It returns a Yes/No output which say if it was successful (so one can make a ‘Wait for’ block until a successful GPS data is read). Once a good data is read it is stored in a ‘global’ data holder. The later option ‘read’ returns the last stored value of lat. and long. position (maybe only seconds part?), #satellites and altitude. In this mode you can define a waypoint (as GPS coordinates) and a distance cutoff (in meters) and the block returns a Yes/No value if it is closer then cutoff. It will also return the heading and distance to waypoint (so with a compass sensor you can steer your NXT to the waypoint). The basic use principle would be having one ‘update’ GPS Block in a loop on one sequence wire, and your running program with ‘read’ GPS Blocks on a second sequence wire.
Comments/suggestion? Please use this forums topic.
Posted in nxtasy, personal, projects, news | 2 Comments »
NXT-G and GPS - closer than ever?
Saturday, September 15th, 2007
I’ve been working on the issue of BT GPS connection for the past few days, ever since Antonio’s NXC code demonstrated that this is a possibility. In the LabView diagram above (click here for full resolution image) I show a preliminary step toward this goal. I’ve made VIs (i.e. the LabView term for blocks) that read an ASCII stream, and some prelimiary string parsing VIs. Since I have no BT GPS, I had my PC connect as the slave device, and wrote another LabView code that sends the NMEA-0183 formated string:
$GPGGA,023346.028,3604.1654,N,08655.7973,W,0,00,50.0,198.2,M,-31.6,M,0.0,0000*76\r\n
at specified intervals (e.g. each 1000 milisecond).
The resulting file stored on the NXT contains a long list of this message:
GPGGA,023346.028,3604.1654,N,08655.7973,W,0,00,50.0,198.2,M,-31.6,M,0.0,0000
GPGGA,023346.028,3604.1654,N,08655.7973,W,0,00,50.0,198.2,M,-31.6,M,0.0,0000
GPGGA,023346.028,3604.1654,N,08655.7973,W,0,00,50.0,198.2,M,-31.6,M,0.0,0000
GPGGA,023346.028,3604.1654,N,08655.7973,W,0,00,50.0,198.2,M,-31.6,M,0.0,0000
.
.
.
without any errors so far. From another test is seems that as I suspected the NXT ‘catch’ the GPS data correctly every 2-3 cycles of my “GPS” data stream.
What’s next? Parsing the GPGGA data, and making the NXT-G block around all this… Keep watching for it!
In the meantime, Antonio posted me an improved version of the code. He claims this code loses only 20% of the messages (compared to ~60% in mine, and his old code). You can download the new code here. I still need to figure out what makes the difference, and see how I can implement it in LabView…
Questions/comments - use this forum topic.
Guy Ziv
Posted in personal, news, hacking | No Comments »
Mindstorms Community Partners 2.0
Tuesday, July 31st, 2007As you all know, when the Mindstorms Developers Program (MDP) ended a year ago, LEGO chose 20 people as Mindstorms Community Partners (MCP). This year, they increased the number to 30 MCPs. I am privilaged to be accepted into the MCP 2.0 program which is starting nowadays. Of course, due to the prohibitive non-disclosure agreement (NDA) I just signed to join the MCP, I will not be able to say, well, almost anything about what surprises LEGO plans for mindstorms. However, I will continue posting public-domain NXT news as before. I will also continue review and moderate NXTasy forums, and pass on to LEGO your ideas and/or suggestions. Notice, however, that due to the above-mentioned NDA I cannot tell you if LEGO accept/appreciate/disregards anything you propose….
Yours,
Guy Ziv
NXTasy.org Editor
Posted in nxtasy, personal, news | No Comments »
NXT Radar - Part I
Saturday, May 12th, 2007
Here’s my latest project - a true NXT radar. The Sharp IR Distance sensor from mindsensors.com is mounted on a turntable on top of a mobile platform. The unique feature of this robot is that the sensor can be rotated infinitely, without tangling the cables, using a modified handset untangler.
A discussion topic is here. More details will appear soon…
Posted in personal, projects, news | 1 Comment »
NXT MazeRunner
Wednesday, March 21st, 2007 
Motivated by Mario Ferrari’s MazeRunner, I’ve built an NXT version of MazeRunner.
Enjoy the movie! (13Mb)
Guy Ziv
NXTasy.org
Posted in personal, projects, news | 7 Comments »
Fixed-Point NXT-G Block
Sunday, February 25th, 2007
As you all probably know, the NXT firmware does not have built-in support for non-integer numbers. I’ve built an NXT-G block which allows working with non-integers using “fixed-point” representation. I did not have time to thoroughly test and document the block as I plan to before an official release. If you like to get this block for testing and review email me guy@nxtasy.org.
UPDATE: Here’s a nice written review and code samples by Louise Dade.
Posted in personal, news, software | 32 Comments »
Omni Teaches Physics
Wednesday, December 27th, 2006
Ever since I saw Steve Hassenplug’s “Omni” (see also in NXTLOG), I wanted to make one of my own. Last week, I finally obtained enough wheels via Bricklink to make the three “omni-wheels” needed. Working on Omni, I soon realized that controlling the three motors is actually the toughest problem with this type of robotic motion. If you want Omni to move in any one direction, you should (in general) operate all three motors in varying speeds. The videos showing Omni in action suggest that Steve controlled each motor independently using a second NXT sending BT commands to the Omni NXT brick. I wanted to use my PSP-Nx PS2 Controller Block and maneuver Omni with a wireless PS2 controller. In this post, I’ll describe how this is done and how Omni can be used to teach students something on elementary rigid body kinematics.
Posted in personal, video, projects, news | 45 Comments »
A Tale of Two TriBots
Wednesday, December 6th, 2006
My local LEGO educational distributor (Robotec Technologies) asked me to create an interesting NXT demonstration for an NIDays exhibition. The end product was a 2 NXT demonstration using slightly modified TriBots which communicate via Bluetooth (BT) and using a combination of ultrasound (US), motor encoders and two HiTechnic compass sensors. The first TriBot finds and captures aluminum can, and then sends a message to the other TriBot, which in turn finds it, aligns the two iteratively by measuring azimuths using compass, and finally pass the can between the two. All programming was done using NXT-G.
A video of the whole process can be found here on YouTube. I’ll put more details and programs on NXTLOG soon.
Posted in personal, video, projects, news | 3 Comments »
Desert Ranger Building Instructions
Thursday, November 2nd, 2006
I’ve made building instructions for my Desert Ranger. You can find them in our repository /Projects page, or directly here.
Posted in personal, projects, news | 48 Comments »
Teaser on NXT Desert Ranger
Saturday, September 30th, 2006Here’s a first glance at my new “NXT Desert Ranger” creation. It’s a two seats jeep fully equipped with rear-wheels drive, GPS navigation, auto-pilot, dual-springs suspensions, mud shields, solar panels, seat belts, and two high-power top-mounted light projectors.
Click the picture for high-res. More details will follow…
Posted in personal, projects, news | 47 Comments »
Eric’s First Project
Monday, July 10th, 2006
After completing the Robo Center challenges and learning the capabilities of the NXT kit, I wanted to start working on my very first original project. I didn’t really have anything sketched out when I started mashing pieces together, but I knew I wanted a wheeled robot. Well, it ended up having wheels, but it also has a crawling motion to it. As this is just a skeleton, there is no sensor action as of yet, but it’s in the works.
Here’s a video of the prototype in action as it painfully struggles over carpet.
Posted in personal, video, projects | 88 Comments »
