#include <wmGrid3D.h>
Public Member Functions | |
CwmGrid3D () | |
~CwmGrid3D () | |
wmStatus | setSensorPosition (boost::numeric::ublas::matrix< float > inSensorPosition) |
Set Sensor position and orientation according to a 4x4 matrix [m]. More... | |
wmStatus | getSensorPosition (boost::numeric::ublas::matrix< float > outSensorPosition) |
Get Sensor position and orientation according to a 4x4 matrix. More... | |
wmStatus | updateMap () |
Update map regarding the last rangemap which was set. More... | |
grid * | xyz2grid (double x, double y, double z) |
Returns the pointer to the data stored at (x,y,z). More... | |
wmStatus | grid2xyz (int i, double &x, double &y, double &z) |
Returns the position of the grid [i]. More... | |
grid * | xyz2grid (int x, int y, int z) |
Returns the pointer to the data stored at (x,y,z). More... | |
wmStatus | allocateMap (double xstart, double ystart, double zstart, double xend, double yend, double zend) |
Allocate the memory needed for the map. More... | |
wmStatus | setFreeBox (double xstart, double ystart, double zstart, double xend, double yend, double zend) |
Allocate the defult free zone in the environmet (a free zone which is freezed to free in all update). More... | |
wmStatus | makeBoxFree (double xstart, double ystart, double zstart, double xend, double yend, double zend) |
Change the status of a valume of the envirenment to free. More... | |
wmStatus | makeBoxSolid (double xstart, double ystart, double zstart, double xend, double yend, double zend) |
Change the status of a valume of the envirenment to Solid. More... | |
wmStatus | clearMap () |
Reset the alocated map to Unknown. More... | |
wmStatus | setResolution (double inResolution) |
Set the size of each grid [m]. More... | |
wmStatus | setSensitivity (unsigned int inSensitivity) |
Set the sensetivity of update engin. More... | |
double | getResolution () |
Returns grid size. More... | |
box_area | getMapVolume () |
Returns the geometry of map in a vector as (xstart, ystart, zstart, xend, yend, zend). More... | |
wmStatus | setRangeMap (boost::numeric::ublas::matrix< float > inRangeMap) |
Set the information regarding 3D position of the pixel in image. More... | |
int | getMapXN () |
Returns the number of grid along x. More... | |
int | getMapYN () |
Returns the number of grid along y. More... | |
int | getMapZN () |
Returns the number of grid along z. More... | |
grid * | getGridMap () |
Returns the number of grid. More... | |
wmStatus | exportOccupancyMap (string fileName) |
Export the result of calculation (array of grids) in a txt file for graphic illustration. More... | |
wmStatus | exportVRML (string modelFileName, string solidFileName, string unknownFileName, int exportMode) |
Export vrml file of the 3D model. More... | |
wmStatus | importMap (string fileName) |
Import a 3D model. More... | |
wmStatus | reportCurrentStatus () |
Reports all parametere regarding the last update. More... | |
wmStatus | setCameraParameters (double inWidthAngle, double inHeightAngle, double inObservableDistance) |
Sets camera parameter. More... | |
double | getObservableDistance () |
Get observable distance of camera. More... | |
wmStatus | refreshMap () |
Filter the noise in map. More... | |
double | getVisibility (double inX, double inY, double inTheta, double goalX, double goalY, double goalTheta) |
Return the maximum number of unknown voxel which can be updated based on the robot config. More... | |
wmStatus | setCoveringAngle (double inHeightAngleMin, double inHeightAngleMax, double inWidthAngleMin, double inWidthAngleMax) |
Set the maximum covering angle in a robot bounding box configuration. More... | |
wmStatus | setGridState (std::vector< char > inStateVector) |
Set the state of each voxel in map by entering an state vector:0-Free, 1-Occupied, 2-Unknown. More... | |
wmStatus | setRobotBoxPos (double inX, double inY, double inTheta) |
Set the robot position. More... | |
wmStatus | setRobotBoxFree () |
Set the robot bounding box as Free. More... | |
Protected Member Functions | |
double | getGridParameter (double inMean, double inVariance, double inDistance, int k) |
Return the odd by getting the distance from a 3D observed point. More... | |
Protected Attributes | |
boost::numeric::ublas::matrix< float > | attSensorPosition |
Sensor's position. More... | |
int | attMapXN |
Number of grid along X, Y and Z. More... | |
int | attMapYN |
int | attMapZN |
box_area | attMapArea |
Geometric information of Map. More... | |
box_area | attFreeBox |
Geometric information of free volume of Map (Initial position of robot). More... | |
grid * | attGridMap |
The occupancy grid map. More... | |
double | attResolution |
Resolution of the map. More... | |
unsigned int | attSensitivity |
This parametr is the minimum number of point that should be detected in a pixel Volume to be considered as a solid object. More... | |
boost::numeric::ublas::matrix< float > | attRangeMap |
vector that includes the Informatin of 3D position of pixel in image. More... | |
double | attWidthAngle |
Camera Parametr:the visible angles of camera . More... | |
double | attHeightAngle |
double | attObservableDistance |
the acceptable distance for filtering the valid information of 3D position More... | |
double | attHeightAngleMin |
Camera Parameters for calculating the visibility. More... | |
double | attHeightAngleMax |
double | attWidthAngleMin |
double | attWidthAngleMax |
double | attRobotPosX |
Robot position in each update. More... | |
double | attRobotPosY |
double | attRobotPosTheta |
CwmGrid3D::CwmGrid3D | ( | ) |
CwmGrid3D::~CwmGrid3D | ( | ) |
wmStatus CwmGrid3D::allocateMap | ( | double | xstart, |
double | ystart, | ||
double | zstart, | ||
double | xend, | ||
double | yend, | ||
double | zend | ||
) |
Allocate the memory needed for the map.
wmStatus CwmGrid3D::clearMap | ( | ) |
Reset the alocated map to Unknown.
wmStatus CwmGrid3D::exportOccupancyMap | ( | string | fileName | ) |
Export the result of calculation (array of grids) in a txt file for graphic illustration.
wmStatus CwmGrid3D::exportVRML | ( | string | modelFileName, |
string | solidFileName, | ||
string | unknownFileName, | ||
int | exportMode | ||
) |
Export vrml file of the 3D model.
by choosing exportMode equal 1, VRML of solid and unknown part are generated seperately.
grid * CwmGrid3D::getGridMap | ( | ) |
Returns the number of grid.
|
protected |
Return the odd by getting the distance from a 3D observed point.
box_area CwmGrid3D::getMapVolume | ( | ) |
Returns the geometry of map in a vector as (xstart, ystart, zstart, xend, yend, zend).
int CwmGrid3D::getMapXN | ( | ) |
Returns the number of grid along x.
int CwmGrid3D::getMapYN | ( | ) |
Returns the number of grid along y.
int CwmGrid3D::getMapZN | ( | ) |
Returns the number of grid along z.
double CwmGrid3D::getObservableDistance | ( | ) |
Get observable distance of camera.
double CwmGrid3D::getResolution | ( | ) |
Returns grid size.
wmStatus CwmGrid3D::getSensorPosition | ( | boost::numeric::ublas::matrix< float > | outSensorPosition | ) |
Get Sensor position and orientation according to a 4x4 matrix.
double CwmGrid3D::getVisibility | ( | double | inX, |
double | inY, | ||
double | inTheta, | ||
double | goalX, | ||
double | goalY, | ||
double | goalTheta | ||
) |
Return the maximum number of unknown voxel which can be updated based on the robot config.
wmStatus CwmGrid3D::grid2xyz | ( | int | i, |
double & | x, | ||
double & | y, | ||
double & | z | ||
) |
Returns the position of the grid [i].
wmStatus CwmGrid3D::importMap | ( | string | fileName | ) |
Import a 3D model.
wmStatus CwmGrid3D::makeBoxFree | ( | double | xstart, |
double | ystart, | ||
double | zstart, | ||
double | xend, | ||
double | yend, | ||
double | zend | ||
) |
Change the status of a valume of the envirenment to free.
wmStatus CwmGrid3D::makeBoxSolid | ( | double | xstart, |
double | ystart, | ||
double | zstart, | ||
double | xend, | ||
double | yend, | ||
double | zend | ||
) |
Change the status of a valume of the envirenment to Solid.
wmStatus CwmGrid3D::refreshMap | ( | ) |
Filter the noise in map.
wmStatus CwmGrid3D::reportCurrentStatus | ( | ) |
Reports all parametere regarding the last update.
wmStatus CwmGrid3D::setCameraParameters | ( | double | inWidthAngle, |
double | inHeightAngle, | ||
double | inObservableDistance | ||
) |
Sets camera parameter.
wmStatus CwmGrid3D::setCoveringAngle | ( | double | inHeightAngleMin, |
double | inHeightAngleMax, | ||
double | inWidthAngleMin, | ||
double | inWidthAngleMax | ||
) |
Set the maximum covering angle in a robot bounding box configuration.
wmStatus CwmGrid3D::setFreeBox | ( | double | xstart, |
double | ystart, | ||
double | zstart, | ||
double | xend, | ||
double | yend, | ||
double | zend | ||
) |
Allocate the defult free zone in the environmet (a free zone which is freezed to free in all update).
wmStatus CwmGrid3D::setGridState | ( | std::vector< char > | inStateVector | ) |
Set the state of each voxel in map by entering an state vector:0-Free, 1-Occupied, 2-Unknown.
wmStatus CwmGrid3D::setRangeMap | ( | boost::numeric::ublas::matrix< float > | inRangeMap | ) |
Set the information regarding 3D position of the pixel in image.
wmStatus CwmGrid3D::setResolution | ( | double | inResolution | ) |
Set the size of each grid [m].
wmStatus CwmGrid3D::setRobotBoxFree | ( | ) |
Set the robot bounding box as Free.
wmStatus CwmGrid3D::setRobotBoxPos | ( | double | inX, |
double | inY, | ||
double | inTheta | ||
) |
Set the robot position.
wmStatus CwmGrid3D::setSensitivity | ( | unsigned int | inSensitivity | ) |
Set the sensetivity of update engin.
wmStatus CwmGrid3D::setSensorPosition | ( | boost::numeric::ublas::matrix< float > | inSensorPosition | ) |
Set Sensor position and orientation according to a 4x4 matrix [m].
wmStatus CwmGrid3D::updateMap | ( | ) |
Update map regarding the last rangemap which was set.
grid * CwmGrid3D::xyz2grid | ( | double | x, |
double | y, | ||
double | z | ||
) |
Returns the pointer to the data stored at (x,y,z).
grid * CwmGrid3D::xyz2grid | ( | int | x, |
int | y, | ||
int | z | ||
) |
Returns the pointer to the data stored at (x,y,z).
|
protected |
Geometric information of free volume of Map (Initial position of robot).
|
protected |
The occupancy grid map.
|
protected |
|
protected |
|
protected |
Camera Parameters for calculating the visibility.
|
protected |
Geometric information of Map.
|
protected |
Number of grid along X, Y and Z.
|
protected |
|
protected |
|
protected |
the acceptable distance for filtering the valid information of 3D position
|
protected |
vector that includes the Informatin of 3D position of pixel in image.
|
protected |
Resolution of the map.
|
protected |
|
protected |
Robot position in each update.
|
protected |
|
protected |
This parametr is the minimum number of point that should be detected in a pixel Volume to be considered as a solid object.
|
protected |
Sensor's position.
|
protected |
Camera Parametr:the visible angles of camera .
|
protected |
|
protected |