the ongoing democratization of robotics development

38
The Ongoing Democratization of Robotics Development Paul Foster, Microsoft

Upload: ukdpe

Post on 12-Aug-2015

1.780 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: The Ongoing Democratization of Robotics Development

The Ongoing Democratization of Robotics Development

Paul Foster, Microsoft

Page 2: The Ongoing Democratization of Robotics Development
Page 3: The Ongoing Democratization of Robotics Development

Runtime

• CCR - Coordination and Concurrency library

• DSS - Distributed Services Framework

Authoring Tools• Visual Simulation

Runtime and Editor

• Visual Programming Language

Services

• Samples and tutorials

• Robot services

• Robot models

• Technology services

Page 4: The Ongoing Democratization of Robotics Development
Page 5: The Ongoing Democratization of Robotics Development
Page 6: The Ongoing Democratization of Robotics Development
Page 7: The Ongoing Democratization of Robotics Development
Page 8: The Ongoing Democratization of Robotics Development

Concurrency And Coordination Runtime (CCR)

Page 9: The Ongoing Democratization of Robotics Development
Page 10: The Ongoing Democratization of Robotics Development
Page 11: The Ongoing Democratization of Robotics Development

DispatcherDispatcherPort

DispatcherQueues

ThreadsArbiterArbiter

HandlerHandlerArbiter is attached to portArbiter is attached to port

Arbiter is activated on queueArbiter is activated on queue

Dispatcher schedules items from its queues round-robin to run in its threads

Dispatcher schedules items from its queues round-robin to run in its threadsPost places a message

on the portPost places a message on the port

Arbiter checks whether it can consume the messageArbiter checks whether it can consume the message

Creates work item frommessage and handlerCreates work item frommessage and handler

Enqueue work itemEnqueue work item

Thread calls handler with message as arg Thread calls handler with message as arg

Scheduler picks next work item to executeScheduler picks next work item to execute

Page 12: The Ongoing Democratization of Robotics Development

Single-Port Single-Port PrimitivesPrimitives

Code-Code-SchedulingScheduling(non port-(non port-specific)specific)

Multi-Port Multi-Port PrimitivesPrimitives

Page 13: The Ongoing Democratization of Robotics Development

var dispatcher = new Dispatcher(0,”default”);var queue = new DispatcherQueue(dispatcher);var port = new Port<string>(); port.Post("Hello, World!"); Arbiter.Activate(queue, port.Receive(message => Console.WriteLine(message) ));

Port: Building block for sending and receiving messages

Port: Building block for sending and receiving messages

Post: Queues a messagePost: Queues a message

Task: Delegate that handles the message (message is consumed)

Task: Delegate that handles the message (message is consumed)

Receive coordination primitiveReceive coordination primitive

Dispatcher uses fixed number of threads, schedules from queues in round-robin

Dispatcher uses fixed number of threads, schedules from queues in round-robin

Port on which to receive the messagePort on which to receive the message

Page 14: The Ongoing Democratization of Robotics Development

