MipBaselib::ScanMap Class Reference

#include <ScanMap.h>

List of all members.

Public Member Functions

 ScanMap (bool useGrid=true, BoundBox gridBoundBox=BoundBox())
 Constructor.
 ~ScanMap ()
 Destructor.
void pushBack (Scan &scan, Pose &pose)
 Adds a pair (scan,pose) to the map.
void popBack ()
 Removes the last pair (scan,pose) from the map.
bool findNearest (Pose &pose, Scan &scan, Decimal maxLinDist, Decimal maxAngDist)
 Finds the scan in the map whose pose is the nearest to the suggested pose and overwrites the result.
bool getExpectedScan (Scan &expectedScan, Pose &expectedPose, Decimal range, unsigned int samples, Angle angWidth)
 Return the expected scan on the basis of the grid (valid only if grid is enabled).
bool save (string fileName)
 Saves the map in a file.
bool load (string fileName)
 Load the map from a file.
int getSize ()
 Gets the number of pairs of the map.
void getGrid (Grid *&grid, Position &gridCenter)
 Gets the grid pointer (0 if it is not used) and its pose.
int getNumPoints ()
 Gets the number of points (positions) of the map.
int getNumPoints (int numScan)
 Gets the number of points (positions) of a certain scan of the map.
ScangetScanPointer (int numScan)
 Gets the i-th scan pointer.
PosegetPosePointer (int numPose)
 Gets the i-th pose pointer.
void setBisquit (int i)
 Sets a bisquit in the object.
int createBisquit ()
 Sets a bisquit in the object.
bool getBisquit (int i)
 Gets the bisquit in the object.
void unsetBisquits ()
 Sets a bisquit in the object.
string print ()
 Print the map content.


Constructor & Destructor Documentation

MipBaselib::ScanMap::ScanMap ( bool  useGrid = true,
BoundBox  gridBoundBox = BoundBox() 
)

Constructor.

Todo:
put width and height and pose in constructor
Todo:
set the gridmap pose, scale factor and other params

MipBaselib::ScanMap::~ScanMap (  )  [inline]

Destructor.


Member Function Documentation

void MipBaselib::ScanMap::pushBack ( Scan scan,
Pose pose 
)

Adds a pair (scan,pose) to the map.

Parameters:
[in] scan Scan to add.
[in] pose Pose to add.

void MipBaselib::ScanMap::popBack (  ) 

Removes the last pair (scan,pose) from the map.

Todo:
implement it in useMap modality

bool MipBaselib::ScanMap::findNearest ( Pose pose,
Scan scan,
Decimal  maxLinDist,
Decimal  maxAngDist 
)

Finds the scan in the map whose pose is the nearest to the suggested pose and overwrites the result.

Returns:
true if the a pair (scan,pose) inside the maxima is found, false otherwise.
Parameters:
inout]&pose Pose from which compute the distance, it will be ovrewritten with the nearest pose in the map (not changed if return is false ).
[out] scan Map scan (not changed if return is false ).
[in] maxLinDist Maximum linear difference between the found pose and the pose of the returned scan.
[in] maxAngDist Maximum angular difference between the found pose and the pose of the returned scan.

Todo:
Implement ScanMatchingMap::findNearest

bool MipBaselib::ScanMap::getExpectedScan ( Scan expectedScan,
Pose expectedPose,
Decimal  range,
unsigned int  samples,
Angle  angWidth 
)

Return the expected scan on the basis of the grid (valid only if grid is enabled).

Returns:
true if grid is enabled.
Parameters:
[out] &scan Expected scan (not changed if return is false ).
[in] pose Pose of scan to take.
[in] range Max LinRange of the scan to take.
[in] samples Number of rays of the scan to take.
[in] angWidth Angular witdh of the scan to take.

bool MipBaselib::ScanMap::save ( string  fileName  ) 

Saves the map in a file.

Returns:
true if done, false if failure.
Parameters:
inout]&fileName File name.

bool MipBaselib::ScanMap::load ( string  fileName  ) 

Load the map from a file.

Returns:
true if done, false if failure.
Parameters:
inout]&fileName File name.

int MipBaselib::ScanMap::getSize (  )  [inline]

Gets the number of pairs of the map.

Returns:
Number of pairs of the map.

void MipBaselib::ScanMap::getGrid ( Grid *&  grid,
Position gridCenter 
) [inline]

Gets the grid pointer (0 if it is not used) and its pose.

Parameters:
[out] *grid Grid pointer.
[out] &gridCenter Grid center position (Non-sense if grid = 0).

int MipBaselib::ScanMap::getNumPoints (  )  [inline]

Gets the number of points (positions) of the map.

Returns:
Number of points of the map.

int MipBaselib::ScanMap::getNumPoints ( int  numScan  ) 

Gets the number of points (positions) of a certain scan of the map.

Returns:
Number of points of the i-th scan of the map, if the scan does not exists it returns 0.
Parameters:
[in] numScan Number of the scan to get the size

Scan * MipBaselib::ScanMap::getScanPointer ( int  numScan  ) 

Gets the i-th scan pointer.

Returns:
Pointer to the i-th scan.

Pose * MipBaselib::ScanMap::getPosePointer ( int  numPose  ) 

Gets the i-th pose pointer.

Returns:
Pointer to the i-th pose.

void MipBaselib::ScanMap::setBisquit ( int  i  )  [inline]

Sets a bisquit in the object.

int MipBaselib::ScanMap::createBisquit (  )  [inline]

Sets a bisquit in the object.

bool MipBaselib::ScanMap::getBisquit ( int  i  )  [inline]

Gets the bisquit in the object.

void MipBaselib::ScanMap::unsetBisquits (  )  [inline]

Sets a bisquit in the object.

string MipBaselib::ScanMap::print (  ) 

Print the map content.

Returns:
Content.


The documentation for this class was generated from the following files:

Generated on Mon Feb 20 07:01:11 2017 for MIP by  doxygen 1.5.6