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