Chapter 11. Visually Programming Robots

The Microsoft Visual Programming Language (VPL) can be used to implement general-purpose programs that have nothing to do with robotics, but because it is part of the Microsoft Robotics Developer Studio SDK, this chapter focuses on robotic applications.

First, the relationship between VPL activities and DSS services is explained, and you'll learn how to compile a diagram into a C# service implementation. Next you'll learn how to associate an activity with a specific service. Simple examples are provided that demonstrate how to control actuators and read data from sensors.

More complicated examples are presented in Chapter 12.

VPL Activities and Services

A VPL activity can represent a DSS service. As explained in Chapter 3, a service implements a specific contract by supporting a number of operations on its main port. A service may also implement an alternate contract and its associated operations on a separate port. The VPL activity that represents the service has inputs for all of the operations on the main port and any alternate ports.

You know from the previous chapter that an activity may have more than one action associated with it. Each action has its own set of inputs and outputs. Each action associated with an activity corresponds to an operation supported by the service. For example, when you connect a wire to the input of the SimpleDialog service, three possible actions are supported: AlertDialog, PromptDialog, and ConfirmDialog. If you ...

Get Professional Microsoft® Robotics Developer Studio now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.