Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Robotics Studio

Similar presentations


Presentation on theme: "Microsoft Robotics Studio"— Presentation transcript:

1 Microsoft Robotics Studio
4/25/2017 2:21 AM Microsoft Robotics Studio Runtime, Simulation & VPL © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

2 Microsoft Robotics Studio Runtime, Simulation & VPL Overview
4/25/2017 2:21 AM Microsoft Robotics Studio Runtime, Simulation & VPL Overview Zeddy Iskandar Academic Developer Microsoft Indonesia © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

3 Presentation Outline Microsoft Robotics Studio Runtime
4/25/2017 2:21 AM Presentation Outline Microsoft Robotics Studio Runtime Overview, Components and Concepts Decentralized Software Services (DSS) A lightweight, service oriented application model based around state manipulation Concurrency and Coordination Runtime (CCR) A message based model enabling fine grained concurrency and coordination without resorting to threads, locks while avoiding traditional asynchronous programming pitfalls © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

4 Highly Diverse Market…
Microsoft Robotics SDK April 4/25/2017 2:21 AM Highly Diverse Market… © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 4 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

5 4/25/2017 2:21 AM Shared Challenges… Input from industry, hobbyists, academia, research, … Configuring sensors and actuators in running system Coordinating sensors and actuators asynchronously Starting and stopping components dynamically Monitoring/Interacting/Debugging running system Development when access to robot is limited Span multiple compute units Re-use of components across hardware platforms and devices © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

6 Overall Runtime Goals Distributed Application Model (DSS)
Simple, flexible, and service oriented Coarse grained and loosely coupled Compatible with existing Web infrastructure Concurrent Programming Model (CCR) Focus on coordination of messages Hide traditional threads and locks primitives Enable non thread blocking sequential execution between I/O, avoiding nesting/callback chains

7 The definition of a Robotics application
DSS Application Model The definition of a Robotics application

8 What is a Robotics Application?
Microsoft Robotics SDK 4/25/2017 2:21 AM April What is a Robotics Application? An application is a composition of loosely-coupled components concurrently executing Orchestration of sensors/actuators User interface Controlled/Autonomous behavior A service is the unit of orchestration © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 8 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

9 Anatomy of a Service Service Properties Uniform Behavior Identity
Microsoft Robotics SDK April 4/25/2017 2:21 AM Anatomy of a Service Service Properties Identity Structured State Composition through partnering Uniform Behavior State retrieval and manipulation Service creation & Termination Event notifications Port State Handlers Service FIFO © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 9 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

10 Service Abstraction Services can represent any computation
Hardware: Sensors, actuators,… Software: UI, Storage,… Aggregation: Sensor fusion, mash-ups,… Reuse through composition Separate State from Behavior (don’t hide state!)

11 Sample Bumper Service Structured State
Non-structured state handled out of band Uniform Operations Define operations over the state GET, QUERY, UPDATE, DELETE, DROP, SUBSCRIBE

12 Sample Partner Relationship
Orchestrator Service subscribes to bumper Service waiting for sensor input A service can partner with arbitrary number of other services

13 Runtime, Hosting Environment, and System Services
4/25/2017 2:21 AM Service Interactions Runtime, Hosting Environment, and System Services © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

14 Service Interaction Service Interaction happens through protocols
HTTP is available for interactions from Web browser and for providing UI Enables deep integration with existing Web infrastructure DSSP is a SOAP-based protocol available for inter-service communication Augments HTTP model with structured data manipulation and event notifications

15 Distributed Applications
Services can run directly on a single robot Services can run on swarms of collaborating robots Services can run on computers in the network Applications typically a mix

16 Runtime Performance Service-to-Service message throughput:
Same process (with full cloning): 50,000 msgs/second Cross node,cross machine: 3,000 msgs/sec Numbers from dual core 1.8GHz, 2GB RAM Performance allows consistent use of service model for both local and distributed case

17 The foundation for writing Robotics Applications
CCR Programming The foundation for writing Robotics Applications

