#include <almEvolutionAgent.h>
Inherited by srAlmende::AlmPuppet.
Public Member Functions | |
| AlmEvolutionAgent (const std::string &name, srCore::RobotActorBase *robotActor) | |
| void | ProcessMessage (const dtGame::Message &message) |
This agent is a "controller component", more specific, it is derived from the controllerComponentBase. It gets position information from the tcpipController via SimulationMessageType::TCPIP messages. This can be used by this class to reposition the robot to start a new trial.
At the end of the trial this robot will be automatically suspended and repositioned again. Before the end, it might be possible that the robot has finished it's task. That is the reason for the existence of the PostProcessMessage routine in this class. Every time that this method is called, it checks actuators and sends a SimulationMessageType::EVOLUTION message.
The routine PostProcessMessage is depending on the type of robot and how they signal that they are finished, so the actual implementation has to be done in the derived classes.
Definition at line 36 of file almEvolutionAgent.h.
| srAlmende::AlmEvolutionAgent::AlmEvolutionAgent | ( | const std::string & | name, | |
| srCore::RobotActorBase * | robotActor | |||
| ) |
The constructor is just a ControllerComponent, no additional fields needed.
Definition at line 12 of file almEvolutionAgent.cpp.
| void srAlmende::AlmEvolutionAgent::ProcessMessage | ( | const dtGame::Message & | message | ) |
The sender of this message already knows how to extract the type of the message, and the id of the receiver. It doesn't know how to interpret the rest of the message. The only thing that the almEvolutionAgent has to do is to transform the message in a position and place the robot in that position.
Reimplemented in srAlmende::AlmChoreoAgent.
Definition at line 29 of file almEvolutionAgent.cpp.
1.6.1