Aria
2.8.0
|
Holds data from a sensor that provides data arranged in a 2d array. More...
#include <ArPixelDevice.h>
Public Member Functions | |
ArPixelDevice (int x_size, int y_size, double x_fov, double y_fov, const char *name) | |
Base Constructor. | |
const char * | getName (void) |
Get the name of the device. | |
DataObject *** | getRawSensorData (void) |
Gets the raw sensor data. | |
DataObject *** | getRawSensorXYZ (void) |
Gets the raw XYZ data. | |
DataObject * | getSensorData (int x, int y) |
Get the value of the sensor at the (x,y) coords. | |
DataObject * | getSensorXYZ (int x, int y) |
Get the xyz array of the sensor at the (x,y) pizels. | |
int | getXDimension (void) |
Get the dimension of the grid in the x direction. | |
double | getXFOV (void) |
Get the X direction Field of View, in degrees. | |
int | getYDimension (void) |
Get the dimension of the grid in the y direction. | |
double | getYFOV (void) |
Get the Y direction Field of View, in degrees. | |
virtual int | lockDevice () |
Lock this device. | |
virtual int | tryLockDevice () |
Try to lock this device. | |
virtual int | unlockDevice () |
Unlock this device. | |
virtual | ~ArPixelDevice () |
Base destructor. | |
Protected Member Functions | |
bool | allocateSensorDataMemory () |
bool | allocateSensorXYZMemory () |
Protected Attributes | |
ArMutex | myDeviceMutex |
std::string | myName |
DataObject *** | mySensorData |
DataObject *** | mySensorXYZ |
double | myXFOV |
int | myXSize |
double | myYFOV |
int | myYSize |
Holds data from a sensor that provides data arranged in a 2d array.
Subclasses are used for specific sensor implementations, such as the ArFocusPixelDevice for the Focus Robotics nDepth stereocamera.
The data are arranged in an x,y grid, with the origin being in the upper left corner, from the perspective of the robot. It's in a row-major format.
The Field of View (FOV) is assumed to be centered with zero being the center of the area, such that the permitted x angles are between ((-x_fov/2) to (+x_fov/2)) and ((-y_fov/2) to (+y_fov/2)). Negative angles are to the lower left of the grid from the perspective of the robot.
x_size | dimension of data grid in x direction |
y_size | dimension of data grid in y direction |
x_fov | Field of View of sensor in X direction (angle in degrees) |
y_fov | Field of View of sensor in Y direction (angle in degrees) |
name | the name of this device |