Ana səhifə

1 Introduction 1 Background and motivation

Yüklə 29.73 Kb.
ölçüsü29.73 Kb.
Implementation of Microsoft Robotics Studio and Lego Mindstorms NXT

Project 3 Milestone 2 Report

James Hopkins
1 Introduction

1.1 Background and motivation

Microsoft Robotics Studio (MSRS) is a set of software tools, a runtime framework and simulation platform to aid in the development of robotics software and applications. These tools can be accessed from the Microsoft’s Visual Studio integrated development environment (IDE); the same environment used to develop most applications for Windows based personal computers, or they can be accessed directly without Visual Studio. This gives robotics software developers the option to choose the programming language that will be used as their robotic application.

MSRS can be used with several robotics platforms. This is possible due to how MSRS orchestrates services with the native robotic programming language. In other words, MSRS is not used to create code that will execute directly on the microcontroller in the robot. Instead, a small program written in the robot’s native programming environment runs on the robot and provides a set of services such as reading a bumper being hit, or setting the speed of the servo.

An orchestrator written in MSRS and running with an MSRS runtime environment communicates with the robots services to control the robot. This is possible with communication, Bluetooth for example, between the host computer runtime application and the robot. This drastically increases the complexity of tasks and advanced behavior of the robot that can be programmed being that the limitations of the microcontroller have been augmented by the MSRS runtime environment.

Typically the ability to develop robotic applications relies on multiple disciplines. At a minimum an electrical, mechanical, and computer engineer with a computer scientist are required to develop a functional robot and robot software. Lego Mindstorms NXT has eliminated the requirement of having a staff of engineers and gives a computer scientist the ability to work independently. This is possible with Lego Mindstorms NXT since this platform includes a standardized package to include a microcontroller that is able to take input data from touch, light, sound, ultrasonic sonic sensors, and provide output to servos. The motivation for this project is to take advantage of the capabilities provided by Lego Mindstorms NXT and MSRS to develop a robot and an advanced User Interface (UI) capable of providing manual control, and autonomous operations of the robot.
1.2 Document conventions

This document follows the recommended milestone 2 report guidelines and contains a glossary in the appendix for terminology used in this project. Furthermore, the task breakdown and timeline will be documented using Microsoft Project.

1.3 Team members and task breakdown

All tasks breakdown and timelines are documented in a Gant chart that can be found in Appendix B.

The following factors were considered when developing the task assignments and the timeline:

1. Karl is the most familiar with C# coding.

2. James lives and work off campus therefore it is more difficult to be on campus after hours, thus more efficient for him work independently.

3. Assign tasks that can be accomplish given individual strengths.

4. James owns the Lego Mindstorms NXT kits.

5. Divide up the work in a fair manner.

6. Continuity of coding, being that coding is distributed among individual team members.

The tasks can be broken into the following five components with an optional sixth component.

1. Purchase and configure the Lego Mindstorms NXT platform to include design and construction of the robot and testing the sensors/servos.

2. Install MSRS and Microsoft Visual Studio or Microsoft Visual C#

3. Develop UI for manual control

4. Develop autonomous operation

5.  Integrate mapping sensor data (distance to nearest object and touch sensor being pressed) to provide visual representation of the sensor data to be used in the manual control interface, and to enhance autonomous operation by using stored mapping data.

6. If the project is completed ahead of schedule the team will work on the ability to coordinate two identical robots using the manual interface.

Taking into consideration the above listed factors, the tasks given to team members will be in a phases, with all members required to complete step 2. James will complete tasks 1, and make the foundation for tasks 3 and 4. This foundation for tasks 3 and 4 include the design, build, and test of all the basic components for the manual control with UI and the autonomous operations.  This allows for the standardization of variables and interfaces.  

Once the foundation for the manual control with user interface and the autonomous operations has been completed Dennis will design, build, and test advanced features to the manual control interface, Dave will design, build, and test advanced features for the autonomous operations and Karl will design, build, and test integration of mapping sensor data.

1.4 References

  • Lego Mindstorms NXT

  • Microsoft Robotics Studio:

2 Overall Description

2.1 Product functions and perspective