void Start(){ var queue = new DispatcherQueue(); var port = new Port<string>(); port.Post("Hello"); port.Post(“World”); Arbiter.Activate(queue, new IterativeTask(() => Hello(port) ) );}IEnumerator<ITask> Hello(Port<string> port){ for(var i=0; i<5; i++) { yield return port.Receive(); var message = (string)port; Console.WriteLine(message); }

Schedule iterative taskSchedule iterative task

Lambda captures arguments for iteratorLambda captures arguments for iterator

Yield execution until receive is satisfiedYield execution until receive is satisfied

Item retrieved after yieldItem retrieved after yield

Loops around asynchronous operations are easy

Loops around asynchronous operations are easy

Page 15: The Ongoing Democratization of Robotics Development

CCR Concurrent Processing

Page 16: The Ongoing Democratization of Robotics Development

Decentralized Software Services (DSS)

Page 17: The Ongoing Democratization of Robotics Development
Page 18: The Ongoing Democratization of Robotics Development

Microsoft Open Specification PromiseMicrosoft Open Specification PromiseMicrosoft Open Specification PromiseMicrosoft Open Specification Promise

Page 19: The Ongoing Democratization of Robotics Development

<DriveState   <Connected>true</Connected>  <DistanceBetweenWheels>0.112</DistanceBetweenWheels>  <LeftWheel> …  </LeftWheel>  <RightWheel> …  </RightWheel>  <PollingFrequencyMs>80</PollingFrequencyMs>  <TimeStamp>2007-10-10T13:07:45.5195866-07:00</TimeStamp></DriveState>

Flexible UI

Service Orchestration

Page 20: The Ongoing Democratization of Robotics Development
Page 21: The Ongoing Democratization of Robotics Development
Page 22: The Ongoing Democratization of Robotics Development
Page 23: The Ongoing Democratization of Robotics Development

[Contract(Contract.Identifier)]class RecordKeeperService : DsspServiceBase{ [Partner(“PeopleLookup”, Policy = PartnerCreationPolicy.UseExistingOrCreate, Optional = false)] peopleLookup.OperationsPort _peopleLookupPort = peopleLookup.OperationsPort();

[ServicePort(“/recordkeeper”,AllowMultipleInstances = true] OperationsPort _mainPort;

protected override void Start() { base.Start(); }}

Declarative, dynamic composition, annotations picked up by visual editor

Declarative, dynamic composition, annotations picked up by visual editor

Attach handlers to operation port, publish instance URI in service directory

Attach handlers to operation port, publish instance URI in service directory

Page 24: The Ongoing Democratization of Robotics Development

[ServiceHandler(ServiceHandlerBehavior.Concurrent)] public IEnumerator<ITask> QueryHandler(Query queryOp) { var response = FindItem(queryOp.Body); queryOp.ResponsePort.Post(response); yield break; }

[ServiceHandler(ServiceHandlerBehavior.Exclusive)]public IEnumerator<ITask> UpdateHandler(Update updateOp) { QueryAge queryAgeOp; yield return _peopleLookupPort.Query(out queryAgeOp); int age = (int) queryAgeOp.ResponsePort; UpdateRecord(age, updateOp.Body.Name); updateOp.ResponsePort.Post(new UpdateResponse()); }

CCR Interleave is iterator-aware, guaranteeing atomicity across asynchronous steps

CCR Interleave is iterator-aware, guaranteeing atomicity across asynchronous steps

Page 25: The Ongoing Democratization of Robotics Development

Create causality at root of execution graphCreate causality at root of execution graph

Failure occurs on one of the side branchesFailure occurs on one of the side branchesDeal with error as

message at origin of execution

Deal with error as message at origin of execution

Page 26: The Ongoing Democratization of Robotics Development
Page 27: The Ongoing Democratization of Robotics Development

DSS/CCRLogSync Sample

Page 28: The Ongoing Democratization of Robotics Development

Building applications with Microsoft Robotics Developer Studio

Page 29: The Ongoing Democratization of Robotics Development
Page 30: The Ongoing Democratization of Robotics Development

Building a custom robot and environment

Page 31: The Ongoing Democratization of Robotics Development

Available DSS servicesAvailable DSS services

RequestRequest

NotificationNotification

ResponseResponseService instanceService instance

Page 32: The Ongoing Democratization of Robotics Development

VPL Explorer

Page 33: The Ongoing Democratization of Robotics Development
Page 34: The Ongoing Democratization of Robotics Development
Page 35: The Ongoing Democratization of Robotics Development

MRDS 2008 Licensing

Academic Edition Researchers and Students. Free unlimited runtime distribution. Via Academic Portal.

Standard Edition Professional Developers. Free unlimited runtime distribution $499

Express Edition Hobbyists. Not permitted to distribute runtime $Free

More information at http://microsoft.com/robotics

Page 36: The Ongoing Democratization of Robotics Development

• http://imaginecup.com/• Robotics and Algorithm challenge– Interpreting, solution design, best

algorithm– Robotics in a virtual environment

• 2009 Worldwide Finals: Egypt– The robots are real!

Page 37: The Ongoing Democratization of Robotics Development

Summary:

– Simpler concurrency and distributed computing

– Reusable components and standardization– Lower barrier to entry– All of these advantages are now available

for mobile, embedded, desktop and server platforms.

Page 38: The Ongoing Democratization of Robotics Development

© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market

conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.