Udostępnij za pośrednictwem


Simulation Editor Overview

Glossary Item Box

Microsoft Robotics Developer Studio Send feedback on this topic

Simulation Editor Overview

This tutorial covers how to create new entities in the Simulation Editor. It will also show several of the other powerful features of the Simulation Editor.

This tutorial teaches you how to:

  • Starting the Simulator
  • Using the Editor

Starting the Simulator

For this tutorial we will use an existing scene, the apartment scene. We will start the tutorial through DSS Manifest Editor (DSSMe). DSSMe can be found under the "Microsoft Robotics Developer Studio 4" category in the list of programs in the start menu. After DSSMe starts, select "File" -> "Open" and open "SimulationEditorOverview.Manifest.xml" (shown below).

Simulation Editor Overview

Simulation Editor Overview - Opening the SimulationEditorOverview manifest

In DSSMe, the manifest should look like the below image.

Simulation Editor Overview

Simulation Editor Overview - Running the manifest

Run the manifest ("Run" -> "Run Manifest"). The simulation window should open and you should see a scene resembling an apartment scene.

Using the Editor

From the Simulator's menu bar, select "Mode" -> "Edit" (or press F5).

Simulation Editor Overview

Simulation Editor Overview - Switching to Edit mode

A new window pane on the side of the Simulator window should appear. The window should look similar to the below image.

Simulation Editor Overview

Simulation Editor Overview - Edit mode view

One of the useful features of the editor is to pick and reposition entities. Picking an entity can be performed by right clicking on the entity. Pressing left control will allow you to see the entity that has been picked. In the below screenshot, the television was right clicked on and left control is being held down.

Simulation Editor Overview

Simulation Editor Overview - Selecting an entity with right click and highlighting it with left control

Now try moving and rotating the television around by selecting the MoveXZ menu option and the RotateXYZ.

Simulation Editor Overview

Simulation Editor Overview - Rotating an entity

You can press F5 to exit Edit mode and you will notice the television will fall to the floor due to physics.

Another powerful feature of the editor is the ability to create and delete entities through the user interface. To delete the television, just select it (by right clicking), select the item in the list box on the left that is automatically checked, and then press the "Delete" key on your keyboard.

Simulation Editor Overview

Simulation Editor Overview - Selecting an entity in the list view

The television should now be deleted. Now we will create an entity. Select "Entity" -> "New..." as pictured below.

Simulation Editor Overview

Simulation Editor Overview - Adding a new entity

The "New Entity" dialog should open. Let's add a Pioneer3DX entity to the apartment scene.

Simulation Editor Overview

Simulation Editor Overview - Adding a Pioneer3DX

Enter (9, 0, 13) for its position as shown below.

Simulation Editor Overview

Simulation Editor Overview - Setting the entity's initial position

The Pioneer3DX should appear in the apartment as pictured below.

Simulation Editor Overview

Simulation Editor Overview - A Pioneer3DX in the apartment

The editor also allows for changing entity properties at runtime. Select the entity we just added from the list of entities. Then click on the "Edit Entity" button (circled in red below).

Simulation Editor Overview

Simulation Editor Overview - Editing an entity

One property we might want to change is the mass of an entity, especially for custom entities added to the simulator. To do this, select the EntityState field and click on the ellipsis button (...). Then select the mass field and enter a number. By default, the simulator uses SI units for all measurements so mass is in kilograms.

Simulation Editor Overview

Simulation Editor Overview - Editing the EntityState member

Simulation Editor Overview

Simulation Editor Overview - Changing the entity's mass

Any other field in the entity can be changed as well through the editor. In summary, the editor allows you to do many things through the user interface that could only otherwise be performed programmatically.

Summary

In this tutorial, you learned how to:

  • Starting the Simulator
  • Using the Editor

 

 

© 2012 Microsoft Corporation. All Rights Reserved.