Tải bản đầy đủ (.pdf) (867 trang)

Professional Microsoft Robotics Developer Studio docx

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (16.04 MB, 867 trang )

Professional
Microsoft
®
Robotics
Developer Studio
www.wrox.com
$49.99 USA
$54.99 CAN
Wrox Professional guides are planned and written by working programmers to meet the real-world needs of programmers,
developers, and IT professionals. Focused and relevant, they address the issues technology professionals face every day.
They provide examples, practical solutions, and expert education in new technologies, all designed to help programmers do a
better job.
Recommended
Computer Book
Categories
Technology
Robotics
ISBN: 978-0-470-14107-6
Microsoft Robotics Developer Studio (MRDS) offers an exciting new way
to program robots in the Windows environment. With key portions of the
MRDS code available in source form, it is readily extensible and offers
numerous opportunities for programmers and hobbyists. This comprehensive
book illustrates creative ways to use the tools and libraries in MRDS so you
can start building innovative new robotics applications.
The book begins with a brief overview of MRDS and then launches into MRDS
concepts and takes a look at fundamental code patterns that can be
used in MRDS programming. You’ll work through examples—all in C#—of
common tasks, including an examination of the physics features of the
MRDS simulator. As the chapters progress, so does the level of difficulty
and you’ll gradually evolve from navigating a simple robot around a
simulated course to controlling simulated and actual robotic arms, and


finally, to an autonomous robot that runs with an embedded PC or PDA.
What you will learn from this book
● How to program in the multi-threaded environment provided by the
concurrency and coordination runtime
● Suggestions for starting and stopping services, configuring services, and
packaging your services for deployment
● Techniques for building new services from scratch and then testing them
● How to build your own simulated environments and robots using the
Visual Simulation Environment
● What robots are supported under MRDS and how to select one for
purchase
Who this book is for
This book is for programmers who are interested in becoming proficient in
the rapidly growing field of robotics. All examples featured in the book are
in C#, which is the preferred language for MRDS.
Enhance Your Knowledge
Advance Your Career
Microsoft
®
Robotics
Developer Studio
Johns
Taylor
Professional
spine=1.728"
Updates, source code, and Wrox technical support at www.wrox.com
Professional
Microsoft
®
Robotics

Developer Studio
Kyle Johns, Trevor Taylor
Wrox Programmer to Programmer
TM
Wrox Programmer to Programmer
TM
www.it-ebooks.info
ffirs.indd viiiffirs.indd viii 5/8/08 1:56:53 PM5/8/08 1:56:53 PM
www.it-ebooks.info
Professional
Microsoft® Robotics
Developer Studio
Foreword xxv
Introduction xxix
Part I: Robotics Developer Studio Fundamentals
Chapter 1: Exploring Microsoft Robotics Developer Studio 3
Chapter 2: Concurrency and Coordination Runtime (CCR) 29
Chapter 3: Decentralized Software Services (DSS) 83
Chapter 4: Advanced Service Concepts 157
Part II: Simulations
Chapter 5: The MRDS Visual Simulation Environment 225
Chapter 6: Extending the MRDS Visual Simulation Environment 269
Chapter 7: Using Orchestration Services to Build a Simulation Scenario 337
Chapter 8: Simulating Articulated Entities 377
Chapter 9: Adventures in Simulation 419
Part III: Visual Programming Language
Chapter 10: Microsoft Visual Programming Language Basics 471
Chapter 11: Visually Programming Robots 501
Chapter 12: Visual Programming Examples 523
(Continued)

ffirs.indd iffirs.indd i 5/8/08 1:56:50 PM5/8/08 1:56:50 PM
www.it-ebooks.info
Part IV: Robotics Hardware
Chapter 13: Using MRDS with Robotics Hardware 563
Chapter 14: Remotely Controlling a Mobile Robot 599
Chapter 15: Using a Robotic Arm 655
Chapter 16: Autonomous Robots 681
Chapter 17: Writing New Hardware Services 731
Index 799
ffirs.indd iiffirs.indd ii 5/8/08 1:56:52 PM5/8/08 1:56:52 PM
www.it-ebooks.info
Professional
Microsoft® Robotics
Developer Studio
Kyle Johns
Trevor Taylor
Wiley Publishing, Inc.
ffirs.indd iiiffirs.indd iii 5/8/08 1:56:52 PM5/8/08 1:56:52 PM
www.it-ebooks.info
Professional Microsoft® Robotics Developer Studio
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright © 2008 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-14107-6
Manufactured in the United States of America
10 9 8 7 6 5 4 3 2 1