The purpose of this project is to build a robot that is capable of being manually controlled using an UI, or allowing the robot to be operated autonomously. The robot during operations will transmit distance to object measurements to be used in conjunction with the UI and autonomous operations.

2.2 User classes and characteristics

The primary users of this UI will be the team members. The UI is not being developed for general purpose use, only for academic development.

2.3 Developing environment

The robot will be constructed using Lego Mindstorms NXT kit. The UI will be written in C# using both Microsoft Studio or Microsoft Visual C# Studio edition, and Microsoft Robotics Developer Studio 2008 Community Technical Preview (CTP).

2.4 User environment

Microsoft Robotics Developer Studio 2008 supports operating systems to include Windows CE, Windows Server 2003 Service Pack 2, Windows Server 2008, Windows Vista, and Windows XP. Any computer that meets the hardware requirements of the above mentioned operating systems can support MSRS.

2.5 Design/implementation constraints

Being that the Lego Mindstorms NXT kit provides three servo’s, a touch, sound, light, and ultrasonic sensor the robot for this project will only have the capabilities provided by these instruments.

Only having 12 weeks to implement the UI, the UI will not be developed as an application for general purpose use. Therefore the UI will not provide fail-safe or extremely obvious functionality that is typically guaranteed by most user applications.
2.6 Assumptions and dependencies

The robot will be used only indoors in a controlled environment. The robot will only operate on a flat surface, for example will not be required to navigate up or down stairs.

3 External Interface Requirements

3.1 User interfaces

The program, when executed, will provide the user the ability to perform robot actions that involve moving the robot. For example, the UI will have a button for turning the robot left or right and will have a button for moving forward or backwards. The UI will provide a button to activate or deactivate the autonomous operation of the robot. The UI will also have a visual representation of the distance to object measurements made by the robot.

3.2 Hardware interfaces

A laptop with windows XP will be used to operate the UI and control the robot. The robot will consist of structural components, sensors and servos provided by the Lego Mindstorms NXT kit. The microcontroller, ultrasonic sensor, touch sensor, and three servos will be used in the construction of the robot. The robot will have four wheels that allow 360 degree movement on a flat surface. The touch sensor will alert the robot and the UI that the robot has bumped into an object. The ultrasonic sensor will provide distance to object measurements to the robot and the UI. Two of the servos are used for movement of the robot one driving the left wheels and one driving the right wheels. The third servo is used to provide 360 degree rotation to the ultrasonic sensor.

3.3 Software interfaces

The UI will run as a Microsoft Windows application.

3.4 Communication protocols and interfaces

Communication between the robot and the UI is conducted using Bluetooth communications, V2.0 with Enhanced Data Rate (EDR). This communication occurs when downloading a new program to the microcontroller, or during runtime operations to control the robot using the UI, and to provide the UI with sensor measurements. The Bluetooth device is connected to the host computer using a Universal Serial Bus (USB) connection and the Lego NXT microcontroller has a Bluetooth built into the microcontroller.

4 System Features

4.1 Description and priority

The following items identify system features and their overall priority.

Design-build robot (high): Construct four wheeled robot able to move in 360 degrees, with an ultrasonic sensor to measure distance to objects, and a touch sensor to provide notification the robot has bumped into an object.

UI for manual control (high): Design, build, and test user interface that allows control of the movements of the robot and the direction of the ultrasonic sensor.

Autonomous program (high): Design, build, and test program that will allow the robot to safely traverse a room making distance to object measurements.

Integrate sensor data (high): Collect and store distance to object measurements to be used in the UI as a visual representation of the measurements, and to enhance autonomous operations by allowing the robot to make predictions.
4.2 Action plan

Appendix B has a detailed Gant chart which outlines the tasks, assignments, and timeline. Due to the complexity of the project testing will be conducted for each task. For example, accessing a service task involves processing that the touch sensor has been pressed. This task is tested as an individual component. However this task must also be tested when used in the task coordinating services. Coordinating services, for example, is when the touch sensor is activated the servos are turned off brining the robot to a stop. Even though the touch sensor accessing a service has been tested independently, it must also be tested as a component of the coordinating services.

4.3 Functional requirements

