The Sandbox Thread

3 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

VPLSim - Running a VPL Robot in the Simulator

Back to Forum: The Sandbox
  • User profile image

    The Microsoft Robotics Studio simulator and the Visual Programming Language are both cool components in the Microsoft Robotics Studio, but how do you use them together?

    This project is a super-simple example of using the two together.

    To create this example, I simply ran the VPL environment and created the diagram as shown for VPL Tutorial 4.  I then right-clicked on one of the Generic Differential Drive services in the diagram and selected 'Manifest' from the context menu.  For a manifest, I chose MobileRobots.P3DX.Simulation.Manifest.xml.

    If you look at that manifest (in your C:\Microsoft Robotics Studio (October 2006)\samples\config directory), you will see that that manifest contains a reference to the simulator with a persisted simulation environment and a robot drive system and bumpers.  By connecting my Generic Differential Drive to that manifest, I connected the Differential Drive in my diagram to the differential drive on the simulated robot that gets created by that manifest.

    To run the example:
       Download the zip and unpack it somewhere convenient.
       Open a Microsoft Robotics command window
       Go to the directory where you unzipped the example
       Type: vplsim.mvpl
       Use RUN in the VPL environment to run the example.

    Now, after you have run it once in VPL, be sure to use File->Save in VPL and then you can run your diagram outside of VPL like this:

       Open a Microsoft Robotics command window
       Go to the directory where you unzipped the example
       Type: dsshost -port:50000 -tcpport:50001 -manifest:"{directorypath}\vplsim.manifest.xml"
       Of course, replace {directorypath} with the path to the directory where you unzipped the files.

    You have to run once and save in order to update the manifest and other files before you can run them outside of VPL.

    Now this example should beg several questions, like "How do I run more than one robot from VPL?" Or, "How can two of my students run two vpl programs that compete in the same simulation?"  More examples coming soon...

    You can also find the zip file here :

  • User profile image

    Well done Martin Smiley

    Of course, if you have the Maze Simulator (also available from Channel 9) you can use it's manifest instead of the Pioneer3DX manifest. Then you will not only get a robot, but also a maze to drive around in, and a couple of balls to bump into. (The balls don't bounce properly yet, but that is another story.)

    And just in case people do not know, if you press the Tab key in the Simulation window it will switch views to the robot in the latest version of the Maze Simulator. (I stole the code from one of the new Robotics Tutorials.) It's more fun to drive around and see what the robot sees. Martin has gone one better and actually provides the robot view on a floating window inside the Simulator!


    P.S. Yes, this was a shameless plug for the Maze Simulator. However, I have to give credit to Ben Axelrod for the first implementation. I just added colour/texture, height and mass.

  • User profile image

    The maze generator is very cool - a must-have add-on for the Robotics Studio.

    One of the key challenges for folks is going to be learning how to combine these various pieces.  It's really trivial for people to start a single manifest, but the step up to combining multiple manifests and services is still too big compared to the ease of just running something like the tutorials or Maze Simulator by themselves.

    Even if launching multiple manifests were easier, it is still conceptually complex for folks to understand how and when partner references and actual services bind with each other and that complexity extends into VPL.

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.