本帖最后由 旭日东升 于 2012-6-15 10:51 编辑
Tips of ECRobot NXT
In this chapter, several tips related to ECRobot NXT are described.
How to design an original virtual track:
The virtual track in the ECRobot NXT demo is kind of a unique test harness for verifying the controller model. ECRobot NXT provides the features that a user can use to easily
design their own virtual track and test the robot. In nxtmouse/nxtrace/nxtway directories, there is a bit map file named track.bmp. track.bmp is the design source for the virtual track.
ECRobot NXT提示
在这一章中,介绍了有关ECRobot NXT的一些技巧。
如何设计一个原始的虚拟轨道:
在ECRobot NXT虚拟演示的轨道,是一种独特的测试工具用于验证控制器模型。 ECRobot NXT提供绘制虚拟跟踪轨迹的功能,用户可以用它来轻松地设计自己的虚拟跟踪
轨迹和测试机器人。在nxtmouse/ nxtrace/ nxtway目录中,有一名为track.bmp位图文件。 track.bmp是虚拟轨道设计源文件。
The following rules should be applied for the design of the virtual track: Size of the virtual track: 200 x 200 [pixels]
Save as monochrome 256 colored bit map file Black color represents line/ Gray color represents wall/ White color represents floor.
After designing the original virtual track and having saved it, then the MATLAB function that is called “writevrtrack” automatically generates VRML file (track.wrl) for simulation.
In the ECRobot demo models, annotation callbacks are used for updating virtual tracks. 虚拟赛道的设计,应遵从下列规则: 虚拟化轨道大小:200×200[像素] 保存为单色256色位图文件的黑颜色代表实线/灰色的颜色代表墙体/白颜色代表地面。 设计原始的虚拟轨迹线和保存设计后,然后在MATLAB功能,命令“writevrtrack”自动生成的VRML文件(track. WRL)仿真。在ECRobot演示模型通过注释回调用于
更新虚拟的轨道。
Why the robots cannot move smoothly: When you try the “Model-Based Design Experience” in the ECRobot demo, you may encounter some difficulties to control the robots as you expected
(e.g., robot can not move straight, simulation result are different for each simulation…). This behavior is intentionally designed in the robot plant models.
In general, control designs assume linearization of plant system, however, in the real world, any simple control system contains non-linear factors
that may cause problems in the real world control system. For example, the Servo Motor of LEGO Mindstorms NXT uses many gears to get high torque.
These gears are not precisely manufactured and assembled; therefore, this results in certain amount of mechanical backlash. In the Servo Motor plant model,
there is a backlash block to mimic this. Effects of backlash can be seen especially in NXTway demo. (The robot does not move like a typical inverted pendulum model) 为什么机器人不能平稳地移动: 当您尝试在ECRobot演示“基于模型的设计经验”,你可能会遇到一些困难,不同您预期的那样(如控制机器人,机器人不能直行,仿真的结果同每个仿真结果不同......)。
该行为是故意在被控对象机器人模型中设计。在一般情况下,控制被控对象系统假定为线性系统,然而,在现实世界中,任何简单控制系统包含非线性因素,
在现实中可能导致控制系统 出现问题。例如,LEGO MINDSTORMS NXT的伺服电机使用了许多齿轮,以获得高扭矩的齿轮。这些齿轮都不能精确地制造和组装,
因此,这样导致存在一定量的机械间隙。在伺服电机被控对象模式中,通过齿隙模块是模仿该模型。特别是在NXTway演示可以看出齿隙的影响。 (机器人不移动像典型的倒立摆模型)
Additionally, inside of the Robot_Mechanics Subsystem in the demo models, Servo Motor controls for the right and left wheels have random error at every simulation.
Therefore, the robot can not move straight. This is a common issue in the real hardware due to mechanical errors of motors, gears, wheels, and floor surfaces. 此外,在演示模型中,在机器人机械结构子系统内部,伺服电机控制左/右车轮里面在仿真时产生随机误差。因此机器人不能笔直移动。
这些通病由于真实硬件上马达的结构误差,及其齿轮,轮子和地面不确定因素导致。
Preserved signal identifiers for NXT device blocks: NXT设备模块预留保存好的信号标识符: NXT device blocks such as Light Sensor Interface… are masked Subsystems and inside of the Subsystems, Data Store Read/Write blocks are used.
The identifiers of the Data Store Read/Write blocks are automatically defined based on the input port configuration when updating model.
Therefore, the following preserved signal identifiers should not be used to avoid naming conflicts: NXT device | Preserved identifier | Light Sensor | LightSensor + S1/S2/S3/S4 | Touch Sensor | TouchSensor + S1/S2/S3/S4 | Sound Sensor | SoundSensor + S1/S2/S3/S4 | Ultrasonic Sensor | UltrasonicSensor + S1/S2/S3/S4 | Revolution Sensor | RevolutionSensor + A/B/C | Servo Motor | ServoMotor + A/B/C | Battery Voltage | BatteryVoltage | System Clock | SystemClock |
例如光传感器接口... 封装为NXT设备模块子系统和内部子系统,其中数据存储块用于读/写。当升级模型的时候,数据存储读/写模块的标识符完成基于输入端口的配置基础上的自动定义。
因此,以下保存的信号标识符不应该被使用,以避免命名冲突: NXT 设备 | 预保留标识符 | 光传感器 | LightSensor + S1/S2/S3/S4 | 接触传感器 | TouchSensor + S1/S2/S3/S4 | 声音传感器 | SoundSensor + S1/S2/S3/S4 | 超声波传感器 | UltrasonicSensor + S1/S2/S3/S4 | 旋转传感器 | RevolutionSensor + A/B/C | 伺服马达传感器 | ServoMotor + A/B/C | 电池电压 | BatteryVoltage | 系统时钟 | SystemClock |
How to upload an ECRobot NXT application program to the FLASH memory on the NXT: In the chapter of ECRobot NXT target deployment, the ECRobot NXT application program was uploaded to the RAM of AT91SAM7S256 on the NXT.
The uploaded application program on the RAM is gone once the NXT is turned off. ECRobot NXT also supports program upload to the FLASH memory of
AT91SAM7S256 on the NXT. However, it was not described in ECRobot NXT target deployment section due to several reasons.
The most important of these is that the lifecycle of the FLASH memory on the NXT is limited and uploading the program to the FLASH may cause a serious damage to the NXT,
therefore, an optional usage of “nxtbuild” M function exists but is not published. 如何上传ECRobot NXT应用程序到NXT的FLASH存储器上:在ECRobot NXT的目标发布章节,的ECRobot NXT应用程序上传到NXT的RAM AT91SAM7S256上。
一旦NXT被关闭了上传的应用程序上的RAM。 ECRobot的NXT还支持程序上传到NXT的AT91SAM7S256的FLASH存储器上。然而,由于几个原因,
它没有说明在ECRobot NXT的目标发布部分。其中最重要的是在NXT上的FLASH存储器的生命周期是有限的而上载程序到FLASH,可能会造成严重损害到NXT
,因此,存在可选的“nxtbuild”M函数功能,但没有公布。
How to design LEGO Mindstorms NXT 3-D models for Virtual Reality Toolbox: 如何通过虚拟现实工具箱完成LEGO Mindstorms NXT 3-D模型设计: Around LEGO and Mindstorms, many interesting tools and projects exist. Most of them are created by some voluntary people or open-source projects.
Thanks to the great help of the below tools, LEGO Mindstorms NXT 3-D virtual reality models in ECRobot NXT could be created. LDraw: LDraw is a huge 3-D LEGO brick library. LDraw library for Mindstorms NXT: Original creator of NXTway is also the author of LDraw librariy for NXT. The library has not been certified as an official LDraw library yet, however, the quality of the library is excellent. MLCAD: MLCAD is a LEGO brick specific 3-D CAD and LDraw Brick library can be used as parts. AC3D CAD: AC3D CAD is a 3-D CAD and it enables converting an LDraw file to be a VRML file. AC3D CAD is proprietary software, but has a free trial version available for 14 days. 全世界各地LEGO MINDSTORMS 开发许多工具和设计项目。其中大部分是由一些志愿人员或开源项目组成。下面的工具将会有很大帮助,可以用于创建在虚拟NXT LEGO MINDSTORMS NXT的3-D虚拟现实模型。 LDraw:LDraw是一个庞大的3-D乐高积木库。 LDraw MINDSTORMS NXT的库:
值得一看的网站,库里面的设计质量非常出色。 AC3D的CAD:AC3D的CAD是一个3-D CAD工具,通过它可以将LDraw文件转换成为VRML文件。AC3D CAD是专有软件,而且有14天的免费试用版。
http://www.ac3d.org/ About pictures used in ECRobot NXT: 在ECRobot NXT使用图片: Pictures used in ECRobot NXT were quoted from the following URLs. Pictures of LEGO Mindstorms NXT devices could be downloaded from LEGO’s official site. The picture of Bluetooth Receive Message Interface/Read blocks was quoted from the following 在ECRobot NXT使用的图片,应用源自以下网址。 LEGO MINDSTORMS NXT设备的图片,可以从乐高的官方网站下载。 图片的蓝牙接收消息接口/读取模块源自以下网址 Application demos based on Embedded Coder Robot NXT: 基于ECROBOT NXT 的演示应用 In the MathWorks File Exchange, there is several application demos based on Embedded Coder Robot NXT. NXTway-GS is a self-balancing two wheeled robot with a HiTechnic Gyro Sensor. 在Mathworks文件交换,有几个基于ECROBOT NXT的演示应用。 NXTway-GS是HiTechnic一两轮自平衡陀螺仪传感器机器人
NXT SCARA is a 2-link SCARA plotter. SCARA stands for Selective Compliance Assembly Robot Arm. NXT SCARA是2-链接SCARA型绘图仪。SCARA代表选择性遵守装配的SCARA机器人手臂。
NXT GT-Hi is a Bluetooth R/C car with ESC (Electronic Stability Control) using a HiTechnic Acceleration Sensor and a HiTechnic Gyro Sensor.
This demo illustrates Model-Based Design for Electrical Automobile Chassis Control in controller design and plant design. NXTGT-HI是一个带ESC(电子稳定控制系统)蓝牙远程控制车,它由HiTechnic公司的加速度传感器和陀螺仪传感器组成。
该演示仿真电气汽车底盘控制系统中控制器的设计和被控对象设计。
|