4.5625

4.6 | 17 ratings Rate this file 481 downloads (last 30 days) File Size: 6.43 MB File ID: #13399

Embedded Coder Robot NXT Demo

by Takashi Chikamasa

 

15 Dec 2006 (Updated 14 Oct 2009)

Code covered by the BSD License  

Offers an enjoyable Model-Based Design experience using Simulink models with Lego robots

Download Now | Watch this File

File Information
Description

- This demo supports R2006a -> R2009b
Simulink plant and controller models are used with LEGO's latest high-tech robot (ARM-based LEGO Mindstorms NXT) to illustrate industrial application of Model-Based Design with Production Code Generation. Take note of the model architecture and component definition, as well as, use of fixed- and floating-point designs.

This demo includes three examples:
 Maze walking tricycle robot
 Line tracing tricycle robot
 Self balancing bi-wheeled robot
 NXT Remocon demo

In each example, you can simulate the robot on your personally designed bmp track with 3D virtual reality.

** A simplified EC Robot NXT installer is available now!
http://www.mathworks.com/matlabcentral/fileexchange/25207

** To learn more about EC Robot NXT, check it out now!
http://www.mathworks.com/products/demos/rtw/lego/

** For additional lego robot demos and capabilities with MATLAB and Simulink, see: http://www.mathworks.com/programs/mindstorms/

<Disclaimer>
LEGO(R) is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this demo.
LEGO(R) and Mindstorms(R) are registered trademarks of The LEGO Group.

Acknowledgements

The author wishes to acknowledge the following in the creation of this submission:
NXTway-GS (Self-Balancing Two-Wheeled Robot) Controller Design
This submission has inspired the following:
NXT SCARA (Two-Link Planar Robot Arm) Controller Design, NXT Ballbot (Self-Balancing Robot On A Ball) Controller Design, NXTway-GS (Self-Balancing Two-Wheeled Robot) Controller Design, NXT Scanner with Lego Mindstorms NXT, ECRobotInstaller – Simplified installation of tools for Embedded Coder Robot

