Specialised agent for ode robots. More...
#include <odeagent.h>
Inherits Agent, and Storeable.

Public Member Functions | |
| OdeAgent (const PlotOption &plotOption=PlotOption(NoPlot), double noisefactor=1, const std::string &name="OdeAgent", const std::string &revision="$ID$") __attribute__((deprecated)) | |
| OdeAgent (const std::list< PlotOption > &plotOptions, double noisefactor=1, const std::string &name="OdeAgent", const std::string &revision="$ID$") __attribute__((deprecated)) | |
| OdeAgent (const GlobalData &globalData, double noisefactor=1, const std::string &name="OdeAgent", const std::string &revision="") | |
| The plotoptions are taken from globaldata. | |
| OdeAgent (const GlobalData &globalData, const PlotOption &plotOption, double noisefactor=1, const std::string &name="OdeAgent", const std::string &revision="") | |
| Provided for convinience. | |
| OdeAgent (const GlobalData &globalData, const PlotOptionList &plotOptions, double noisefactor=1, const std::string &name="OdeAgent", const std::string &revision="") | |
| Provided for convinience. | |
| virtual | ~OdeAgent () |
| virtual bool | init (AbstractController *controller, OdeRobot *robot, AbstractWiring *wiring, long int seed=0) |
| initializes the object with the given controller, robot and wiring and initializes plotoptionengine | |
| virtual void | step (double noise, double time) |
| Performs an step of the agent, including sensor reading, pushing sensor values through the wiring, controller step, pushing controller outputs (= motorcommands) back through the wiring and sent resulting motorcommands to robot. | |
| virtual void | stepOnlyWiredController (double noise, double time) |
| Special function for the class Simulation to seperate the step of the WiredController (plus TrackRobot) and the setting and getting of the motor- and sensorvalues. | |
| virtual void | setMotorsGetSensors () |
| Special function for the class Simulation to seperate the step of the WiredController (plus TrackRobot) and the setting and getting of the motor- and sensorvalues. | |
| virtual void | beforeStep (GlobalData &global) |
| should be called before step() or stepOnlyWiredController() and calls operators and robot->sense() | |
| virtual void | startMotorBabblingMode (int steps, AbstractController *babblecontroller=0, bool fixRobot=true) |
| Enables the motor babbling mode. | |
| virtual void | stopMotorBabblingMode () |
| stops the motor babbling mode. | |
| virtual OdeRobot * | getRobot () |
| Returns a pointer to the robot. | |
| virtual const OdeRobot * | getRobot () const |
| Returns a const pointer to the robot. | |
| virtual int | getTraceLength () |
| virtual bool | setTraceLength (int tracelength) |
| virtual void | setTraceThickness (int tracethickness) |
| virtual void | addTracking (unsigned int primitiveIndex, const TrackRobot &trackrobot, const Color &color) |
| adds tracking for individual primitives | |
| virtual void | setTrackOptions (const TrackRobot &trackrobot) |
| sets the trackoptions which enable tracking of a robot | |
| virtual bool | store (FILE *f) const |
| stores the object to the given file stream (binary). | |
| virtual bool | restore (FILE *f) |
| loads the object from the given file stream (binary). | |
| virtual void | addOperator (Operator *o, bool addToConfigurable=true) |
| adds an operator to the agent (the operator is deleted on destruction of the agent!) | |
| virtual bool | removeOperator (Operator *o) |
| removes the given operator: it is _not_ deleted (memory wise) | |
| virtual void | removeOperators () |
| removes (and deletes) all operators | |
Protected Member Functions | |
| virtual void | trace (GlobalData &global) |
| continues the trace by one segment | |
| virtual void | tryFixateRobot () |
| tries to fixate the robot at fixatingPos | |
Specialised agent for ode robots.
| OdeAgent | ( | const PlotOption & | plotOption = PlotOption(NoPlot), |
|
| double | noisefactor = 1, |
|||
| const std::string & | name = "OdeAgent", |
|||
| const std::string & | revision = "$ID$" | |||
| ) |
| OdeAgent | ( | const std::list< PlotOption > & | plotOptions, | |
| double | noisefactor = 1, |
|||
| const std::string & | name = "OdeAgent", |
|||
| const std::string & | revision = "$ID$" | |||
| ) |
| OdeAgent | ( | const GlobalData & | globalData, | |
| double | noisefactor = 1, |
|||
| const std::string & | name = "OdeAgent", |
|||
| const std::string & | revision = "" | |||
| ) |
The plotoptions are taken from globaldata.
| noisefactor | factor for sensor noise for this agent |
| OdeAgent | ( | const GlobalData & | globalData, | |
| const PlotOption & | plotOption, | |||
| double | noisefactor = 1, |
|||
| const std::string & | name = "OdeAgent", |
|||
| const std::string & | revision = "" | |||
| ) |
Provided for convinience.
A single plotoption is used as given by plotOption
| OdeAgent | ( | const GlobalData & | globalData, | |
| const PlotOptionList & | plotOptions, | |||
| double | noisefactor = 1, |
|||
| const std::string & | name = "OdeAgent", |
|||
| const std::string & | revision = "" | |||
| ) |
Provided for convinience.
The plotoptions are taken from the given plotOptions (and not from globaldata, if you wish to overwrite them)
| ~OdeAgent | ( | ) | [virtual] |
| void addOperator | ( | Operator * | o, | |
| bool | addToConfigurable = true | |||
| ) | [virtual] |
adds an operator to the agent (the operator is deleted on destruction of the agent!)
| void addTracking | ( | unsigned int | primitiveIndex, | |
| const TrackRobot & | trackrobot, | |||
| const Color & | color | |||
| ) | [virtual] |
adds tracking for individual primitives
| void beforeStep | ( | GlobalData & | global | ) | [virtual] |
should be called before step() or stepOnlyWiredController() and calls operators and robot->sense()
| virtual const OdeRobot* getRobot | ( | ) | const [inline, virtual] |
Returns a const pointer to the robot.
| virtual OdeRobot* getRobot | ( | ) | [inline, virtual] |
Returns a pointer to the robot.
Reimplemented from Agent.
| virtual int getTraceLength | ( | ) | [inline, virtual] |
| virtual bool init | ( | AbstractController * | controller, | |
| OdeRobot * | robot, | |||
| AbstractWiring * | wiring, | |||
| long int | seed = 0 | |||
| ) | [inline, virtual] |
initializes the object with the given controller, robot and wiring and initializes plotoptionengine
| bool removeOperator | ( | Operator * | o | ) | [virtual] |
removes the given operator: it is _not_ deleted (memory wise)
| void removeOperators | ( | ) | [virtual] |
removes (and deletes) all operators
| bool restore | ( | FILE * | f | ) | [virtual] |
loads the object from the given file stream (binary).
Implements Storeable.
| void setMotorsGetSensors | ( | ) | [virtual] |
Special function for the class Simulation to seperate the step of the WiredController (plus TrackRobot) and the setting and getting of the motor- and sensorvalues.
| virtual bool setTraceLength | ( | int | tracelength | ) | [inline, virtual] |
| virtual void setTraceThickness | ( | int | tracethickness | ) | [inline, virtual] |
| void setTrackOptions | ( | const TrackRobot & | trackrobot | ) | [virtual] |
sets the trackoptions which enable tracking of a robot
Reimplemented from Agent.
| void startMotorBabblingMode | ( | int | steps, | |
| AbstractController * | babblecontroller = 0, |
|||
| bool | fixRobot = true | |||
| ) | [virtual] |
Enables the motor babbling mode.
The robot is move into the air and is fixed by a fixed joint if fixRobot==true See WiredController::startMotorBabblingMode().
Reimplemented from WiredController.
| void step | ( | double | noise, | |
| double | time | |||
| ) | [virtual] |
Performs an step of the agent, including sensor reading, pushing sensor values through the wiring, controller step, pushing controller outputs (= motorcommands) back through the wiring and sent resulting motorcommands to robot.
| noise | Noise strength. | |
| time | (optional) current simulation time (used for logging) |
Reimplemented from Agent.
| void stepOnlyWiredController | ( | double | noise, | |
| double | time | |||
| ) | [virtual] |
Special function for the class Simulation to seperate the step of the WiredController (plus TrackRobot) and the setting and getting of the motor- and sensorvalues.
| noise |
| time |
| void stopMotorBabblingMode | ( | ) | [virtual] |
stops the motor babbling mode.
Reimplemented from WiredController.
| bool store | ( | FILE * | f | ) | const [virtual] |
stores the object to the given file stream (binary).
Implements Storeable.
| void trace | ( | GlobalData & | global | ) | [protected, virtual] |
continues the trace by one segment
| void tryFixateRobot | ( | ) | [protected, virtual] |
tries to fixate the robot at fixatingPos
1.6.3