#include <ScanMap.h>
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. | |
Scan * | getScanPointer (int numScan) |
Gets the i-th scan pointer. | |
Pose * | getPosePointer (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. |
MipBaselib::ScanMap::~ScanMap | ( | ) | [inline] |
Destructor.
void MipBaselib::ScanMap::popBack | ( | ) |
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.
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. |
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).
[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.
inout]&fileName | File name. |
bool MipBaselib::ScanMap::load | ( | string | fileName | ) |
Load the map from a file.
inout]&fileName | File name. |
int MipBaselib::ScanMap::getSize | ( | ) | [inline] |
Gets the number of pairs of the map.
int MipBaselib::ScanMap::getNumPoints | ( | ) | [inline] |
Gets the number of points (positions) of the map.
int MipBaselib::ScanMap::getNumPoints | ( | int | numScan | ) |
Gets the number of points (positions) of a certain scan of the map.
[in] | numScan | Number of the scan to get the size |
Scan * MipBaselib::ScanMap::getScanPointer | ( | int | numScan | ) |
Gets the i-th scan pointer.
Pose * MipBaselib::ScanMap::getPosePointer | ( | int | numPose | ) |
Gets the i-th pose pointer.
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.