Library of Congress Cataloging-in-Publication Data:
Johns, Kyle, 1965-
Professional Microsoft robotics developer studio / Kyle Johns, Trevor Taylor.
p. cm.
Includes index.
ISBN 978-0-470-14107-6 (paper/website)
1. Robotics. I. Taylor, Trevor, 1955- II. Title.
TJ211.J55 2008
629.8'9—dc22
2008014648
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by
any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted
under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written
permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the
Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600.
Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing,
Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at
/>Limit of Liability/Disclaimer of Warranty: The publisher and the author make no representations or
warranties with respect to the accuracy or completeness of the contents of this work and specifically
disclaim all warranties, including without limitation warranties of fitness for a particular purpose.
No warranty may be created or extended by sales or promotional materials. The advice and strategies
contained herein may not be suitable for every situation. This work is sold with the understanding that the
publisher is not engaged in rendering legal, accounting, or other professional services. If professional
assistance is required, the services of a competent professional person should be sought. Neither the
publisher nor the author shall be liable for damages arising herefrom. The fact that an organization or
Website is referred to in this work as a citation and/or a potential source of further information does not
mean that the author or the publisher endorses the information the organization or Website may provide or
recommendations it may make. Further, readers should be aware that Internet Websites listed in this work
may have changed or disappeared between when this work was written and when it is read.
For general information on our other products and services please contact our Customer Care Department

within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress
are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and
other countries, and may not be used without written permission. Microsoft is a registered trademark of
Microsoft Corporation in the United States and/or other countries. All other trademarks are the property of their
respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not
be available in electronic books.
ffirs.indd ivffirs.indd iv 5/8/08 1:56:53 PM5/8/08 1:56:53 PM
www.it-ebooks.info
To Ryan, Tanner, Kaitlyn, Kelsey, Colin, and little Abby; but most of all to Marie.
— Kyle
To Denise, whose support enabled me to undertake writing this book.
— Trevor
ffirs.indd vffirs.indd v 5/8/08 1:56:53 PM5/8/08 1:56:53 PM
www.it-ebooks.info
ffirs.indd viffirs.indd vi 5/8/08 1:56:53 PM5/8/08 1:56:53 PM
www.it-ebooks.info
About the Authors
Kyle Johns is a principal software developer at Microsoft, where he is currently a member of the
Microsoft Robotics Developer Studio Team. After receiving a master’s degree in computer science from
the University of Utah, he designed 3D graphics hardware for flight simulators at Evans and Sutherland.
He joined Microsoft as one of the original members of the DirectX Team and then went on to help
develop the graphics system software in the early days of the Xbox project. Recently he has been
enjoying the opportunity to apply his 20 years of 3D graphics experience to the field of robotics by
developing the Robotics Developer Studio Simulation Environment.
Trevor Taylor is a consultant in the field of robotics education. After 20 years in the IT industry, including
co - founding a consulting company that became a Microsoft Solution Provider Partner, he moved to the
Queensland University of Technology in 2002. For six years he taught a variety of subjects, including
Visual Basic and Web development using ASP.NET. During this period he also worked part - time on a

doctorate in computer vision and robotics. In early 2008, Trevor left QUT to concentrate on developing
course materials for teaching robotics and to finish writing his thesis. Trevor has worked with MRDS
since the very first Community Technology Preview in June 2006 and is an active and well - known
contributor to the community.
ffirs.indd viiffirs.indd vii 5/8/08 1:56:53 PM5/8/08 1:56:53 PM
www.it-ebooks.info
ffirs.indd viiiffirs.indd viii 5/8/08 1:56:53 PM5/8/08 1:56:53 PM
www.it-ebooks.info
Executive Editor
Chris Webb
Development Editor
Maureen Spears
Technical Editors
David E. Buckley
Steve Tudor
Production Editor
William A. Barton
Copy Editor
Luann Rouff
Editorial Manager
Mary Beth Wakefield
Production Manager
Tim Tate
Credits
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Joseph B. Wikert
Project Coordinator, Cover
Lynsey Stanford