18 The CCR Runtime Asynchronous Programming model
A concurrency model without manual threading, locks, semaphores, etc. Based on asynchronous message passing Focus on coordination primitives Sequential execution but with no thread blocking, with no need for callbacks, when necessary Execution context for services Isolation from infrastructure Isolation from other services

19 Messages, Ports, and Arbiters
Messages are sent to Ports Port<int> myPort = new Port<int>() ; myPort.Post (42) ; Ports contain A FIFO data-structure holding values in a port A list of continuations that can be executed pending message arrival and arbitration A continuation is represented by a C# delegate Can either be named or anonymous Arbiters Implement common concurrency constructs like join patterns and interleaved calculations A continuation is represented by a Named C# delegate Anonymous delegate

20 Example: Iterators make a difference
IEnumerator<ITask> MultistageIterator() { bool result = false; Port<bool> port = new Port<bool>(); // Stage A, send request port.Post(true); yield return Arbiter.Receive(false, port, delegate(bool b) {result=b; }); // Stage B, received first result, send second request port.Post(result); // Stage C, received second result, print it Console.WriteLine(result); }

21 Example: Choice PortSet<int, string> port = new PortSet<int, string>(); Activate( Arbiter.Choice(port, MyIntHandler, MyStringHandler) ); void MyIntHandler(int i) { Console.WriteLine("Received: " + i); } void MyStringHandler(string s) Console.WriteLine("Received: " + s);

22 Example: Dynamic Join PortSet<Result,Exception> resultsPort =
new PortSet<int>(); // parallel computation by posting requests For (int i=0;i<N;i++) { computePort.Post(new DoWork(someData,resultsPort)); } // requests complete asynchronously with unknown number // of failures vs. successes Activate( Arbiter.MultipleItemReceive(resultsPort, delegate (ICollection<Result> successes, ICollection<Exception> failures) foreach(Result r in results) …… });

23 Declarative Coordination for Services
[ServiceHandler(ServiceHandlerBehavior.Concurrent)] public IEnumerator<ITask> GetHandler(Get get) { get.ResponsePort.Post(_state); yield break; } [ServiceHandler(ServiceHandlerBehavior.Exclusive)] public IEnumerator<ITask> UpdateHandler(Update update) _state.CurrentResult += update.Body.Value; update.ResponsePort.Post(new UpdateResponse());

24 Because hardware is expensive 
Simulation Because hardware is expensive 

25 Why a Simulator? Robotics hardware is expensive
Hardware can be difficult to debug Hard for a team to work concurrently with limited hardware

26 Why a Simulator? Benefits
4/25/2017 2:21 AM 4/25/2017 2:21 AM Why a Simulator? Benefits Low barrier to entry Staged approach Easy prototyping Useful for education Good learning and research tool 26 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

27 Why a Simulator? Limitations
4/25/2017 2:21 AM 4/25/2017 2:21 AM Why a Simulator? Limitations Lack of noisy data Incomplete or inaccurate models Accurate tuning takes time 27 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

28 Simulator Architecture The Simulator Engine Service
4/25/2017 2:21 AM 4/25/2017 2:21 AM Simulator Architecture The Simulator Engine Service Simulation Engine Service XNA Graphics Library Display Hardware Ageia Physics User Interface / Editor Implemented as a service Maintains world state Manages input devices 3D rendering using XNA Ageia Physics Simulation Graphical User Interface Editor for modeling and debugging 28 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

29 Visual Programming Language
Rapid Robot Prototyping

30 Microsoft Visual Programming Language
Visual programming environment Simple programming with drag and drop Application are diagrams Blocks Connections Integrated into Microsoft Robotics Studio Switch to VPL and briefly tour the IDE © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

31 4/25/2017 2:21 AM Guided Tour © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

32 Hello, World!

33 How does it work? Exchange of messages between activities Activities
Perform an action on input message Send result of the action as output message Connections Make output of one activity input of second Input message Output message

34 How does it work? Exchange of messages between activities Activities
Perform an action on input message Send result of the action as output message Connections Make output of one activity input of second Input message

35 Data Activity Output message is a new data value
Ignores content of input message Different types of data int, string, double, bool, …

36 Service Activities SimpleDialog is a DSS Service
All DSS services are activities in VPL Provide access robot hardware, input devices, behavior … You can add your own activities!

37 Service Activities Services can have multiple actions, e.g.
AlertDialog, PromptDialog, ConfirmDialog Most actions have two output messages Success – may contain output values Fault – action could not complete

38 Selecting Services Services appear in the Services toolbox
Use the search box to quickly find services.

39 Making Connections Drag output message of first activity …

40 Making Connections … to second activity
Possible targets are highlighted

41 Selecting Actions When connecting an activity with multiple actions, select the desired action. Selects the output message that is used as input message for the action. Selects the action to which to send the message.

42 Data Connections Service actions define format required for input message Data Connections format messages AlertDialog requires an input value called AlertText. Selects the part of the input message that is used for the target.

43 Hello, World! Revisited

44 Hello, World! Revisited Not connected. Automatically receives an empty input message. Value:

45 Hello, World! Revisited Value: “Hello, World!” (string)

46 Hello, World! Revisited Value: “Hello, World!” (string)

47 Hello, World! Revisited Data connections formats the input message before it is sent to the activity Value: AlertText = “Hello, World!” (AlertText  string)

48 Hello, World! Revisited Not connected. Output message is ignored.
Value: Empty (Success)

49 Example 1 Create a new activity that translates the thumb-stick value of the XBox360 controller to left and right power values of a differential drive. User defined activities

50 XBox360 Controller ThumbsticksChange notification
X, Y coordinates for both thumb-sticks: LeftX, LeftY RightX, RightY float 1.0 Y -1.0 1.0 X -1.0

51 Generic Differential Drive
Very simple drive system Controlled by applying different power to left and right motor SetDrivePower Action LeftWheelPower, RightWheelPower: values between -1.0 and 1.0 (double)

52 Conversion Activity ?

53 User Activities Similar to service activities Multiple actions
Can send notifications Have their own state

54 Implementing Actions Inside an Activity

55 Implementing Actions Inside an Activity
Double-click opens the activity and shows its implementation.

56 Implementing Actions Inside an Activity

57 Implementing Actions Inside an Activity
Selects the current action that is shown.

58 Implementing Actions Inside an Activity
Output message of the action. Input message of the action.

59 Implementing Actions Inside an Activity
Input message of the action. Output message of the action.

60 Implementing Actions Action Properties
Output message of the action. Input message of the action.

61 Implementing Actions Action Properties
Shows more properties of the action and allows to add and delete actions.

62 Implementing Actions Action Properties
Shows more properties of the action and allows to add and delete actions. List of actions in the activity.

63 Implementing Actions Action Properties
Change name and description to something useful.

64 Implementing Actions Action Properties
Add input values for the thumb-stick coordinates.

65 Implementing Actions Action Properties
Add output values for the left and right drive power.

66 Implementing Actions Connecting the Input Message
Use the input message like any other message.

67 Implementing Actions Connecting the Input Message
Input values become part of the message.

68 Implementing Actions Connecting the Input Message

69 Implementing Actions Creating the Output Message
Must put two messages into one message. Must put two message into one message.

70 Implementing Actions Creating the Output Message
Join combines two or more messages.

71 Implementing Actions Creating the Output Message
Value: 0.3251 (float) Value: -0.73 (float)

72 Implementing Actions Creating the Output Message
Join only creates the output message if there are two input messages. Value: Left = Right = -0.73 (Left float, Right Float)

73 Implementing Actions Sending the Output Message
Connect the result message to the right border.

74 Implementing Actions Sending the Output Message

75 Implementing Actions Sending the Output Message

76 Conversion Activity ?

77 Using your Activity

78 Control Robot with Wiimote
4/25/2017 2:21 AM Control Robot with Wiimote © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

79 Control Robot with Speech
4/25/2017 2:21 AM Control Robot with Speech © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.

80 Additional Resources Web site Community Newsgroup Princeton MSRS Page
Community Newsgroup Princeton MSRS Page

81 4/25/2017 2:21 AM © 2006 Microsoft Corporation. All rights reserved.
© 2006 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. © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "Microsoft Robotics Studio"

Similar presentations


Ads by Google