ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
#include <lua_controller.h>
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 () |
Definition at line 16 of file lua_controller.h.
Definition at line 17 of file lua_controller.cpp.
argos::CLuaController::~CLuaController | ( | ) | [virtual] |
Definition at line 27 of file lua_controller.cpp.
void argos::CLuaController::ControlStep | ( | ) | [virtual] |
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.
void argos::CLuaController::CreateLuaState | ( | ) | [virtual] |
Definition at line 136 of file lua_controller.cpp.
void argos::CLuaController::Destroy | ( | ) | [virtual] |
The default implementation of this method does nothing.
Reimplemented from argos::CCI_Controller.
Definition at line 92 of file lua_controller.cpp.
std::string argos::CLuaController::GetErrorMessage | ( | ) |
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.
t_node | The <params> XML tree associated to this controller. |
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.
Reimplemented from argos::CCI_Controller.
Definition at line 78 of file lua_controller.cpp.
void argos::CLuaController::SensorReadingsToLuaState | ( | ) | [virtual] |
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.