Proofreaders
Jeremy Bagai,
David Fine,
Paul Sagan,
Word One
Indexer
Robert Swanson
ffirs.indd ixffirs.indd ix 5/8/08 1:56:54 PM5/8/08 1:56:54 PM
www.it-ebooks.info
ffirs.indd xffirs.indd x 5/8/08 1:56:54 PM5/8/08 1:56:54 PM
www.it-ebooks.info
Acknowledgments
Various organizations have assisted with the production of this book by making software services for
their robots available for inclusion in the book examples and/or providing images for use in the figures.
The authors wish to acknowledge their support. These organizations include (in alphabetical order) the
following:
CoroWare, Inc.:
www.coroware.com
Institute for Personal Robots in Education (IPRE):
www.ipre.org
LEGO:
www.lego.com
Lynxmotion, Inc.:
www.lynxmotion.com
Parallax, Inc.:
www.parallax.com
Picblok Corporation Pty Ltd:
www.picblokcorporation.com
RoboticsConnection (Summerour Robotics Corporation):
www.roboticsconnection.com

Surveyor Corporation:
www.surveyor.com
Throughout the preparation of the book, the Microsoft Robotics Developer Studio Team have been most
helpful in resolving problems and answering questions. To them we extend a big “ thank - you. ”
ffirs.indd xiffirs.indd xi 5/8/08 1:56:54 PM5/8/08 1:56:54 PM
www.it-ebooks.info
ffirs.indd xiiffirs.indd xii 5/8/08 1:56:54 PM5/8/08 1:56:54 PM
www.it-ebooks.info
Contents
Foreword xxv
Introduction xxix
Part I: Robotics Developer Studio Fundamentals 1
Chapter 1: Exploring Microsoft Robotics Developer Studio 3
Microsoft Does Robots? 4
Microsoft Robotics Developer Studio Components 5
Concurrency and Coordination Runtime (CCR) 5
Decentralized Software Services (DSS) 6
Visual Simulation Environment 6
Visual Programming Language (VPL) 7
Robotics Samples 8
Packages 9
Support for MRDS 12
The SubjuGator 12
Prospect 12 13
The uBot-5 13
KUKA Educational Framework 14
Setting Up Your System 15
System Requirements 15
Prerequisites 16
Installing MRDS 1.5 16

Robotics Studio 1.5 Directory Structure 19
Installing the Packages 20
Installing the Sample Code for This Book 21
Verifying the Installation 21
Additional Resources and Support 27
www.Microsoft.Com/Robotics 27
Tutorials and User Guides 27
Online Forums 27
Channel 9 28
Summary 28
ftoc.indd xiiiftoc.indd xiii 5/8/08 1:58:15 PM5/8/08 1:58:15 PM
www.it-ebooks.info
Contents
xiv
Chapter 2: Concurrency and Coordination Runtime (CCR) 29
Overview of the MRDS Framework 30
The Need for Concurrency 30
Services — The Basic Building Blocks 31
Orchestration — Putting Services Together 31
Setting Up for This Chapter 32
Using the CCRExamples Project 33
Entering the Code Manually 34
Tips for Coding with MRDS 37
Coordination and Concurrency Runtime 38
Concurrent Execution 39
Ports and Messages 50
Receivers and Arbiters 55
Dispatchers and Dispatcher Queues 65
Implementing Common Control Structures 68
Sequential Processing 68

Scatter/Gather 69
State Machines 70
Last Message 70
Time Delays 71
Periodic Events 73
Setting Limits with Timeouts 75
Asynchronous I/O 75
Blocking I/O 76
Throttling 76
Error Handling 77
Causalities 77
Success/Failure Ports 79
Interoperation with Legacy Code 81
Traps for New Players 81
Summary 82
Chapter 3: Decentralized Software Services (DSS) 83
Overview of DSS 84
Contracts 86
State 87
Behavior 91
Execution Context 93
DSSP Service Operations 94
Generic Contracts 98
ftoc.indd xivftoc.indd xiv 5/8/08 1:58:16 PM5/8/08 1:58:16 PM
www.it-ebooks.info
Contents
xv
Running a DSS Node 98
Directory Structure of a DSS Node 99
Starting DssHost 100

