9 #ifndef LOOP_FUNCTIONS_H
10 #define LOOP_FUNCTIONS_H
15 class CPositionalEntity;
16 class CEmbodiedEntity;
21 #include <argos3/core/utility/configuration/base_configurable_resource.h>
22 #include <argos3/core/simulator/simulator.h>
23 #include <argos3/core/simulator/space/space.h>
24 #include <argos3/core/utility/datatypes/color.h>
25 #include <argos3/core/utility/math/vector2.h>
26 #include <argos3/core/utility/math/vector3.h>
27 #include <argos3/core/utility/math/quaternion.h>
28 #include <argos3/core/simulator/physics_engine/physics_engine.h>
213 bool b_check_only =
false,
214 bool b_ignore_collisions =
false);
231 virtual void RemoveEntity(
const std::string& str_entity_id);
284 #define REGISTER_LOOP_FUNCTIONS(CLASSNAME, LABEL) \
285 REGISTER_SYMBOL(CLoopFunctions, \
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
This entity is a link to a body in the physics engine.
A set of hook functions to customize an experimental run.
virtual void PostExperiment()
Executes user-defined logic when the experiment finishes.
const CSpace & GetSpace() const
virtual void PostStep()
Executes user-defined logic right after a control step is executed.
virtual void Destroy()
Executes user-defined destruction logic.
CSpace & GetSpace()
Returns a reference to the space state.
virtual void Init(TConfigurationNode &t_tree)
Executes user-defined initialization logic.
virtual CColor GetFloorColor(const CVector2 &c_pos_on_floor)
Returns the color of the floor in the specified point.
virtual bool IsExperimentFinished()
Returns true if the experiment is finished.
CLoopFunctions()
Class constructor.
virtual ~CLoopFunctions()
Class destructor.
virtual void RemoveEntity(const std::string &str_entity_id)
Removes an entity from the simulation.
virtual void MoveEntity(CPositionalEntity &c_entity, const CVector3 &c_position, const CQuaternion &c_orientation)
Moves the entity to the wanted position and orientation.
CSimulator & GetSimulator()
Returns the simulator instance.
virtual void PreStep()
Executes user-defined logic right before a control step is executed.
void IterateOverControllableEntities(const CSpace::TControllableEntityIterCBType &c_cb) const
Iterate over all controllable entities currently present in the arena (including those that are curre...
virtual void AddEntity(CEntity &c_entity)
Adds the passed entity to the simulation.
virtual void Reset()
Executes user-defined reset logic.
virtual void IterateOverControllableEntities(const TControllableEntityIterCBType &c_cb)=0
Given a callback specified in the loop functions, iterate over all controllable entities currently pr...
std::function< void(CControllableEntity *)> TControllableEntityIterCBType
The callback type for iteration over controllable entities within the PreStep() and/or PostStep() par...
This class is the base of all XML-configurable ARGoS interface.