Export (0) Print
Expand All

Simple Simulated Robot

Microsoft Robotics

Glossary Item Box

Microsoft Robotics Developer StudioSend feedback on this topic

Simple Simulated Robot

This tutorial teaches you how to:

This tutorial is provided in the C# language. You can find the project files for this tutorial at the following location under the Microsoft Robotics Developer Studio installation folder:

Sample location
Samples\SimulationTutorials\Beginner\Simple Simulated Robot

We will work from the simulation empty project we created in the previous tutorial. We will also leverage one additional sample service, the EntityUI sample service.

Running an additional sample service

The simulator has the ability to start manifests while it is running. We will use the "EntityUI" service in this tutorial. Start and simulator and select "File" -> "Open Manifest".

Simple Simulated Robot Manifest

Simple Simulated Robot Manifest - Opening a manifest


Now open the file located at "samples\config\EntityUI.manifest.xml"

Simple Simulated Robot EntityUI

Simple Simulated Robot EntityUI - Selecting the EntityUI manifest


Creating a scene

The EntityUI service should and open a WinForm. First let's use the EntityUI to add a basic scene. We can do this by clicking the "Add Default Scene" button shown below.

Simple Simulated Robot Environment

Simple Simulated Robot Environment - Adding a basic environment


Now that we have a minimal scene with a sky and a ground plane, let's add a MotorBase entity along with a simulated webcam entity. We want to uncheck all the sensors except the Webcam checkbox. Click "Add Motor Base" to add a motor base with a simulated differential drive and a webcam to your scene (shown below).

Simple Simulated Robot Motorbase

Simple Simulated Robot Motorbase - Adding a MotorBase


Save this scene to some file ("File" -> "Save Scene As...").

Driving the robot with the SimpleDashboard

Now open the manifest that was saved in DSSMe. For example, if you saved your scene to "SimpleRobotScene.xml" the manifest will be saved in the same folder at "SimpleRobotScene.Manifest.xml".

Simple Simulated Robot Save Scene

Simple Simulated Robot Save Scene - The saved scene now open in DSSMe


Note the item circled in red in the above picture. The SimulatedDifferentialDrive service, a service that allows for issuing drive commands to a robot, is partnered with the MotorBaseWithDrive entity. This allows the SimulatedDifferentialDrive service to know which entity to issue drive commands to.

Now run this manifest through DSSMe by selecting "Run" -> "Run Manifest". We will use a new service, the SimpleDashboard service, to issue drive commands to the robot. Select "File" -> "Open Manifest..." and open the SimpleDashboard manifest (samples\config\SimpleDashboard.manifest.xml).

Simple Simulated Robot Dashboard

Simple Simulated Robot Dashboard - Opening the SimpleDashboard manifest


The SimpleDashboard service should open a new WinForm, shown below. Click the "Connect" button on the SimpleDashboard service (near upper right of the WinForm).

Simple Simulated Robot Services

Simple Simulated Robot Services - Finding services on your local machine


Now double-click on the "MotorBaseWithDrive" entity listed under the Service Directory. And then click the "Drive" button. Now using the sphere shaped control (boxed in red below) you can drive the robot around.

Simple Simulated Robot Driving

Simple Simulated Robot Driving - Driving the MotorBase around


Summary

 

 

© 2012 Microsoft Corporation. All Rights Reserved.

Show:
© 2015 Microsoft