Exploring the DSS Web Pages 101
Running a Robot Service 109
Creating a New Service 112
Building a Service from Scratch 112
Examining the Service Source Files 116
Compiling and Running Services 121
Compiling a Service 121
Setting Up References 122
Proxy Assemblies 123
Running Services 123
Using the Debugger 125
Defining Service State 127
Persisting Service State 129
Loading State from a Configuration File 129
Saving the State to a Config File 131
Modifying Service State 132
Replace 132
Update 133
Service Initialization 136
Composing and Coordinating Services 137
Starting and Stopping Services Programmatically 137
Using the Partner Attribute to Start Services 144
Modifying Manifests Manually 146
DSS Tools 149
Modifying Manifests Using the DSS Manifest Editor 149
DssInfo: Examining Contract Information 150
DssProjectMigration: Migrating Services 151
Deploying Services 151
Sharing Source Code 152
Distributing Executables 154

Viewing the Contents of a Package 155
Summary 155
Chapter 4: Advanced Service Concepts 157
Setting Up for This Chapter 157
Hardware Setup 159
Creating the Service 160
ftoc.indd xvftoc.indd xv 5/8/08 1:58:16 PM5/8/08 1:58:16 PM
www.it-ebooks.info
Contents
xvi
Subscribing and Notifying 163
Subscribing to State Changes 164
Unsubscribing from State Change Notifications 167
Building in Support for Subscriptions and Notifications 167
User Interfaces 170
Using Windows Forms 171
Using Web Forms 185
Using a Camera 205
Adding a Camera to a Service 206
Setting Up a WinForm for the Video Feed 207
Processing Video Frames 212
Inheriting from Abstract Services 215
Implementing a Generic Service 215
Building Virtual Services 217
More on Debugging 219
Read the Documentation First 219
Use the Visual Studio Debugger 219
Examine the State of a Node and Services 220
Traditional Debugging Techniques 220
Using Trace Level and Logging 220

Where to Go from Here 221
Summary 222
Part II: Simulations 223
Chapter 5: The MRDS Visual Simulation Environment 225
The Advantages of Simulation 226
The Difficulties with Simulation 226
Prerequisites 227
Hardware Requirements 227
Software Requirements 228
Starting the Simulator 230
Using the Simulator 231
Navigating the Simulation Environment 232
The Status Bar 234
The Help Menu 235
The Camera Menu 235
The Rendering Menu 236
Graphics Settings 240
The Physics Menu 241
Saving and Loading Scenes 243
ftoc.indd xviftoc.indd xvi 5/8/08 1:58:16 PM5/8/08 1:58:16 PM
www.it-ebooks.info
Contents
xvii
Saving and Loading Manifests 243
Other File Menu Items 243
The Simulation Editor 244
Selecting Entities 245
Manipulating Selected Entities 246
The Entities Menu 247
Modifying Entity State 248

Other Common Entity Properties 250
Built-in Simulation Entities 252
Sky and Ground Entities 253
Lights and Shadows 257
General-Purpose Entities 259
Robot Entities 263
Summary 267
Chapter 6: Extending the MRDS Visual Simulation Environment 269
Simulation DLLs and Types 270
RoboticsCommon.DLL 270
SimulationCommon.DLL 271
SimulationEngine.DLL 272
SimulationEngine.Proxy.DLL 274
PhysicsEngine.DLL 274
Microsoft.Xna.Framework.DLL 274
Using Statements and DLL References 275
Building Your Own SRS-Robo-Magellan Simulation 276
Simulation Services 276
Creating a Simulation Service 277
Defining a Custom Robot Entity 281
The Drive Methods 293
The SimulatedQuadDifferentialDrive Service 296
Tuning the Corobot Entity 313
Adding a Camera 322
Adding Infrared Distance Sensors 323
Summary 336
Chapter 7: Using Orchestration Services to Build a Simulation Scenario 337
The Robo-Magellan Referee Service 338
Customizing the SimulationTutorial1 Service 339
Starting a Service from the Browser 339

