Code covered by the BSD License  

Highlights from
VU-LEGO Real Time Target

5.0

5.0 | 15 ratings Rate this file 26 Downloads (last 30 days) File Size: 1.42 MB File ID: #29857
image thumbnail

VU-LEGO Real Time Target

by

 

30 Dec 2010 (Updated )

A user-friendly Blockset for embedding real time Simulink designs on the LEGO Mindstorms NXT brick.

| Watch this File

File Information
Description

The Villanova University LEGO Real Time Target (VU-LRT) enables rapid implementation of Simulink-based designs on the LEGO Mindstorms NXT platform. It is similar in aim to the Embedded Coder Robot (ECRobot) package by Takashi Chikamasa, but is more consistent with the Real Time Workshop development pathway, and is less constrained by ECRobot's function call / data store architecture. An automated installer is shipped with VU-LRT - see the README.pdf in the download. Examples include motor speed control, a line-following robot, and a re-implementation of the NXTway-GS self-balancing two-wheeled robot.

***NOTE***
VU-LRT was developed as an NSF and MathWorks funded project aimed at exploiting Simulink code generation tools and low-cost hardware platforms, (such as the LEGO MindStorms NXT), for educational purposes. In R2012a, the MathWorks added code generation capabilities to core Simulink without the need for additional toolboxes thereby providing a more cost-effective solution for bringing rapid prototyping into the classroom. The MathWorks also provided a free LEGO MindStorms NXT Target support package which delivers similar functionality to VU-LRT, but which is now professionally supported by the MathWorks. As a result, VU-LRT will no longer be actively maintained after the R2011b release and the authors will be transitioning their own courses to the new R2012a Simulink and MathWorks LEGO MindStorms NXT Target support package. The authors wish to thank the many enthusiastic supporters of VU-LRT who have developed so many creative projects with VU-LRT. We hope and expect that this creativity will continue to expand and flourish using the new MathWorks tools that have become available.

Acknowledgements

Embedded Coder Robot Nxt Demo, Ec Robot Installer – Simplified Installation Of Tools For Embedded Coder Robot, and Nx Tway Gs (Self Balancing Two Wheeled Robot) Controller Design inspired this file.

Required Products Simulink Coder
MATLAB release MATLAB 7.10 (R2010a)
Other requirements Windows XP or Windows 7; Bluetooth 2.0 adapter (eg. D-Link DBT-120 C); LEGO® Mindstorms NXT kit; A collection of related third party tools / products are also installed automatically by the installer program included in the VU-LRT distribution
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (22)
14 Nov 2013 Shivanand

Hello Guys!
I am using this toolbox.
I could recieve the data in the form of packets.
i need to save the time, to check the data recieved is being lost or not.
I tried with different simulink block but i couldnt.
Please tell me how to model the timer/clock in simulink model which will be installed on NXT and should give the data along with the time.

24 Jan 2013 Sean

I use Windows 7 64bit an MATLAB 2012a 32bit.
when I build an example model, I get the following output:
Warning: Inputs must be character arrays or cell arrays of strings.
### Wrapping unrecognized make command (angle brackets added)
### <>
### in default batch file
### Creating VU_testSoundTone1.mk from C:\RTtools\VU-LRT\lrt_ecrobot.tmf
### Compiled for Lego NXT successfully.
### Configuring generated makefile for cygwin...
### Writing VU_testSoundTone1.oil....
### VU_testSoundTone1.oil written successfully!
### Writing ecrobot_hooks.h...
### Cleaning up make directory...
/cygdrive/c/RTtools/nxtOSEK/ecrobot/ecrobot.mak:268: *** multiple target patterns. Stop.

13 May 2012 James Peyton Jones

Diego: Thanks for your positive feedback. I'm afraid the Fantom driver is fundamentally 32-bit, so the mexusb code will not compile for a 64-bit platform, (see the notes in the ReadMe file, Section 3). In general, feel free to email me directly for any support issues, or if you'd like to discuss this further. James.

11 May 2012 Diego

This tool is a really nice tool. Congratulations!. However I have some problems regarding the tool with Windows 64 bits.
I took the example "VU_testUsbTxRx". I can compile from simulink, I know that for communicating the data from USB port, I have to use the .m file "VU_testUsbRxTx.m". However it gives me the error:

"Undefined function or method 'mexusb' for input arguments of type 'char'."

I know that the function mexusb.c which is in the private directory of the nxtusb directory is there, but it is already compile in a 32 bits platform. I examined the intaller file and this file only renames the file "mexusb.c" to "mexusb.mexw32", that means that "mexusb.c" is already a compiled version. I would like to know if a can have the original file in order to compile it in the 64 bits platform. With this, I will obtain a "mexusb.mexw64" file and I will be able to read from USB port.

Thanks for everything!

26 Feb 2012 David

First of all I want to congratulate you. This is the best blockset you can use to develop your projects with lego nxt.
Secondly I would like to know if you are going to port this blockset to linux/unix. I think many people would be very grateful to you if you make the linux/unix version. I think it can't be very difficult since the compiler is GNU ARM Compiler and you have to use Cygwin.

