base class for robot simulation and evaluation.
base class for robot simulation and evaluation. D2kSimulators perform simulation book-keeping (such as allocating dynamicSystems and instantiating configurations), coordinate multiple d2kComponents, and keep track of the metrics being used to evaluate configurations.All of the above functionality is present in the d2kSimulator base class. Derived classes can take advantage of this functionality while overriding the evaluateConfiguration() method, which allows the user to write application-specific simulation control (such as sequentially simulating multiple scenarios, or changing controllers as the simulation progresses). If no special interactions with (or between) d2kComponents is required, then the user can just use the d2kSimulator to perform initialization and bookkeeping. In this case, the user can access the d2kSimulator's dynamicSystem (ds) to control the physical simulation directly.
Virtual methods for derived classes Derived d2kSimulators may override the following methods:
For all of the above functions except evaluateConfiguration, the derived methods must call the parent class's method (e.g. init() should call the parent class's init() method).
- readParams()
- init()
- cleanup()
- setVariables()
- evaluateConfiguration()
- postComponentCreationHook()
Users writing their own d2kSimulator class should start with (or at least look at) the dummy versions created by darwin2k-makemod.
Alphabetic index HTML hierarchy of classes or Java