Building the World and Adding Cameras 340
Adding a Sky, Sun, and Ground 340
ftoc.indd xviiftoc.indd xvii 5/8/08 1:58:17 PM5/8/08 1:58:17 PM
www.it-ebooks.info
Contents
xviii
Adding Barriers 341
Building a Better Traffic Cone 343
The Robo-Magellan Orchestration Service 347
Generating the SimMagellan Service 347
Creating a Manifest with the Manifest Editor 349
Adding a Windows Forms User Interface 351
Creating the Form 351
Connecting the Service to the Form 352
How to Make a Robot Behave 354
Defining Behavior States 355
Implementing the Behavior for Each State 356
Processing Camera Frames 362
The Wander Behavior 367
The Approach State 369
The Final Approach State 371
The Back Away State 372
The Finished State 373
The Avoid Collision State 373
Using the SimMagellan Service 374
Future Directions 374
Summary 375
Chapter 8: Simulating Articulated Entities 377
The Joint Class 377
The Joint Frame 378

Joint Properties 378
A Joint TestBench 382
Building a Simulated Robotic Arm 394
The Physical Model of the Arm Entity 394
Running the Arm Service 405
Moving the Arm 405
A Fly in the Ointment 407
Inverse Kinematics 410
Using the Arm User Interface 412
Summary 418
Chapter 9: Adventures in Simulation 419
Simulating a Sumo Competition 419
SimulatedSumo 420
The Simulated Sumo Referee 421
Communicating with the Sumo Referee Service 423
ftoc.indd xviiiftoc.indd xviii 5/8/08 1:58:17 PM5/8/08 1:58:17 PM
www.it-ebooks.info
Contents
xix
The Sample Sumo Behavior 425
Creating a New Sumo Player 427
Where to Go from Here 430
Building a Six-Legged Walker 430
The Hexapod Entity 431
The Hexapod Differential Drive Service 438
Where to Go from Here 443
Implementing a Soccer Strategy 444
The MRDS Simulated Soccer Environment 444
Changing the Players on the Field 446
Building a Better Soccer Player 449

Where to Go from Here 457
Exploring Virtual Worlds 457
Background 458
The Modified DifferentialDrive Service 459
The Maze Simulator 461
The ExplorerSim Application 464
Where to Go from Here 466
Summary 467
Part III: Visual Programming Language 469
Chapter 10: Microsoft Visual Programming Language Basics 471
What Is a Data Flow Language? 471
The VPL Development Environment 473
A Simple VPL Diagram 474
Creating a VPL Diagram 474
Running a VPL Diagram 475
Inputs, Outputs, and Notifications 478
Basic Activities 479
VPL Variables 480
Looping and Conditionals in VPL 482
The VPL Execution Model 484
Debugging a VPL Diagram 485
Creating Custom Activities 487
Defining a ForLoop Custom Activity 488
Improving the ForLoop Custom Activity 491
Using Lists and Switch Activities 493
An Example Using List Activities 495
The PluralNouns Activity 496
The Phrases Activity 497
The GetRandom Action 498
ftoc.indd xixftoc.indd xix 5/8/08 1:58:17 PM5/8/08 1:58:17 PM

www.it-ebooks.info
Contents
xx
A Final ForLoop Improvement 499
Summary 500
Chapter 11: Visually Programming Robots 501
VPL Activities and Services 501
Compiling Diagrams to Services 502
Service Compilation Options 502
A Service Compilation Example 503
Configuring Activities 508
Setting the Configuration for a Diagram 509
Starting the SimpleDashboard Service Upon Execution 511
Modifying the Diagram to Use a Real Robot 512
VPL in the Driver’s Seat 513
Using VPL to Read Sensors 517
The Laser Range Finder 518
Controlling Multiple Robots 520
Summary 522
Chapter 12: Visual Programming Examples 523
VPL Explorer 523
Interfacing with the Xbox Controller 524
Reading the LRF Data 525
VPL Sumo 529
The VPL Sumo Main Diagram 529
The PlayerOne Start Action 530
Reading Data from the Infrared Sensors 532
Reading the Create Bumper Sensors 532
The Manouver Message 533
Arm Mover 534

