找回密码
 马上注册

QQ登录

只需一步,快速开始

查看: 7042|回复: 0

ECRobotNXT向导(6)(中英文对照)

[复制链接]
发表于 2012-6-15 10:16:47 | 显示全部楼层 |阅读模式
本帖最后由 旭日东升 于 2012-6-15 11:06 编辑

ECRobot NXT demo
ECRobot NXT 范例
ECRobot NXT provides three application demos: NXTmouse, NXTracer, and NXTway. Each demo includes objectives to evolve the shipped robots. These objectives offer readers good opportunities to experience Model-Based Design using MATLAB and Simulink software products.
ECRobot NXT 提供3个应用范例:NXTmouse,NXTTracer,和NXTway.每个范例包括生成机器人的对象。这些对象提供读者使用MATLAB和Simulink软件产品完成基于模型设计的经验。
NXTmouse
NXTmouse is a maze walking tricycle robot and has one Ultrasonic Sensor, two Light Sensors (not used in the shipped controller model) and two Servo Motors. This robot detects walls by the Ultrasonic Sensor and changes direction. NXTmouse demo files are stored in nxtmouse directory.
NXTmouse
NXTmouse是一个走迷宫的三脚机器人,配置超声波传感器,两个光传感器(没有在控制模型中体现)和两个伺服马达电机。这个机器人检测墙通过超声波传感器和改变方向。NXTmouse范例保存在nxtmouse文件目录下。
77.JPG
78.JPG
nxtmouse.mdl is the main model file that includes a robot plant model and a virtual track model. The control strategy is modeled in nxtmouse_ctrl.mdl file and is referenced via a Model block in nxtmouse.mdl.
nxtmouse.mdl是主仿真模块文件,该模块包括Robot被控对象和虚拟轨迹模型。在nxtmouse_ctrl.mdl文件中创建控制测略模型,并且在nxtmouse.mdl模型模块中使用。
During simulation, a Virtual Reality Viewer window and an XY Map Graph figure come up to monitor behavior of the robot in a maze.
在仿真期间,一个虚拟视图窗口和XY地图图像组合完成监*控机器人在迷宫运动行为。
79.JPG

NXTmouse has the following specifications. A real NXTmouse can be built by using a LEGO Mindstorms NXT Educational Kit (and an additional Light Sensor), but detailed parts
construction is different from the model used in the Virtual Reality Viewer.
NXTmouse有下列细节。真正的NXTmouse可以由LEGO Mindstorms NXT教学套件搭建(附加一个光传感器),不过具体的组装部件不同于虚拟现实视图的模型。

