ARGoS 3
A parallel, multi-engine simulator for swarm robotics
ci_camera_sensor_tag_detector_algorithm.h
Go to the documentation of this file.
1
7#ifndef CI_CAMERAS_SENSOR_TAG_DETECTOR_ALGORITHM_H
8#define CI_CAMERAS_SENSOR_TAG_DETECTOR_ALGORITHM_H
9
10namespace argos {
11 class CCI_CameraSensorTagDetectorAlgorithm;
12}
13
14#include <argos3/plugins/robots/generic/control_interface/ci_camera_sensor_algorithm.h>
15#include <argos3/core/utility/math/vector2.h>
16#include <argos3/core/utility/datatypes/datatypes.h>
17#include <array>
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 /* Payload of the tag */
36 std::string Payload;
37 /* Coordinates of the center in image */
39 /* Coordinates of the corners in image */
40 std::array<CVector2, 4> Corners;
47 SReading(const std::string& str_payload,
48 const CVector2& c_center,
49 const std::array<CVector2, 4>& c_corners) :
50 Payload(str_payload),
51 Center(c_center),
52 Corners(c_corners) {}
53 };
54
55 public:
56
61
66
67 const std::vector<SReading>& GetReadings() const {
68 return m_vecReadings;
69 }
70
71#ifdef ARGOS_WITH_LUA
72 virtual void CreateLuaState(lua_State* pt_lua_state);
73
74 virtual void ReadingsToLuaState(lua_State* pt_lua_state);
75
76 virtual const std::string& GetId() {
77 static std::string strId("tag_detector");
78 return strId;
79 }
80#endif
81
82 protected:
83
84 std::vector<SReading> m_vecReadings;
85
86 };
87
88}
89
90#endif
The namespace containing all the ARGoS related code.
Definition ci_actuator.h:12
A 2D vector class.
Definition vector2.h:27
SReading(const std::string &str_payload, const CVector2 &c_center, const std::array< CVector2, 4 > &c_corners)
Constructor.