1 / 17

Distributed Virtual Environment and Simulation Package

Distributed Virtual Environment and Simulation Package. Stephen Lawrence stevel@cc.gatech.edu. Overview of Topics. Type of Simulation Federation Organization Class Organization Internals of some DVESIM classes Creating a Federate Creating Simulation Objects.

erachel
Download Presentation

Distributed Virtual Environment and Simulation Package

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Distributed Virtual Environment and Simulation Package Stephen Lawrence stevel@cc.gatech.edu

  2. Overview of Topics • Type of Simulation • Federation Organization • Class Organization • Internals of some DVESIM classes • Creating a Federate • Creating Simulation Objects

  3. Object Based Simulation (using c++) Simulator, object(such as a tank or projectile), and battlefield classes new object types are created by sub-classing existing objects Event Driven Classes define event handlers to process events Federated (using DRTI) Each federate has local and non-local entities object updates are only send when needed Messages are sent between user and entities Type of Simulation

  4. Simulator Federate Simulator Federate Simulator Federate Federation Organization UI Federate UI Federate

  5. Federation Organization (cont) • Simulator Federates • Each controls a number of objects within the simulation world • Sends and received updates and interactions concerning it’s objects, and objects controlled by other federates • UI Federates • Allows users to view and interact with object in the Federation

  6. Simulator Object Battlefield Event Tick New Object Movement Order Collision Class Organization Simulator Federate Classes Structure Entity Projectile =subclass

  7. Manages Event Queue Schedules events Dispatches events to objects Simulates Battlefield Collision/proximity detection Projectile detonation Federate communication sends and receives events such as object updates and messages Internals: Simulator ClassEach simulator federate runs one instance of the simulator class

  8. Internals: Simulator Class (continued)

  9. Simulation Class Execution init() Schedule all new object events for all local objects. Sets up simulation state schedules first new state event run() while event-queue not empty process event deliver event to object if necessary finishUp() Internals: Simulator Class (continued)

  10. Internals: Simulator Class Example • The federates executive function removes the tick event from the event queue. • The tick event is passed to the federates tick event handler (a method of it's simulator class). • The tick event is forwarded, by the simulators event handler, to all objects in the battlefield. • The simulator class checks for collision between it's local objects and all objects in the battlefield (local and foreign). • A new tick event is created and scheduled for some small time in the future.

  11. Manages objects objects hashed by RTI::ObjectHandle for fast access Provides means for objects to access other objects Contains both locally controlled objects, and objects controlled by other federates. Terrain Information (not implemented) provides terrain type for given coordinates on the battlefield objects view the world in only two dimensions, the battlefield provides additional elevation and slope information when needed Internals: Battlefield Class

  12. Stores Event Information (TimeStamp, details) Tick Event -> triggers location updates and collision detection New Object Event -> adds a new object to the battlefield Order Event -> sends object and simulation messages, such as orders, simulation over, etc… Other Events Movement Event, Collision Event, Proximity Event,Detonation Event, User Defined Events Internals: Event Class

  13. Internals: Event Class Example • Collision event is passed to the event handler by the executive function when it is safe to process. • The event handler passes the collision event to the local object involved in the collision (if two local objects are in collision, each will get it's own event). • The object reacts to the collision event. The default action is to do nothing, but subclasses of the object type can redefine the event handlers to do something interesting, such as stop, change direction, or calculate a new path.

  14. Physical State Information (location, velocity, acceleration) Processes New State events to update it’s physical state Entity Subclass Provides basic movement services (set heading/location, etc) Fires projectiles Internals: Object Class

  15. Object Class Execution A new object is created and stored in new object event The simulator later processes new object event Calls object init() function Sends New State and other events to object Object is removed by a call to exitObject() objects finishUp() function is called, and the object is deleted Internals: Object Class (continued)

  16. Internals: Object Class Example • Simulator federate #1 schedules schedules a new object event for object A at time 1, register's an object instance for it within thefederation, and sends an attribute update for the the object with timestamp 1 • Simulator federate #2 discovers the object, creates a new object instance, and puts it in a temporary holding place. • When requesting a Next Event Request for time 1, federate #2's RTI ambassador delivers the attribute update for object A • Federate #2, now having received the first attribute information about object A, schedules a new object event with timestamp 1, which will be processed to add object A to it's battlefield. • After completing a Next Event Request for timestep 1, federate #1 will be able to process it's new object event and add object A to it's battlefield.

  17. Display’s all the objects in the federation Paces the simulation with wallclock time Allows user to send messages to the objects (entities) Internals: Visualization

More Related