8 #include <argos3/core/utility/math/angles.h>
11 #include <argos3/core/wrappers/lua/lua_utility.h>
19 static CRadians SPACING = CRadians(
ARGOS_PI / 12.0f);
20 static CRadians START_ANGLE = SPACING * 0.5f;
27 for(
size_t i = 0; i < 24; ++i) {
44 void CCI_EyeBotProximitySensor::CreateLuaState(lua_State* pt_lua_state) {
60 void CCI_EyeBotProximitySensor::ReadingsToLuaState(lua_State* pt_lua_state) {
61 lua_getfield(pt_lua_state, -1,
"proximity");
63 lua_pushnumber(pt_lua_state, i+1 );
64 lua_gettable (pt_lua_state, -2 );
66 lua_setfield (pt_lua_state, -2,
"value" );
67 lua_pop(pt_lua_state, 1);
69 lua_pop(pt_lua_state, 1);
79 c_os <<
"Value=<" << s_reading.
Value
80 <<
">, Angle=<" << s_reading.
Angle <<
">";
89 if(! t_readings.empty()) {
90 c_os <<
"{ " << t_readings[0].Value <<
" }";
91 for(
UInt32 i = 1; i < t_readings.size(); ++i) {
92 c_os <<
" { " << t_readings[0].Value <<
" }";