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/led_medium.h> 14 #include <argos3/plugins/simulator/entities/led_entity.h> 23 m_pcLEDIndex(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_world_to_camera_transform, c_camera_location,
62 m_pcLEDIndex->ForEntitiesInBoxRange(c_bounding_box_position,
63 c_bounding_box_half_extents,
72 "Michael Allwright [allsey87@gmail.com]",
74 "This algorithm detects nearby LEDs seen by the camera and\n" 75 "returns the X and Y coordinates on the sensor",
76 "This algorithm detects nearby LEDs seen by the camera and\n" 77 "returns the X and Y coordinates on the sensor",
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception...
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.
virtual void Update(const CSquareMatrix< 3 > &c_projection_matrix, const std::array< CPlane, 6 > &arr_frustum_planes, const CTransformationMatrix3 &c_world_to_camera_transform, const CVector3 &c_camera_location, const CVector3 &c_bounding_box_position, const CVector3 &c_bounding_box_half_extents)
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\ "returns the X and Y coordinates on the sensor", "This algorithm detects nearby LEDs seen by the camera and\" "returns the X and Y coordinates on the sensor", "Under development")
The exception that wraps all errors in ARGoS.
virtual void Init(TConfigurationNode &t_node)
Initializes the resource.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
static CSimulator & GetInstance()
Returns the instance to the CSimulator class.
std::vector< std::pair< bool, CRay3 > > m_vecCheckedRays
std::vector< SReading > m_vecReadings
virtual void Init(TConfigurationNode &t_tree)
Initializes the resource.
This class provides the most general interface to a camera.
T & GetMedium(const std::string &str_id)
Returns a reference to a medium.
The namespace containing all the ARGoS related code.
CCameraSensorLEDDetectorAlgorithm()