The environment the robot will function, autonomous and manual operations need to be defined. The limitations on the environment and autonomous functions are directly correlated to the limiting factors of having 13 weeks to complete the project and the capabilities of the sensors provided in the Lego NXT kit. The environment the robot will operate in will have the following characteristics:

  • Indoors.

  • On the ground, not on a table for example.

  • Away from stairs or sudden decline in elevation.

  • In a classroom with non-moving structures.

  • Spatial distribution of structures large enough to allow the robot to move.

The autonomous behavior of the robot will have the following characteristics:

  • Stop and change direction if contact sensor is activated. This will occur if the front of the robot runs into an object.

  • Move throughout a room making distance to object measurements.

  • Avoid running into objects by making decisions for course correction. The decisions for course correction will occur when the robot is within 15cm of an object. The robot will then use the ultrasonic sensor to measure to the left and to the right and will select the direction with the largest distance to object. If the closest distance to the left and right of the robot is less than 30 cm, the robot will turn 180 degrees and continue its algorithm.

  • If communication is lost the robot will stop all motion and then will make a sound.

The manual behavior of the robot will be performed using the UI which will have the following characteristics:

  • Buttons that will move the robot forward reverse, left and right.

  • Turn on or off autonomous operations.

  • Visual representation of measurements.

  • Rotate the ultrasonic sensor.

5 Other Nonfunctional Requirements

5.1 Performance requirements

The UI will provide easy to identify buttons.

5.2 Security requirements

There are two components to be considered for security. First the laptop that will control the robot will not need network/internet connections. Therefore to ensure security of the laptop all network devices will be disabled. The second area for security considerations is with Bluetooth communications. The robot will be assigned a pass key and the Bluetooth will be set to be not visible to other Bluetooth devices.

5.3 Software quality attributes

Correctness: The UI must accurately control the robot.

Reliability: The UI and the robot will both have fail-safe procedures. Should the program fail, the robot will go into a safe mode where it stops all operations. If the robot looses communication or power the UI will provide data to alert the operator.

Extendibility: The UI and robot can be further enhanced to include additional sensors. For example the light sensor can be added to the robot and the coordination of services for the light sensor can be added to the UI.
5.4 Project documentation

There will be five milestone reports written for this project. Furthermore, the tasks and timeline will be documented using Microsoft Project. All code will be commented for understandability.

5.5 User documentation

There is no user documentation planned being that the intended users are only the team members.

Appendix A: Glossary


Bluetooth is a wireless protocol utilizing short-range communications technology facilitating data transmission over short distances from fixed and/or mobile devices, creating wireless personal area networks


Enhanced Data Rate. The nominal rate of EDR is about 3 megabits per second, although the practical data transfer rate is 2.1 megabits per second. The additional throughput is obtained by using a different radio technology for transmission of the data.

Microsoft Visual Studio 2008

Visual Studio 2008 Professional Edition and Visual Studio 2008 Standard Edition empower individuals and small development teams to deliver connected applications that take advantage of the latest technology while more effectively meeting business goals. Microsoft Robotics Studio

Microsoft Project

Project Standard 2007 is a project management product designed to address the work and people management needs of today's organizations. Project Standard 2007 gives you ways to plan, manage, and communicate project information, resulting in increased productivity and effectiveness

Microsoft CE

Windows CE .NET, the successor to Windows CE 3.0, combines an advanced real-time embedded operating system with the most powerful tools for rapidly creating the next generation of smart, connected, and small-footprint devices.

Windows Server 2003

Designed for medium to large businesses, Windows Server 2003, Enterprise Edition, is the recommended operating system for servers running applications such as networking, messaging, inventory, and customer service systems; databases; and e-commerce Web sites.


A servo is a motor with a built-in rotation sensor. This lets your control your robot’s movements precisely. The Rotation Sensor measures motor rotations in degrees or full rotations [accuracy of +/- one degree]. One rotation is equal to 360 degrees, so if you set a motor to turn 180 degrees, its output shaft will make half a turn

Ultrasonic sensor

Ultrasonic Sensor uses the same scientific principle as bats: it measures distance by calculating the time it takes for a sound wave to hit an object and return – just like an echo.


User Interface

USB Connection

Universal Serial Bus is a widely used hardware interface for attaching peripheral devices.

Appendix B: Gant Chart

Attached Microsoft Project file.

- -

Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur © 2016
rəhbərliyinə müraciət