Required Products Real-Time Workshop
Real-Time Workshop Embedded Coder
Simulink
MATLAB release MATLAB 7.2 (R2006a)
Other requirements Works with R2006a - R2009b
Zip File Content  
Other Files
ecrobotNXT/docs/Embedded Coder Robot NXT Tips En.pdf,
ecrobotNXT/ECRobot Installation Instructions.pdf,
ecrobotNXT/ecrobotnxtsetup.m,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Parameter/CustomRTWInfo_Parameter.p,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Parameter/CustomStorageClassListener.p,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Parameter/NXT_CustomRTWInfo_Parameter_Constructor.p,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Parameter/schema.p,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Signal/CustomRTWInfo_Signal.p,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Signal/CustomStorageClassListener.p,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Signal/NXT_CustomRTWInfo_Signal_Constructor.p,
ecrobotNXT/environment/@NXT/@CustomRTWInfo_Signal/schema.p,
ecrobotNXT/environment/@NXT/@Signal/NXT_Signal_Constructor.p,
ecrobotNXT/environment/@NXT/@Signal/schema.p,
ecrobotNXT/environment/@NXT/@Signal/Signal.p,
ecrobotNXT/environment/@NXT/csc_registration.m,
ecrobotNXT/environment/@NXT/packagedefn.mat,
ecrobotNXT/environment/@NXT/schema.p,
ecrobotNXT/environment/@NXT/tlc/FlatStructure.tlc,
ecrobotNXT/environment/@NXT/tlc/NXTGetSet.tlc,
ecrobotNXT/environment/@NXT/tlc/Unstructured.tlc,
ecrobotNXT/environment/@nxtusb/close.m,
ecrobotNXT/environment/@nxtusb/delete.m,
ecrobotNXT/environment/@nxtusb/display.m,
ecrobotNXT/environment/@nxtusb/get.m,
ecrobotNXT/environment/@nxtusb/nxtusb.m,
ecrobotNXT/environment/@nxtusb/open.m,
ecrobotNXT/environment/@nxtusb/private/mexusb.mexw32,
ecrobotNXT/environment/@nxtusb/read.m,
ecrobotNXT/environment/@nxtusb/set.m,
ecrobotNXT/environment/@nxtusb/subsasgn.m,
ecrobotNXT/environment/@nxtusb/subsref.m,
ecrobotNXT/environment/@nxtusb/write.m,
ecrobotNXT/environment/@w32serial/display.m,
ecrobotNXT/environment/@w32serial/fclose.m,
ecrobotNXT/environment/@w32serial/fopen.m,
ecrobotNXT/environment/@w32serial/fread.m,
ecrobotNXT/environment/@w32serial/fwrite.m,
ecrobotNXT/environment/@w32serial/get.m,
ecrobotNXT/environment/@w32serial/private/communicate.c,
ecrobotNXT/environment/@w32serial/private/communicate.h,
ecrobotNXT/environment/@w32serial/private/communicate.m,
ecrobotNXT/environment/@w32serial/private/communicate.mexw32,
ecrobotNXT/environment/@w32serial/private/commutil.c,
ecrobotNXT/environment/@w32serial/private/make_mex.m,
ecrobotNXT/environment/@w32serial/readme.txt,
ecrobotNXT/environment/@w32serial/set.m,
ecrobotNXT/environment/@w32serial/subsasgn.m,
ecrobotNXT/environment/@w32serial/subsref.m,
ecrobotNXT/environment/@w32serial/w32serial.m,
ecrobotNXT/environment/AnalogGamePad.jpg,
ecrobotNXT/environment/BATTERY_VOLTAGE.gif,
ecrobotNXT/environment/BEEP.JPG,
ecrobotNXT/environment/BLUETOOTH.jpg,
ecrobotNXT/environment/clearNXTSignalObjects.m,
ecrobotNXT/environment/ColorSensor.jpeg,
ecrobotNXT/environment/createNXTSignalObject.m,
ecrobotNXT/environment/ecrobot_nxt_lib.mdl,
ecrobotNXT/environment/ENTER_BUTTON.JPG,
ecrobotNXT/environment/HiTechnicSensor.jpg,
ecrobotNXT/environment/InitAccessorBlock.m,
ecrobotNXT/environment/InitDeviceSFunBlock.m,
ecrobotNXT/environment/InitInterfaceBlock.m,
ecrobotNXT/environment/joystick_ctrl.JPG,
ecrobotNXT/environment/LIGHT_SENSOR.gif,
ecrobotNXT/environment/mtlb.wav,
ecrobotNXT/environment/NXT_ICON.gif,
ecrobotNXT/environment/nxtbuild.m,
ecrobotNXT/environment/nxtconfig.m,
ecrobotNXT/environment/private/iConvAbsPath2CygPath.m,
ecrobotNXT/environment/private/iGenerateBuildBat.m,
ecrobotNXT/environment/private/iGenerateCommand.m,
ecrobotNXT/environment/private/iGenerateMakefile.m,
ecrobotNXT/environment/private/iGenerateSchedulerFiles.m,
ecrobotNXT/environment/private/iGetAccelerationBlockPortID.m,
ecrobotNXT/environment/private/iGetBluetoothDeviceAddress.m,
ecrobotNXT/environment/private/iGetBluetoothDeviceMode.m,
ecrobotNXT/environment/private/iGetColorSensorBlockPortID.m,
ecrobotNXT/environment/private/iGetCYGWIN_BIN.m,
ecrobotNXT/environment/private/iGetExportedFcnCallsScheduler.m,
ecrobotNXT/environment/private/iGetFunctionName.m,
ecrobotNXT/environment/private/iGetFunctionSource.m,
ecrobotNXT/environment/private/iGetGNUARM_ROOT.m,
ecrobotNXT/environment/private/iGetIntegerLibsrcFiles.m,
ecrobotNXT/environment/private/iGetIRSeekerBlockPortID.m,
ecrobotNXT/environment/private/iGetJSPSemaphore.m,
ecrobotNXT/environment/private/iGetLibsrcFiles.m,
ecrobotNXT/environment/private/iGetNEXTTOOL_ROOT.m,
ecrobotNXT/environment/private/iGetNumOfPeriodicalTasks.m,
ecrobotNXT/environment/private/iGetOSEKResource.m,
ecrobotNXT/environment/private/iGetOSEKResourcesForOIL.m,
ecrobotNXT/environment/private/iGetPlatform.m,
ecrobotNXT/environment/private/iGetPlatformFolderName.m,
ecrobotNXT/environment/private/iGetRTWECGenCfiles.m,
ecrobotNXT/environment/private/iGetTaskStackSize.m,
ecrobotNXT/environment/private/iGetWavFileNames.m,
ecrobotNXT/environment/private/iHasBluetoothBlock.m,
ecrobotNXT/environment/private/iHasNXTGamePadADCDataLoggerBlock.m,
ecrobotNXT/environment/private/iHasSoundWavWriteBlock.m,
ecrobotNXT/environment/private/iHasUSBBlock.m,
ecrobotNXT/environment/private/iWriteECRobotCFG.m,
ecrobotNXT/environment/private/iWriteECRobotDeviceInitialize.m,
ecrobotNXT/environment/private/iWriteECRobotDeviceTerminate.m,
ecrobotNXT/environment/private/iWriteECRobotExternalInterfaceH.m,
ecrobotNXT/environment/private/iWriteECRobotMainForJSP.m,
ecrobotNXT/environment/private/iWriteECRobotMainForOSEK.m,
ecrobotNXT/environment/private/iWriteECRobotMainH.m,
ecrobotNXT/environment/private/iWriteECRobotOIL.m,
ecrobotNXT/environment/private/iWriteFunctionHeader.m,
ecrobotNXT/environment/private/iWriteNXTDefinitionForOSEK.m,
ecrobotNXT/environment/private/iWriteNXTFooter.m,
ecrobotNXT/environment/private/iWriteNXTFunctionDescription.m,
ecrobotNXT/environment/private/iWriteNXTHeader.m,
ecrobotNXT/environment/private/iWriteNXTInclude.m,
ecrobotNXT/environment/private/iWriteWavDataDeclarations.m,
ecrobotNXT/environment/private/iWriteXCP_PAR.m,
ecrobotNXT/environment/ROTATION_SENSOR.gif,
ecrobotNXT/environment/RUN_BUTTON.JPG,
ecrobotNXT/environment/SERVO_MOTOR.gif,
ecrobotNXT/environment/set_fcncallname.m,
ecrobotNXT/environment/sfun_acceleration_sensor.c,
ecrobotNXT/environment/sfun_acceleration_sensor.mexw32,
ecrobotNXT/environment/sfun_acceleration_sensor.tlc,
ecrobotNXT/environment/sfun_bt_rx.c,
ecrobotNXT/environment/sfun_bt_rx.mexw32,
ecrobotNXT/environment/sfun_bt_rx.tlc,
ecrobotNXT/environment/sfun_bt_tx.c,
ecrobotNXT/environment/sfun_bt_tx.mexw32,
ecrobotNXT/environment/sfun_bt_tx.tlc,
ecrobotNXT/environment/sfun_color_sensor.c,
ecrobotNXT/environment/sfun_color_sensor.mexw32,
ecrobotNXT/environment/sfun_color_sensor.tlc,
ecrobotNXT/environment/sfun_expfcncallsscheduler.c,
ecrobotNXT/environment/sfun_expfcncallsscheduler.mexw32,
ecrobotNXT/environment/sfun_gamepad_datalogger.c,
ecrobotNXT/environment/sfun_gamepad_datalogger.mexw32,
ecrobotNXT/environment/sfun_gamepad_datalogger.tlc,
ecrobotNXT/environment/sfun_ir_seeker.c,
ecrobotNXT/environment/sfun_ir_seeker.mexw32,
ecrobotNXT/environment/sfun_ir_seeker.tlc,
ecrobotNXT/environment/sfun_soundtone.c,
ecrobotNXT/environment/sfun_soundtone.mexw32,
ecrobotNXT/environment/sfun_soundtone.tlc,
ecrobotNXT/environment/sfun_soundvoltone.c,
ecrobotNXT/environment/sfun_soundvoltone.mexw32,
ecrobotNXT/environment/sfun_soundvoltone.tlc,
ecrobotNXT/environment/sfun_usb_disconnect.c,
ecrobotNXT/environment/sfun_usb_disconnect.mexw32,
ecrobotNXT/environment/sfun_usb_disconnect.tlc,
ecrobotNXT/environment/sfun_usb_rx.c,
ecrobotNXT/environment/sfun_usb_rx.mexw32,
ecrobotNXT/environment/sfun_usb_rx.tlc,
ecrobotNXT/environment/sfun_usb_tx.c,
ecrobotNXT/environment/sfun_usb_tx.mexw32,
ecrobotNXT/environment/sfun_usb_tx.tlc,
ecrobotNXT/environment/sfunxymap2.m,
ecrobotNXT/environment/slblocks.m,
ecrobotNXT/environment/SONIC_SENSOR.gif,
ecrobotNXT/environment/SOUND_SENSOR.gif,
ecrobotNXT/environment/steeringwheel_ctrl.JPG,
ecrobotNXT/environment/SYSTEM_CLOCK.GIF,
ecrobotNXT/environment/TOUCH_SENSOR.gif,
ecrobotNXT/environment/track_template.bmp,
ecrobotNXT/environment/track_template.wrl,
ecrobotNXT/environment/usb1394_02_l.jpg,
ecrobotNXT/environment/usb1394_02_r.jpg,
ecrobotNXT/environment/writenxtdisplay.m,
ecrobotNXT/environment/writevrtrack.m,
ecrobotNXT/nxt2nxt/master_ctrl.mdl,
ecrobotNXT/nxt2nxt/nxt2nxt.mdl,
ecrobotNXT/nxt2nxt/slave_ctrl.mdl,
ecrobotNXT/nxtmouse/nxtmouse.mdl,
ecrobotNXT/nxtmouse/nxtmouse_ctrl.mdl,
ecrobotNXT/nxtmouse/param.m,
ecrobotNXT/nxtmouse/track.bmp,
ecrobotNXT/nxtmouse/track.wrl,
ecrobotNXT/nxtmouse/vrnxtcartrack.wrl,
ecrobotNXT/nxtracer/nxtracer.mdl,
ecrobotNXT/nxtracer/nxtracer_ctrl.mdl,
ecrobotNXT/nxtracer/param.m,
ecrobotNXT/nxtracer/track.bmp,
ecrobotNXT/nxtracer/track.wrl,
ecrobotNXT/nxtracer/vrnxtcartrack.wrl,
ecrobotNXT/nxtremocon/joystick_ctrl.mdl,
ecrobotNXT/nxtremocon/load_logdata.m,
ecrobotNXT/nxtremocon/logging_data.csv,
ecrobotNXT/nxtremocon/SoundList.m,
ecrobotNXT/nxtremocon/steeringwheel_ctrl.mdl,
ecrobotNXT/nxtway/nxtway.mdl,
ecrobotNXT/nxtway/nxtway_ctrl.mdl,
ecrobotNXT/nxtway/NXTwayBluetoothRead.m,
ecrobotNXT/nxtway/param.m,
ecrobotNXT/nxtway/track.bmp,
ecrobotNXT/nxtway/track.wrl,
ecrobotNXT/nxtway/type1_servo.m,
ecrobotNXT/nxtway/vrnxtwaytrack.wrl,
ecrobotNXT/samples/BluetoothRead.m,
ecrobotNXT/samples/BluetoothWrite.m,
ecrobotNXT/samples/FrequencyList.m,
ecrobotNXT/samples/TestBluetoothRx.mdl,
ecrobotNXT/samples/TestBluetoothTx.mdl,
ecrobotNXT/samples/TestFloatingPoint.mdl,
ecrobotNXT/samples/TestHiTechnicColorSensor.mdl,
ecrobotNXT/samples/TestHiTechnicCompassSensor.mdl,
ecrobotNXT/samples/TestHiTechnicIRSeeker.mdl,
ecrobotNXT/samples/TestHiTechnicSensors.mdl,
ecrobotNXT/samples/TestMotorJSP.mdl,
ecrobotNXT/samples/TestMotorOSEK.mdl,
ecrobotNXT/samples/TestNXTGamePad.mdl,
ecrobotNXT/samples/TestSoundTone.mdl,
ecrobotNXT/samples/TestSoundWAV.mdl,
ecrobotNXT/samples/TestUltrasonicSensor.mdl,
ecrobotNXT/samples/TestUSB_Rx.mdl,
ecrobotNXT/samples/TestUSB_Tx.mdl,
ecrobotNXT/samples/USBread.m,
ecrobotNXT/samples/USBreadColorSensor.m,
ecrobotNXT/samples/USBreadCompassSensor.m,
ecrobotNXT/samples/USBreadIRSeeker.m,
ecrobotNXT/samples/USBwrite.m,
license.txt
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (20)
16 Mar 2007 hamed nozari  
21 Mar 2007 Kin Fung Chu

