|
Tutorial 3: How MSRS works?
This tutorial will guide you through the basic functioning of a simple visual simulation created using MSRS.
To explain the working we will take the example of a manually controlled explorer robot. say the robot will certainly have the following features/entities:
1.) A Laser Sensor
2.) A differential drive
3.) A controller
4.) A device that can track laser signals
A simulation using MSRS is created in the following way:
First, a manifest is created when you build your code. The manifest is an XML document which calls the various services as contracts. Hence, the manifest must contain a call for the .dll files of the environment. This would load the entire environment/program. Now, a differential drive or a laser entity are classes provided in the MSRS library. A programmer may either use these by including them in the .dll files associated with environment. Also, the device that controls the differential drive / tracks the laser signals is a dashboard. MSRS library also includes a simple dashboard.
In essence, one can create the simulation by:
1.) Including and using various classes required (differential drive, laser sensor/bump sensor, dashboard) in the code and making corresponding .dll files.
2.) Next, a manifest is created that uses the file as a contract, ie the manifest calls the .dll files.
3.) Any meshes and/or media files required are then stored in a folder (usually the root folder\store\media folder). The address of these files are specified in the code using them.
4.) A shortcut might be created. It calls the corresponding manifest, hence running the simulation.
It is worth noting that you might use a customized dashboard and/or a customized differential drive, laser sensor, etc.. To include those you must include the .dll files corresponding to your version of dashboard, differential drive, laser sensor etc. (in the Bin folder) and mention a call to it in the manifest that calls the dashboard and/or a manifest that calls the differential drive similar to the manifest that calls the main program. Obviously, you will need to include the media feels if any needed in the root\store\media folder.
It is good practice to store manifest files in \Config folder, media files in \store\media folder , etc. hence, avoiding the need to mention entire paths.
Note:
A rebuild of a project causes its included types to change proxies in accord with the corresponding manifest files. One must make sure as to avoid rebuilding code
that contains MSRS built-in types such as LRF sensor, differrential drive which otherwise might cause shared simulations to stop working due to the mentioned change in proxies.
Any Further queries or doubts can be posted at ROBOTIX FORUM