The ArmMover Activity 535
The SetPollInterval Action 536
Moving the Arm 539
Line Follower 542
The LineMesh Utility 542
Building a Brightness Sensor 547
Building the Simulation Environment 549
The Line-Follower VPL Diagram 551
Ball Follower 554
Building the Simulation Environment 554
The BallFollower VPL Diagram 556
Summary 559
ftoc.indd xxftoc.indd xx 5/8/08 1:58:18 PM5/8/08 1:58:18 PM
www.it-ebooks.info
Contents
xxi
Part IV: Robotics Hardware 561
Chapter 13: Using MRDS with Robotics Hardware 563
Safety Considerations Before Starting 564
Types of Robots 564
Tethered Robots 565
Autonomous Robots 572
Buying Your First Robot 573
General Recommendations 574
Robots Discussed in This Book 574
Other Robots Supported under MRDS 580
Fundamental Concepts: Sensors, Actuators, and Controllers 584
Sensors 585
Contact Sensors 586
Range Sensors 586

Light Sensors 589
Video/Image Sensors 590
Other Sensors 590
Actuators 592
Motors 592
Servo Motors 592
Digital Outputs 592
Sound and Voice Synthesis 593
Controllers 593
Understanding a Closed-Loop Control System 593
Behavior-Based Control 594
Summary 597
Chapter 14: Remotely Controlling a Mobile Robot 599
Remote Control and Teleoperation 599
Setting Up Your Robot 600
Using a LEGO NXT Tribot with MRDS 601
Using a Parallax Boe-Bot with MRDS 611
Using the Dashboard 615
Creating a Manifest 616
Running the Manifest 621
Using a Joystick or Gamepad 623
Creating a Shortcut to Run Your Robot 624
Making a Robot Dance 625
Building a New Service 626
Partnering with a Robot Using a Manifest 630
ftoc.indd xxiftoc.indd xxi 5/8/08 1:58:18 PM5/8/08 1:58:18 PM
www.it-ebooks.info
Contents
xxii
Reviewing the Results 635

Improving the Behavior 636
Flashing and Beeping 640
Exploring Using Sensors 643
Reading from the Sensors 643
Making a LEGO NXT Wander Around 644
Making a Boe-Bot Wander Around 647
Summary 653
Chapter 15: Using a Robotic Arm 655
Introduction to Articulated Arms 656
Servo Basics 657
Controlling Joints: Speed and Travel Constraints 658
Forward Kinematics 661
Inverse Kinematics 664
Setting Up a Lynxmotion L6 Arm 665
Building the Lynxmotion L6 Arm 666
Starting the Lynxmotion L6 Arm 666
Controlling the L6 Arm 667
Using the Generic Arm Contract 668
Recording Motions 671
Pick and Place 677
Logjam 679
Using an Overhead Camera 679
Summary 680
Chapter 16: Autonomous Robots 681
PC-Based Robots 681
Windows XP-Based PCs 682
Onboard Laptops 682
PDAs 682
Embedded PCs 683
The Development Environment 684

Setting Up a Stinger Robot 685
Setting Up Your PDA 686
Driving a Stinger Remotely 690
Code Overview 691
Wandering Using Sensors 703
Handling the IR Sensors 703
Defining Wander Modes 704
Running the Wander Code 707
ftoc.indd xxiiftoc.indd xxii 5/8/08 1:58:18 PM5/8/08 1:58:18 PM
www.it-ebooks.info
Contents
xxiii
Creating a CF Version of the Service 708
Deploying a Service to a PDA 709
Debugging a Service on a PDA 711
Setting Up the eBox 713
Booting the eBox for the First Time 714
Setting Up the Serial Port 719
Setting Up Visual Studio 720
Transferring Files to the eBox 723
Building a Windows CE System Image 724
Running a Service on WinCE 725
Setting Up the Service 726
Testing Operation of the Service 727
Autonomous Operation 728
Where to Go from Here 729
Summary 730
Chapter 17: Writing New Hardware Services 731
Integrating New Hardware 731
Microcontrollers 732

Chips with Built-in BASIC Interpreters 733
MRDS Support from Other Vendors 734
Creating a Generic Brick Service 734
Terminology 735
Design 736
Brick State 740
Brick Operations 748
Additional Components 750
The Integrator Robot 754
Integrator Robot Monitor Program 756
Creating the Integrator Robot Services 763
Creating a New Drive Service 775
Testing a Generic Brick Robot 785
The Hemisson Robot 786
Hemisson Brick Service 787
Hemisson Drive Service 791
Where to Go from Here 797
Summary 798
Index 799
ftoc.indd xxiiiftoc.indd xxiii 5/8/08 1:58:19 PM5/8/08 1:58:19 PM
www.it-ebooks.info

×