good

25 Mar 2007 Warden Wei  
31 Mar 2007 ilan zohar

Excelnt job. Wait for the nxt version for bluetooth support and genric I2C.

20 Oct 2007 Vicente Parra

Wonderful tool. This allows we researchers to devote the short spare time we have to support mindstrom based activities for children, which otherwise would rather imposible ro do.

22 Oct 2007 Takashi Chikamasa

For more detailed info about Embedded Coder Robot NXT, check http://lejos-osek.sourceforge.net/ecrobot_nxt.htm

27 Oct 2007 Sina ferdowsi

thast very good
Kind Regards

30 Oct 2007 pezeshki zahra

i want information about robot for my programming

04 Jan 2008 Fatih Can  
05 Feb 2008 Yasuhiko Matoba  
11 Feb 2008 Shein-Yung Cheng  
17 Feb 2008 D kiven  
27 Feb 2008 Nabhiraj Yalagoud  
27 Feb 2008 Nabhiraj Yalagoud

very good

10 Mar 2008 Ali Hamouda Ali  
10 Mar 2008 Ali Hamouda Ali

nural net and feature extraction

17 Mar 2008 Anas Obeidat

it's Excellent Simulation to NXT robot, but we need a good manual, to explain all circuit components, and how we can develop more demos

29 Jul 2008 aditya jha

