#include <ArMapInterface.h>
Inheritance diagram for ArMapScanInterface:
ArMapScanInterface is an abstract class that defines the methods used to manipulate obstacle data in an Aria map. These generally include the points and lines detected by a particular sensor (a.k.a. scan type).
Public Member Functions | |
virtual bool | addToFileParser (ArFileParser *fileParser)=0 |
Adds handlers for this scan data's header information to the given file parser. | |
ArMapScanInterface () | |
Default constructor. | |
virtual const char * | getDisplayString (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
virtual ArPose | getLineMaxPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns the upper right point (maximum x and y) of the scan's line segments. | |
virtual ArPose | getLineMinPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns the lower left point (minimum x and y) of the scan's line segments. | |
virtual std::vector< ArLineSegment > * | getLines (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns a pointer to the line segments for the specified scan. | |
virtual ArPose | getMaxPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns the upper right point (maximum x and y) of the scan's points. | |
virtual ArPose | getMinPose (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns the lower left point (minimum x and y) of the scan's points. | |
virtual int | getNumLines (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns the number of line segments in the specified scan. | |
virtual int | getNumPoints (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns the number of points in the specified scan. | |
virtual std::vector< ArPose > * | getPoints (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Returns a pointer to the map points for the specified scan. | |
virtual int | getResolution (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
Gets the resolution (-1 if none specified). | |
virtual bool | isSortedLines (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) const =0 |
Returns whether the line segment vector for the specified scan is sorted. | |
virtual bool | isSortedPoints (const char *scanType=ARMAP_DEFAULT_SCAN_TYPE) const =0 |
Returns whether the point vector for the specified scan is sorted. | |
virtual void | loadDataPoint (double x, double y)=0 |
Adds the specified data point to the scan data. | |
virtual void | loadLineSegment (double x1, double y1, double x2, double y2)=0 |
Adds the specified line segment to the scan data. | |
virtual bool | readDataPoint (char *line)=0 |
Reads a data point from the given line and adds it to this scan data. | |
virtual bool | readLineSegment (char *line)=0 |
Reads a line segment from the given line and adds it to this scan data. | |
virtual bool | remFromFileParser (ArFileParser *fileParser)=0 |
Removes the handlers for this scan data's header information from the given file parser. | |
virtual void | setLines (const std::vector< ArLineSegment > *lines, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, bool isSortedLines=false, ArMapChangeDetails *changeDetails=NULL)=0 |
Sets the lines (copies those passed in). | |
virtual void | setPoints (const std::vector< ArPose > *points, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, bool isSortedPoints=false, ArMapChangeDetails *changeDetails=NULL)=0 |
Sets the points (copies those passed in). | |
virtual void | setResolution (int resolution, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, ArMapChangeDetails *changeDetails=NULL)=0 |
Sets the resolution (-1 if none specified). | |
virtual void | writeLinesToFunctor (ArFunctor2< int, std::vector< ArLineSegment > * > *functor, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, ArFunctor1< const char * > *keywordFunctor=NULL)=0 |
Writes the map line segments to a functor. | |
virtual void | writePointsToFunctor (ArFunctor2< int, std::vector< ArPose > * > *functor, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE, ArFunctor1< const char * > *keywordFunctor=NULL)=0 |
Writes the scan data points to a functor. | |
virtual void | writeScanToFunctor (ArFunctor1< const char * > *functor, const char *endOfLineChars, const char *scanType=ARMAP_DEFAULT_SCAN_TYPE)=0 |
virtual | ~ArMapScanInterface () |
Destructor. | |
Static Public Member Functions | |
static bool | isDefaultScanType (const char *scanType) |
Determines whether the given scan type is the default (i.e. no prefix on the map tags). | |
static bool | isSummaryScanType (const char *scanType) |
Determines whether the given scan type represents the summary of all other scan types. |
|
Adds handlers for this scan data's header information to the given file parser.
|
|
Returns the upper right point (maximum x and y) of the scan's line segments.
|
|
Returns the lower left point (minimum x and y) of the scan's line segments.
|
|
Returns a pointer to the line segments for the specified scan. Note that this returns a pointer to the object's internal vector. The map must be locked before this method is called, and must be unlocked after the caller has finished using the vector.
|
|
Returns the upper right point (maximum x and y) of the scan's points.
|
|
Returns the lower left point (minimum x and y) of the scan's points.
|
|
Returns the number of line segments in the specified scan.
|
|
Returns the number of points in the specified scan.
|
|
Returns a pointer to the map points for the specified scan. Note that this returns a pointer to the object's internal vector. The map must be locked before this method is called, and must be unlocked after the caller has finished using the vector.
|
|
Gets the resolution (-1 if none specified).
|
|
Returns whether the line segment vector for the specified scan is sorted. Note that this method returns the state of the line segment vector when it was read from the file, or after setLines has been called. If the application calls getLines and directly manipulates the line segment vector's contents, then isSortedLines will not necessarily be correct.
|
|
Returns whether the point vector for the specified scan is sorted. Note that this method returns the state of the point vector when it was read from the file, or after setPoints has been called. If the application calls getPoints and directly manipulates the point vector's contents, then isSortedPoints will not necessarily be correct.
|
|
Reads a data point from the given line and adds it to this scan data. The data point is expected to be two integers (x y), separated by whitespace.
|
|
Reads a line segment from the given line and adds it to this scan data. The line segment is expected to be four integers (x1 y1 x2 y2), separated by whitespace
|
|
Removes the handlers for this scan data's header information from the given file parser.
|
|
Sets the lines (copies those passed in). This method will sort the given line segments in ascending order (according to the ArLineSegment less-than operator. If the vector is already sorted, then set the isSortedLiens parameter to true in order to improve performance.
|
|
Sets the points (copies those passed in). This method will sort the given points in ascending order (according to the ArPose less-than operator. If the points vector is already sorted, then set the isSortedPoints parameter to true in order to improve performance.
|
|
Sets the resolution (-1 if none specified).
|
|
Writes the map line segments to a functor. A pointer to the entire data line segment vector is passed directly to the functor in order to improve performance. The functor must not modify the vector's contents.
|
|
Writes the scan data points to a functor. A pointer to the entire data point vector is passed directly to the functor in order to improve performance. The functor must not modify the vector's contents.
|
|
This method writes a text line for each of the scan header attributes (such as MinPose, MaxPose, NumPoints). Depending on the scan type, a prefix may be prepended to the keyword (e.g. HokuyuURGMinPose).
|