12 Dec 2011 Michael Smith

I've done a few builds now with this blockset and software without any difficulties. I downloaded this hoping I would be able to take full advantage of the greater freedom of programming offered in the Simulink and Stateflow environment over the software supplied with the NXT. It definitely met all my expectations. My son's science tutor was very interested in these tools in order to bring NXT programming to a higher level for her older students.

Thanks for the great work!

23 Nov 2011 Guillaume MARTIN

Thank you very much for this work.

The install(1) seems to works fine.

But I have problems in "Step 3" :
- When I do "Installer(6)", I have to choose between lms_arm_nbcnxc_107.rfw and lms_arm_nbcnxc_128.rfw . Whitch one do I have to choose ?
- I choosed the 128 one to try. How can I see if the new firmware is correctly installed with "install(6)" ? My Lego doesn't give me any sign of life during the download !

I have problem in "Step 4" too :
When I try an installer(7), I want to give the name "HELLO", but the response is :
...Did not appear to rename correctly:

Thank you for your help,
Guillaume Martin

25 Oct 2011 Paul

This is a great tool for teaching control systems.

I just miss one feature. Is there a possibility to log/monitor data from the brick and send it to a host pc by usb connection? For example to monitor the angle of the NXTway-GS with the HT-sensor. Not in realtime of course.

11 Oct 2011 L

This is an invaluable tool for anyone who wants to run Simulink models on the Lego Mindstorms NXT system. The underlying code of the VU-LRT blockset is certainly more straightforward and intuitive than the ECRobot blockset on which it is based. Hopefully, its development will continue well into the future.

27 Sep 2011 Ye Cheng  
23 Sep 2011 Bradley

Great start on a great tool. Need more on the USB and BT Interface blocks and would be nice to have the Magnetic Compass Sensor block (also from HiTechnic). I will be using this in the classroom to teach my students about spacecraft control.

13 Apr 2011 Chin-Wen Chuang

It seems to be aa great tool for NXT training. However, when I built the model, it alway show the below message
### Writing ecrobot_hooks.h...
make: *** No rule to make target `and'. Stop.
Then, stop the building procedure. Could you advise me, please?

01 Apr 2011 Stephen Williams  
28 Mar 2011 Robi

It's a great tool for nxt!
Is there possibility to add RS485 RX/TX and I2C blocks in the future?

15 Mar 2011 Richard Primerano

This is a very nice tool for anyone interested in learning Matlab/Simulink or looking for an alternative to Lego's graphical environment.

I have looked at several other alternatives for programming the NXT (in C, Java, and Matlab), and this has been the simplest to use. This package also gives you access to many of Matlab's existing toolboxes and blocksets which is a significant advantage over other alternatives.

07 Mar 2011 Frank DiJoseph

This package is well put together. The installer greatly simplifies the setup process which is depedent upon several third-party tools. The package includes some simple examples to help verify your setup. The VU-LRT implementation is much simpler to use than other parties versions.

05 Mar 2011 Yogesh

An excellent toolset for people who want to implement and learn control system algorithms using NXT.

27 Feb 2011 Bogdan  
26 Jan 2011 James Peyton Jones

Michael: The current version of VU-LRT assumes installation on the C: drive, and installation on another drive may cause this problem. We will try to remove any such assumptions in the next version, but for now please install VU-LRT on the C: drive. In general, feel free to contact me directly for support issues.

26 Jan 2011 Michael Hubatka  
20 Jan 2011 Michael Hubatka

I was very happy to read about this project. I downloaded the installer and successfully installed all the tools. But when I build an example model, I get the following output:

### Processing Template Makefile: D:\VU_LRT\lrt_ecrobot.tmf
Warning: Inputs must be character arrays or cell arrays of strings.
### Wrapping unrecognized make command (angle brackets added)
### <>
### in default batch file
### Creating VU_testSoundTone2.mk from D:\VU_LRT\lrt_ecrobot.tmf
### Compiled for Lego NXT successfully.
### Configuring generated makefile for cygwin...
### Writing VU_testSoundTone2.oil....
### VU_testSoundTone2.oil written successfully!
### Writing ecrobot_hooks.h...
/cygdrive/c/RTtargets/nxtOSEK/ecrobot/ecrobot.mak:268: *** multiple target patterns. Stop.

I use Windows 7 64bit an MATLAB 2011b 32bit.

Any suggestion?

05 Jan 2011 Gautam Vallabha  
Updates
23 Feb 2011

Minor bug fixes; Installer enhancements; Additional ADC and PWM blocks; NXTway example.

09 Nov 2011

Version 1.02 includes additional blocks, improved support and documentation for USB and Bluetooth communications, improved installation, and additional examples.

23 Apr 2012

The Project Description was updated to point new users to the the free MathWorks LEGO MindStorms NXT Target support package.

Contact us