very good

01 Oct 2008 eugenio marino  
05 Mar 2009 Syed Noman

v goooooooooddd

Please login to add a comment or rating.
Updates
27 Mar 2007

## Rev.200 02/28/2007. Support for Real-Time Workshop Embedded Coder deployment to ATMEL AT91SAM7S256 in the NXT (no Bluetooth/USB support)
## Rev.202 26/03/2007 Updated LEJOS NXJ to 0.2alpha

29 May 2007

06/01/2007
- Integrated LEJOS OSEK RTOS
- Support Bluetooth for target deployment
- Obsolete Keyboard Input block

30 May 2007

Fixed format issues with PDF document.

10 Sep 2007

What's new in ECRobot NXT V3.03 is:
- Support MATLAB R2006a to R2007b, including model reference normal mode
- Support floating-point code generation (fixed-point is already supported)
- Added Bluetooth data logging feature

21 Nov 2007

- Added support for HiTechnic Acceleration and Gyro Sensors, which are useful for control engineers.

26 Nov 2007

- reposting v3.04 since didn't update.

04 Feb 2008

What's new in V3.05:
- Supports NXT to NXT Bluetooth communication (nxt2nxt demo is available)
- Supports Sound Tone blocks
- Refactored ECRobot NXT customizations

10 Mar 2008

