#include <agent.h>
Inherited by OdeAgent.
Inheritance diagram for Agent:
Public Member Functions | |
Agent (const PlotOption &plotOption=PlotOption(NoPlot), double noisefactor=1) | |
constructor. | |
Agent (const std::list< PlotOption > &plotOptions, double noisefactor=1) | |
constructor. | |
virtual | ~Agent () |
destructor | |
virtual bool | init (AbstractController *controller, AbstractRobot *robot, AbstractWiring *wiring) |
initializes the object with the given controller, robot and wiring and initializes the output options | |
virtual void | step (double noise) |
Performs an step of the agent, including sensor reading, pushing sensor values through wiring, controller step, pushing controller outputs (= motorcommands) back through wiring and sent resulting motorcommands to robot. | |
virtual void | onlyControlRobot () |
Sends only last motor commands again to robot. | |
virtual AbstractController * | getController () |
Returns a pointer to the controller. | |
virtual AbstractRobot * | getRobot () |
Returns a pointer to the robot. | |
virtual AbstractWiring * | getWiring () |
Returns a pointer to the wiring. | |
virtual void | setTrackOptions (const TrackRobot &trackrobot) |
sets the trackoptions which enable tracking of a robot | |
virtual void | addPlotOption (const PlotOption &plotoption) |
adds the PlotOptions to the list of plotoptions If a plotoption with the same Mode exists, then the old one is deleted first | |
virtual bool | removePlotOption (PlotMode mode) |
removes the PlotOptions with the given type | |
virtual void | writePlotComment (const char *cmt) |
write comment to output streams (PlotOptions). | |
Protected Member Functions | |
virtual void | plot (const sensor *rx, int rsensornumber, const sensor *cx, int csensornumber, const motor *y, int motornumber) |
Plots controller sensor- and motorvalues and internal controller parameters. | |
void | internInit () |
Protected Attributes | |
AbstractController * | controller |
AbstractRobot * | robot |
AbstractWiring * | wiring |
int | rsensornumber |
number of sensors of robot | |
int | rmotornumber |
number of motors of robot | |
int | csensornumber |
number of sensors of comntroller | |
int | cmotornumber |
number of motors of comntroller | |
double | noisefactor |
factor that is muliplied with noise stength | |
sensor * | rsensors |
motor * | rmotors |
sensor * | csensors |
motor * | cmotors |
TrackRobot | trackrobot |
Private Attributes | |
std::list< PlotOption > | plotOptions |
int | t |
Additionally there are some ways to keep track of internal information. You have the possibility to keep track of sensor values, motor values and internal parameters of the controller with PlotOptions. The name PlotOptions is a bit missleaded, it should be "OutputOptions", however you can write the data into a file or send it to visialisation tools like guilogger or neuronviz.
If want to log the position, speed and orienation of your robot you can use setTrackOptions().
integration/main.cpp, and main.cpp.
|
constructor. PlotOption as output setting. noisefactor is used to set the relative noise strength of this agent |
|
constructor. A list of PlotOption can given. noisefactor is used to set the relative noise strength of this agent |
|
destructor
|
|
adds the PlotOptions to the list of plotoptions If a plotoption with the same Mode exists, then the old one is deleted first
|
|
Returns a pointer to the controller.
|
|
Returns a pointer to the robot.
Reimplemented in OdeAgent.
|
|
Returns a pointer to the wiring.
|
|
initializes the object with the given controller, robot and wiring and initializes the output options
|
|
Reimplemented in OdeAgent.
|
|
Sends only last motor commands again to robot.
|
|
Plots controller sensor- and motorvalues and internal controller parameters.
|
|
removes the PlotOptions with the given type
|
|
sets the trackoptions which enable tracking of a robot
|
|
Performs an step of the agent, including sensor reading, pushing sensor values through wiring, controller step, pushing controller outputs (= motorcommands) back through wiring and sent resulting motorcommands to robot.
Reimplemented in OdeAgent.
|
|
write comment to output streams (PlotOptions). For instance changes in parameters. |
|
number of motors of comntroller
|
|
|
|
|
|
number of sensors of comntroller
|
|
|
|
factor that is muliplied with noise stength
|
|
|
|
number of motors of robot
|
|
|
|
|
|
number of sensors of robot
|
|
|
|
|
|
|
|
|