4#include <argos3/core/wrappers/lua/lua_utility.h>
13 int LuaEnableOmnidirectionalCamera(lua_State* pt_lua_state) {
24 int LuaDisableOmnidirectionalCamera(lua_State* pt_lua_state) {
35 void CCI_ColoredBlobOmnidirectionalCameraSensor::CreateLuaState(lua_State* pt_lua_state) {
40 for(
size_t i = 0; i <
m_sReadings.BlobList.size(); ++i) {
56 void CCI_ColoredBlobOmnidirectionalCameraSensor::ReadingsToLuaState(lua_State* pt_lua_state) {
57 lua_getfield(pt_lua_state, -1,
"colored_blob_omnidirectional_camera");
59 size_t unLastBlobNum = lua_rawlen(pt_lua_state, -1);
61 for(
size_t i = 0; i <
m_sReadings.BlobList.size(); ++i) {
72 for(
size_t i =
m_sReadings.BlobList.size()+1; i <= unLastBlobNum; ++i) {
73 lua_pushnumber(pt_lua_state, i);
74 lua_pushnil (pt_lua_state );
75 lua_settable (pt_lua_state, -3);
78 lua_pop(pt_lua_state, 1);
The namespace containing all the ARGoS related code.
static void EndTable(lua_State *pt_state)
Adds a table to the Lua stack.
static void AddToTable(lua_State *pt_state, const std::string &str_key, void *pt_data)
Adds a pointer to a chunk of data with the given string key to the table located at the top of the st...
static void StartTable(lua_State *pt_state, const std::string &str_key)
Adds a table with the given string key to the table located at the top of the stack.
static void OpenRobotStateTable(lua_State *pt_state, const std::string &str_key)
Opens a table in the robot state, creating it if it does not exist.
static void CloseRobotStateTable(lua_State *pt_state)
Closes a table in the robot state.
static T * GetDeviceInstance(lua_State *pt_state, const std::string &str_key)
Returns a pointer to the instance to the wanted device.
const SReadings & GetReadings() const
Returns a reference to the current camera readings.
An SBlob represents a generic colored 2D segment in the image.
It represents the readings collected through the camera at a specific time step.