9 #include <argos3/core/simulator/simulator.h>
10 #include <argos3/core/utility/math/matrix/squarematrix.h>
11 #include <argos3/core/utility/math/matrix/transformationmatrix3.h>
13 #include <argos3/plugins/simulator/media/tag_medium.h>
14 #include <argos3/plugins/simulator/entities/tag_entity.h>
23 m_pcTagIndex(nullptr) {}
35 std::string strMedium;
48 const std::array<CPlane, 6>& arr_frustum_planes,
51 const CVector3& c_bounding_box_position,
52 const CVector3& c_bounding_box_half_extents) {
55 c_camera_to_world_transform, c_camera_location,
62 m_pcTagIndex->ForEntitiesInBoxRange(c_bounding_box_position,
63 c_bounding_box_half_extents,
72 "Michael Allwright [allsey87@gmail.com]",
74 "This algorithm detects nearby tags seen by the camera and\n"
75 "returns the coordinates of their corners to the sensor",
76 "This algorithm detects nearby tags seen by the camera and\n"
77 "returns the coordinates of their corners to the sensor",
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
The namespace containing all the ARGoS related code.
REGISTER_CAMERA_SENSOR_ALGORITHM(CCameraSensorDirectionalLEDDetectorAlgorithm, "directional_led_detector", "Michael Allwright [allsey87@gmail.com]", "1.0", "This algorithm detects nearby LEDs seen by the camera and\n" "returns the X and Y coordinates on the sensor", "This algorithm detects nearby LEDs seen by the camera and\n" "returns the X and Y coordinates on the sensor", "Under development")
void GetNodeAttributeOrDefault(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer, const T &t_default)
Returns the value of a node's attribute, or the passed default value.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
T & GetMedium(const std::string &str_id)
Returns a reference to a medium.
static CSimulator & GetInstance()
Returns the instance to the CSimulator class.
The exception that wraps all errors in ARGoS.
virtual void Init(TConfigurationNode &t_node)
Initializes the resource.
std::vector< SReading > m_vecReadings
std::vector< std::pair< bool, CRay3 > > m_vecCheckedRays
This class provides the most general interface to a camera.
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
CCameraSensorTagDetectorAlgorithm()
virtual void Update(const CSquareMatrix< 3 > &c_projection_matrix, const std::array< CPlane, 6 > &arr_frustum_planes, const CTransformationMatrix3 &c_camera_to_world_transform, const CVector3 &c_camera_location, const CVector3 &c_bounding_box_position, const CVector3 &c_bounding_box_half_extents)