V3.06 New Features:
- Supports R2006 -> R2008a
- Uses LEGO standard USB driver (fantom.sys) instead of ATMEL SAM-BA
- New NXT Remocon demo, similar to Nintendo Wiimote remote control with sound
- Updated docs

09 Apr 2008

what's new in V3.10:
- ecrobotnxtsetup.m enables users to easily establish path settings via GUI.
- Support for LEJOS OSEK 2.0 application flash (over 200Kbytes Flash and ~50Kbytes SRAM are available for user application)

11 Jun 2008

CRobot NXT v3.12:
- Support for enhanced NXT standard firmware (so So ECRobot NXT can be used without replacing firmware.)
- Support for nxtOSEK v2.02

14 Oct 2009

Updated Description.

Tag Activity for this File
Tag Applied By Date/Time
control design Takashi Chikamasa 16 Oct 2009 09:30:35
embedded code Takashi Chikamasa 16 Oct 2009 09:30:36
simulink Takashi Chikamasa 16 Oct 2009 09:30:36
simulation Takashi Chikamasa 16 Oct 2009 09:30:36
lego mindstorms Gautam Vallabha 18 Jan 2010 10:26:28
embedded code Gautam Vallabha 18 Jan 2010 10:26:28
ecrobot Gautam Vallabha 18 Jan 2010 10:26:28
lego mindstorms nxt Gautam Vallabha 18 Jan 2010 10:26:28
modelbased design Gautam Vallabha 18 Jan 2010 10:26:28
nxt Gautam Vallabha 18 Jan 2010 10:26:28
project based learning Gautam Vallabha 18 Jan 2010 10:26:28
realtime workshop Gautam Vallabha 18 Jan 2010 10:26:28
robot Gautam Vallabha 18 Jan 2010 10:26:28
 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com