User Tools

Site Tools



The Inspectable interface enables inherited objects to expose certain variables/matrices for external inspection (read-only). This is used to provide data to the file logging, Guilogger and Matrixviz, see PlotOptions. By default all controllers and wirings are inspectable. For each agent the system has a PlotOptionEngine that simply takes care of sending the data to the external tools. You can add Inspectables to an agent with addInspectable(). By default the controller, wiring and the robot (if it is Inspectable) are automatically added.

In order to expose a value or matrix/vector use:

  addInspectableMatrix("A", &A, false, "model matrix");
  addInspectableValue("error", &e, "prediction error");

Note, the names should not contain whitespaces. If the matrix is a columns/row vector it is automatically put different. Take a look at the [File Format]

So if you want see in your logfiles/Guilogger… a variable from your ThisSim class you can do the following: Inherit ThisSim from Inspectable and add the Constuctor call with a name

  : Inspectable("My Simulation");

and call in your start() routine

inspectable.txt · Last modified: 2013/03/20 17:04 by georg