camera_default_sensor.cpp File Reference
#include "camera_default_sensor.h"
#include <argos3/core/simulator/simulator.h>
#include <argos3/core/simulator/entity/composable_entity.h>
#include <argos3/plugins/robots/generic/simulator/camera_sensor_algorithm.h>
Include dependency graph for camera_default_sensor.cpp:

Go to the source code of this file.

Namespaces

 argos
 The namespace containing all the ARGoS related code.
 

Functions

 argos::REGISTER_SENSOR (CCameraDefaultSensor, "cameras", "default", "Michael Allwright [allsey87@gmail.com]", "1.0", "A generic multi-camera sensor capable of running various algorithms", "The generic multi-camera sensor can be attached to any composable entity in\n" "ARGoS that contains an embodied entity with at least one anchor. The sensor\n" "can be initialized with a number of cameras each running different algorithms\n" "for detecting different objects in the simulation. The sensor is designed so\n" "that algorithms can project a feature in the simulation on to the virtual\n" "sensor and store its 2D pixel coordinates as a reading. The implementation\n" "of algorithms that behave differently, however, is also possible.\n\n" "This sensor is disabled by default, and must be enabled before it can be\n" "used.\n\n" "REQUIRED XML CONFIGURATION\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <sensors>\n" " ...\n" " <cameras implementation=\"default\"/>\n" " ...\n" " </sensors>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "OPTIONAL XML CONFIGURATION\n\n" "It is possible to draw the frustum of each camera sensor in the OpenGL\n" "visualization. This can be useful for sensor debugging but also to understand\n" "what's wrong in your controller. To turn this functionality on, add the\n" "attribute \"show_frustum\" as follows:\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <sensors>\n" " ...\n" " <cameras implementation=\"default\" show_frustum=\"true\"/>\n" " ...\n" " </sensors>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "To add a camera to the plugin, create a camera node as shown in the following\n" "example. A camera is defined by its range (how close and how far the camera\n" "can see), its anchor and its position and orientation offsets from that\n" "that anchor, its focal length and principal point (which define the\n" "projection matrix), and its resolution.\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <sensors>\n" " ...\n" " <cameras implementation=\"default\" show_frustum=\"true\">\n" " <camera id=\"camera0\" range=\"0.025:0.25\" anchor=\"origin\"\n" " position=\"0.1,0,0.1\" orientation=\"90,-90,0\"\n" " focal_length=\"800,800\" principal_point=\"320,240\"\n" " resolution=\"640,480\"/>\n" " </cameras>\n" " ...\n" " </sensors>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "To run an algorithm on the camera sensor, simply add the algorithm as a node\n" "under the camera node. At the time of writing, three algorithms are available\n" "by default: led_detector, directional_led_detector, and tag_detector. Each of\n" "algorithms requires a medium attribute that specifies the medium where the\n" "target entities are indexed. By setting the show_rays attribute to true, you\n" "can see whether or not a target was partially occluded by another object in\n" "the simulation. For example:\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <sensors>\n" " ...\n" " <cameras implementation=\"default\" show_frustum=\"true\">\n" " <camera id=\"camera0\" range=\"0.025:0.25\" anchor=\"origin\"\n" " position=\"0.1,0,0.1\" orientation=\"90,-90,0\"\n" " focal_length=\"800,800\" principal_point=\"320,240\"\n" " resolution=\"640,480\">\n" " <led_detector medium=\"leds\" show_rays=\"true\"/>\n" " </camera>\n" " </cameras>\n" " ...\n" " </sensors>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n", "Usable")