locked
add another window to simulation RRS feed

  • Question

  • Hi

    I am using the  ReferencePlatform2011.Simulation.user.manifest which has been redirected show the irobot.create.simulation.user.xml instead of the Apartment.SimulationEngineState so that a simple flat surface is now shown.

    The simulation now shows the main window, a smaller window of the DepthCam View, a smaller window of the WebCam View, a smaller window of the Obstacle Avoidance, and the Robot Dashboaard.

    How can I add another window looking at the simulation with a different camera position and look-at point?

    Also, can I fix the size and position of where the windows appear?

    Wednesday, August 28, 2013 2:31 PM

Answers

  • You can always get a view from any of the cameras in simulation in a separate window by selecting the appropriate entry under the 'Camera' menu.

    The windows that open when you start the manifest you mentioned are part of the RobotDashboard.  If you look in that project you'll a DepthCamForm and a WebCamForm.  Look in the 'Camera' or 'DepthCamera' regions of RobotDashboard.cs to see how these are initialized and updated.  It should be straightforward to follow these patterns if you want to add a view from another camera.

    You can add a CameraEntity to create a new camera.  The PursuitCamera sample shows how to create a camera entity with more interesting behaviors.

    I haven't tried playing with the initial position of the windows (and I'm not sure why your initial windows sizes have changed), but you should be able to set initial size and position with the relevant properties of the windows form (e.g. StartPosition property etc..):  http://msdn.microsoft.com/en-us/library/system.windows.forms.form.startposition.aspx

    Bryan

    • Marked as answer by mark726 Wednesday, September 4, 2013 9:05 AM
    Wednesday, September 4, 2013 5:57 AM
    Moderator