Microsoft Robotics

Glossary Item Box

Simulation Entities: Simulated Robotics Services Overview

Microsoft Robotics Developer StudioSend feedback on this topic


Simulation Entities are used to programmatically build simulated environments.

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

Sample location




Entities requires no special hardware apart from a suitable graphics card to run the Simulator.


This software is designed to run with Microsoft Robotics Developer Studio.


Simulated environments are based on simulation entities. These are objects that can be created by a program. The simplest examples are boxes and spheres (balls). Entities have a large range of properties including mass, color, size, etc.

Entities can also have a mesh which is used to give them a more detailed appearance and make them look realistic. The Visual Simulation Environment does not include any utilities for creating meshes. To do this you need a 3D modelling program such as TrueSpace, Maya, 3D Studio Max, Blender, etc.

The simulator physics engine can apply forces, such as gravity and friction, to entities. It can also detect collisions between entities. Normally two entities cannot occupy the same space.

Some entities have an associated DSS service that can be used by other services to control the entity. For example, the Simulated Differential Drive allows you to control a robot and drive it around. This consists of two components: an entity that is part of the simulation and a service that interfaces with other services via the standard Generic Differential Drive contract. Other services do not need to know anything about the entity, and in fact they should be unaware that they are communicating with a simulated drive because it should behave in the same way as a real drive.


If you want to write your own entities, you can use the sample code provided for the sensors and actuators as examples to create new entities. You must create entities with new names. You cannot recompile the existing entities to change their appearance or behavior because they are built into the Simulator.

Wheel Entity

The Wheel Entity is used to simulate wheels in motor vehicles.

Samples using the WheelEntity

The WheelEntity is installed automatically with RDS. The SimulatedFourByFourDrive sample is a good example of using the WheelEntity.

Notes on the WheelEntity

The WheelEntity behaves differently than most of the other sample entities in samples\simulation\entities\entities.cs. All WheelEntity instances require a parent reference which is usually set to the entity the wheel is attached to. Also, instead of calling CreateAndInsertPhysicsEntity, the WheelEntity calls InsertShape on its parent’s PhysicsEntity. This adds the WheelEntity shape to the set of shapes that makes up the parent. As far as the physics engine is concerned, the wheel shapes are just part of the parent entity. This reduces the amount of computation required by the physics engine because it doesn’t have to calculate the interactions between the wheels and the chassis and platform shapes. It assumes that they are rigidly joined.

You must explicitly call the Initialize method for each WheelEntity because these entities have not been inserted into the parent entity as children using the InsertEntity method.

Also, you must call the base.Initialize method, which, among other things, loads any meshes or textures associated with the entity. If no mesh was specified in the State.Assets.Mesh, simple meshes are constructed from the shapes in the entity.

Finally, RDS 2008 brings a more accurate physics solver model for wheel entities. The WheelEntity takes a WheelShapeProperties that describes several intuitive parameters about the wheel such as tire radius, wheel mass, and other properties. The TireLateralForceFunction and TireLongitudalForceFunction members of the WheelShapeProperties describe the rotational and back and forth movement of the wheels, respectively. They behave slightly differently than in previous releases due to the improved physics solver. By default, they are initialized to values that roughly match the behavior in the previous release. However, by lowering the StiffnessFactor member of these members, you can better approximate wheel slippage. Wheel slippage is also now affected by the mass of the object it is attached to, whereas in previous releases this was not the case. This new model better approximates real world physics.


This covered the following:

Simulation Entities: Simulated Robotics Services Overview



© 2012 Microsoft Corporation. All Rights Reserved.