80.JPG
Model-Based Design Experience with NXTmouse:
基于模型设计的NXTmouse设计经验:
Objective: Development of a maze solving robot
Maze solving algorithms have been a popular topic in autonomous robotics. In the web, there are many good examples (i.e. micro mouse:  http://micromouse.cannock.ac.uk/index.htm).  So this objective allows readers to develop a maze solving robot. Maze solver requires handling matrix data to analyze the maze, so it is also a good application for MATLAB and Simulink. There are several hints that may help readers to develop a maze solving robot.
Hint-1: Make the robot recognize walls in three directions (front/right/left sides of the robot)
NXTmouse has two different types of sensors (one Ultrasonic Sensor and two Light Sensors) to detect the walls. Both of the Ultrasonic Sensor and the Light Sensor can detect the walls without contact; however each sensor has pros and cons, so please note the characteristics of each sensor.
According to the specification of the Ultrasonic Sensor in LEGO’s official site: http://mindstorms.lego.com/eng/Overview/Ultrasonic_Sensor.aspx
“The Ultrasonic Sensor measures distance in centimeters and in inches. It is able to measure distances from 0 to 255 centimeters with a precision of +/- 3 cm.”
Therefore, we assume the Ultrasonic Sensor has the following specification:
Measurement range: 0 to 255 [cm]
(If the sensor was not ready for measurement, the sensor returns -1)
Measurement width: 160 [mm] (same as the width of the robot)
Measurement period: 50 [msec] (When ambient temperature is 20 [°C], speed of sound is 343.7 [m/s]; therefore, the elapsed time to measure the maximum distance is calculated as: 2.55*2/343.7 = 0.0148 [sec])
Measurement data by the Ultrasonic Sensor in the real world is not stable due to shape of the obstacles, sensor angle against the obstacles, and temperature…, therefore, noise data is mixed to mimic the real Ultrasonic Sensor during simulation. In the Virtual Reality graphics, the surfaces of the walls are drawn as flat. However, it may cause unstable Ultrasonic Sensor measurement depending on the sensor angle against the wall in reality.
Two Light Sensors are set to detect the walls that are located on the right and left sides of the robot. The Light Sensor value varies depending on the environment (under daylight, room light, color of the walls…) and does not have linear characteristics with respect to the distance to the walls, so new algorithms are required to detect the wall effectively during run-time.
Hint-2: Make the robot recognize position and rotation angle
The robot can recognize the Servo Motor revolutions angle in degrees by using 2 Revolution Sensors; therefore the robot can recognize the position and the rotation angle. To stop at the target position and angle, control algorithms (i.e. PI controller) may be needed. The maze consists of 6 x 6 cells, with the size of a cell being 30 x 30 [cm or pixels]. Initially the robot is located at [22 15] in the maze. This means that the robot is located at the center of the first cell. If the robot can recognize the position and the rotation angle, the robot will move around much more effectively and exit the maze more quickly.

目的:设计解迷宫问题的机器人
迷宫求解算法已公布在自动化机器人的热门话题上。在网站上,有很多很好的例子(例如微型老鼠:http://micromouse.cannock.ac.uk/index.htm的)。因此,这些方法将帮助读者开发设计解迷宫问题的机器人。迷宫的求解需要通过处理矩阵数据来分析迷宫,所以它也是一个很好的MATLAB和Simulink的应用。有以下几个提示,可以帮助读者完成解迷宫机器人的设计开发。
提示1:让机器人识别墙壁的三个方向(前/左/右的机器人)
NXTmouse有两种不同类型的传感器(超声波传感器和两个光传感器)来检测墙壁。超声波传感器和光传感器都可以无触碰式的检测墙壁; 然而,每个传感器都有利弊,所以请注意每个传感器的特点。根据超声波传感器在乐高的官方网站的规格:
http://mindstorms.lego.com/eng/Overview/Ultrasonic_Sensor.aspx
“超声波传感器以厘米和英寸作为测量的单位。它可以测量距离从0到255厘米,精度+ /  -  3厘米”因此,我们假设超声波传感器具有以下规范:
测量范围:0到255 [厘米](如果没有准备好测量传感器,传感器将返回-1)
测量宽度:160 [毫米](同机器人的宽度相同)
测量周期:50  [毫秒]
(当环境温度为20°C时,声音的速度是343.7米/秒;因此,所用的时间测量的最大距离的计算公式为:2.55 * 2/343.7 = 0.0148 [秒])
在现实测量中的超声波传感器测量数据并不稳定,由于障碍物的形状,对障碍的角度传感器,温度......,因此,噪声数据混合到仿真模拟的过程中,以模仿真实的超声波传感器实际效果。在虚拟现实的绘制图形中,绘制墙壁表面是平坦的。然而,现实中的墙壁上测量传感器的角度不同,它可能会导致不稳定的超声波传感器测量数据。位于机器人的左,右两侧两个光传感器检测墙壁。光传感器的值取决于环境(日光下,室内光线,墙壁的颜色...),同墙壁的距离不具有线性特征,这样新的算法需要实时监测墙的反射效果。

提示2:机器人可以识别的位置和旋转角度
机器人可以通过使用2个旋转传感器来识别伺服电机旋转的角度,因此,该机器人可以识别的位置和旋转角度。为了停在目标的位置和角度,可能需要控制算法(即PI控制器)实现。迷宫由30×30厘米或像素单元尺寸的6×6单元组成。最初机器人位于迷宫的[22 15]点上。这意味着,机器人位于第一个单元格的中心。如果机器人可以识别的位置和旋转角度,机器人会走动更有效和更迅速地退出迷宫。
81.JPG
如果您觉得我的帖子对您有用,请不吝给我一个“赞”!
您需要登录后才可以回帖 登录 | 马上注册

本版积分规则

手机版|中文乐高 ( 桂ICP备13001575号-7 )

GMT+8, 2024-12-22 10:58 , Processed in 0.218471 second(s), 25 queries .

Powered by Discuz! X3.5

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表