CwmGrid3D Class Reference
Collaboration diagram for CwmGrid3D:

List of all members.

Public Member Functions

 CwmGrid3D ()
 ~CwmGrid3D ()
wmStatus setSensorPosition (boost::numeric::ublas::matrix< float > inSensorPosition)
 Set Sensor position and orientation according to a 4x4 matrix [m].
wmStatus getSensorPosition (boost::numeric::ublas::matrix< float > outSensorPosition)
 Get Sensor position and orientation according to a 4x4 matrix.
wmStatus updateMap ()
 Update map regarding the last rangemap which was set.
gridxyz2grid (double x, double y, double z)
 Returns the pointer to the data stored at (x,y,z).
wmStatus grid2xyz (int i, double &x, double &y, double &z)
 Returns the position of the grid [i].
gridxyz2grid (int x, int y, int z)
 Returns the pointer to the data stored at (x,y,z).
wmStatus allocateMap (double xstart, double ystart, double zstart, double xend, double yend, double zend)
 Allocate the memory needed for the map.
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).
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.
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.
wmStatus clearMap ()
 Reset the alocated map to Unknown.
wmStatus setResolution (double inResolution)
 Set the size of each grid [m].
wmStatus setSensitivity (unsigned int inSensitivity)
 Set the sensetivity of update engin.
double getResolution ()
 Returns grid size.
box_area getMapVolume ()
 Returns the geometry of map in a vector as (xstart, ystart, zstart, xend, yend, zend).
wmStatus setRangeMap (boost::numeric::ublas::matrix< float > inRangeMap)
 Set the information regarding 3D position of the pixel in image.
int getMapXN ()
 Returns the number of grid along x.
int getMapYN ()
 Returns the number of grid along y.
int getMapZN ()
 Returns the number of grid along z.
gridgetGridMap ()
 Returns the number of grid.
wmStatus exportOccupancyMap (string fileName)
 Export the result of calculation (array of grids) in a txt file for graphic illustration.
wmStatus exportVRML (string modelFileName, string solidFileName, string unknownFileName, int exportMode)
 Export vrml file of the 3D model.
wmStatus importMap (string fileName)
 Import a 3D model.
wmStatus reportCurrentStatus ()
 Reports all parametere regarding the last update.
wmStatus setCameraParameters (double inWidthAngle, double inHeightAngle, double inObservableDistance)
 Sets camera parameter.
double getObservableDistance ()
 Get observable distance of camera.
wmStatus refreshMap ()
 Filter the noise in map.
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.
wmStatus setCoveringAngle (double inHeightAngleMin, double inHeightAngleMax, double inWidthAngleMin, double inWidthAngleMax)
 Set the maximum covering angle in a robot bounding box configuration.
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.
wmStatus setRobotBoxPos (double inX, double inY, double inTheta)
 Set the robot position.
wmStatus setRobotBoxFree ()
 Set the robot bounding box as Free.

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.

Protected Attributes

boost::numeric::ublas::matrix
< float > 
attSensorPosition
 Sensor's position.
int attMapXN
 Number of grid along X, Y and Z.
int attMapYN
int attMapZN
box_area attMapArea
 Geometric information of Map.
box_area attFreeBox
 Geometric information of free volume of Map (Initial position of robot).
gridattGridMap
 The occupancy grid map.
double attResolution
 Resolution of the map.
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.
boost::numeric::ublas::matrix
< float > 
attRangeMap
 vector that includes the Informatin of 3D position of pixel in image.
double attWidthAngle
 Camera Parametr:the visible angles of camera .
double attHeightAngle
double attObservableDistance
 the acceptable distance for filtering the valid information of 3D position
double attHeightAngleMin
 Camera Parameters for calculating the visibility.
double attHeightAngleMax
double attWidthAngleMin
double attWidthAngleMax
double attRobotPosX
 Robot position in each update.
double attRobotPosY
double attRobotPosTheta

Constructor & Destructor Documentation

CwmGrid3D::CwmGrid3D ( )
CwmGrid3D::~CwmGrid3D ( )

Member Function Documentation

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.

double CwmGrid3D::getGridParameter ( double  inMean,
double  inVariance,
double  inDistance,
int  k 
) [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).


Member Data Documentation

Geometric information of free volume of Map (Initial position of robot).

The occupancy grid map.

double CwmGrid3D::attHeightAngle [protected]
double CwmGrid3D::attHeightAngleMax [protected]
double CwmGrid3D::attHeightAngleMin [protected]

Camera Parameters for calculating the visibility.

Geometric information of Map.

int CwmGrid3D::attMapXN [protected]

Number of grid along X, Y and Z.

int CwmGrid3D::attMapYN [protected]
int CwmGrid3D::attMapZN [protected]

the acceptable distance for filtering the valid information of 3D position

boost::numeric::ublas::matrix<float> CwmGrid3D::attRangeMap [protected]

vector that includes the Informatin of 3D position of pixel in image.

double CwmGrid3D::attResolution [protected]

Resolution of the map.

double CwmGrid3D::attRobotPosTheta [protected]
double CwmGrid3D::attRobotPosX [protected]

Robot position in each update.

double CwmGrid3D::attRobotPosY [protected]
unsigned int CwmGrid3D::attSensitivity [protected]

This parametr is the minimum number of point that should be detected in a pixel Volume to be considered as a solid object.

boost::numeric::ublas::matrix<float> CwmGrid3D::attSensorPosition [protected]

Sensor's position.

double CwmGrid3D::attWidthAngle [protected]

Camera Parametr:the visible angles of camera .

double CwmGrid3D::attWidthAngleMax [protected]
double CwmGrid3D::attWidthAngleMin [protected]