ARGoS 3
A parallel, multi-engine simulator for swarm robotics
ci_camera_sensor_led_detector_algorithm.h
Go to the documentation of this file.
1
7#ifndef CI_CAMERAS_SENSOR_LED_DETECTOR_ALGORITHM_H
8#define CI_CAMERAS_SENSOR_LED_DETECTOR_ALGORITHM_H
9
10namespace argos {
11 class CCI_CameraSensorLEDDetectorAlgorithm;
12}
13
14#include <argos3/plugins/robots/generic/control_interface/ci_camera_sensor_algorithm.h>
15#include <argos3/core/utility/datatypes/color.h>
16#include <argos3/core/utility/math/vector2.h>
17#include <argos3/core/utility/datatypes/datatypes.h>
18
19#ifdef ARGOS_WITH_LUA
20extern "C" {
21#include <lua.h>
22#include <lualib.h>
23#include <lauxlib.h>
24}
25#endif
26
27
28namespace argos {
29
31
32 public:
33
34 struct SReading {
35 /* Color */
37 /* Coordinates in image */
44 SReading(const CColor& c_color,
45 const CVector2& c_center) :
46 Color(c_color),
47 Center(c_center) {}
48 };
49
50 public:
51
56
61
62 const std::vector<SReading>& GetReadings() const {
63 return m_vecReadings;
64 }
65
66#ifdef ARGOS_WITH_LUA
67 virtual void CreateLuaState(lua_State* pt_lua_state);
68
69 virtual void ReadingsToLuaState(lua_State* pt_lua_state);
70
71 virtual const std::string& GetId() {
72 static std::string strId("led_detector");
73 return strId;
74 }
75#endif
76
77 protected:
78
79 std::vector<SReading> m_vecReadings;
80
81 };
82
83}
84
85#endif
The namespace containing all the ARGoS related code.
Definition ci_actuator.h:12
The basic color type.
Definition color.h:25
A 2D vector class.
Definition vector2.h:27
SReading(const CColor &c_color, const CVector2 &c_center)
Constructor.