ARGoS  3
A parallel, multi-engine simulator for swarm robotics
argos::CLuaController Class Reference

#include <lua_controller.h>

+ Inheritance diagram for argos::CLuaController:

List of all members.

Public Member Functions

 CLuaController ()
virtual ~CLuaController ()
virtual void Init (TConfigurationNode &t_tree)
 Initializes the controller.
virtual void ControlStep ()
 Executes a control step.
virtual void Reset ()
 Resets the state of the controller to what it was right after Init() was executed.
virtual void Destroy ()
 The default implementation of this method does nothing.
lua_State * GetLuaState ()
virtual void SetLuaScript (const std::string &str_script)
virtual void CreateLuaState ()
virtual void SensorReadingsToLuaState ()
bool IsOK () const
std::string GetErrorMessage ()

Detailed Description

Definition at line 16 of file lua_controller.h.


Constructor & Destructor Documentation

Definition at line 27 of file lua_controller.cpp.


Member Function Documentation

Executes a control step.

The logic of your controller goes here. The default implementation does nothing.

Reimplemented from argos::CCI_Controller.

Definition at line 64 of file lua_controller.cpp.

Definition at line 136 of file lua_controller.cpp.

void argos::CLuaController::Destroy ( ) [virtual]

The default implementation of this method does nothing.

See also:
Init()
Reset()

Reimplemented from argos::CCI_Controller.

Definition at line 92 of file lua_controller.cpp.

Definition at line 181 of file lua_controller.cpp.

lua_State* argos::CLuaController::GetLuaState ( ) [inline]

Definition at line 32 of file lua_controller.h.

void argos::CLuaController::Init ( TConfigurationNode t_node) [virtual]

Initializes the controller.

You should always perform all your memory allocation and configuration in this method, and not in the constructor. The default implementation of this method does nothing.

Parameters:
t_nodeThe <params> XML tree associated to this controller.
See also:
Reset()
Destroy()

Reimplemented from argos::CCI_Controller.

Definition at line 33 of file lua_controller.cpp.

bool argos::CLuaController::IsOK ( ) const [inline]

Definition at line 42 of file lua_controller.h.

void argos::CLuaController::Reset ( ) [virtual]

Resets the state of the controller to what it was right after Init() was executed.

Note that the state of the robot, as well as the state of sensors and actuators is automatically reset by ARGoS outside this class. The default implementation of this method does nothing.

See also:
Init()
Destroy()

Reimplemented from argos::CCI_Controller.

Definition at line 78 of file lua_controller.cpp.

Definition at line 165 of file lua_controller.cpp.

void argos::CLuaController::SetLuaScript ( const std::string &  str_script) [virtual]

Definition at line 104 of file lua_controller.cpp.


The documentation for this class was generated from the following files: