Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Friends
datatypes::ScanPoint Class Reference

#include <ScanPoint.hpp>

List of all members.

Public Types

enum  Flags {
  FlagGround = 0x0001, FlagDirt = 0x0002, FlagRain = 0x0004, FlagThresholdSwitching = 0x0010,
  FlagReflector = 0x0020, FlagLeftCovered = 0x0100, FlagRightCovered = 0x0200, FlagBackground = 0x0400,
  FlagMarker = 0x0800, FlagTransparent = 0x1000, MaskInvalid = FlagGround | FlagDirt | FlagRain | FlagBackground, MaskCovered = FlagLeftCovered | FlagRightCovered
}

Public Member Functions

void addCartesianOffset (double xOffset, double yOffset, double zOffset)
void addPolarOffset (double distOffset, double hAngleOffset, double vAngleOffset)
void clear ()
double getDist () const
double getDist (const ScanPoint &other) const
 Returns the distance between this and the given other scanpoint, in [m].
double getDist2D (const ScanPoint &other) const
 Returns the two-dimensional distance between this and the given other scanpoint, in [m].
UINT8 getEchoNum () const
double getEchoWidth () const
UINT16 getFlags () const
double getHAngle () const
UINT8 getLayer () const
UINT8 getSourceId () const
double getVAngle () const
double getX () const
double getY () const
double getZ () const
bool isBackground () const
 Checks if the scan point is labeled as background.
bool isDirt () const
 Checks if the scan point is labeled as dirt.
bool isGround () const
 Checks if the scan point is labeled as ground.
bool isLeftCovered () const
 Checks if the "left covered" flag is set.
bool isMarked () const
 Checks if the marker is set.
bool isRain () const
 Checks if the scan point is labeled as rain.
bool isReflector () const
 Checks if the reflector flag is set.
bool isRightCovered () const
 Checks if the "right covered" flag is set.
bool isThresholdSwitching () const
 Checks if the threshold switching flag is set.
bool isTransparent () const
 Checks if there is at least one more echo behind this scan point (B or C echo)
bool isValid () const
 Checks if the scan point is valid (no ground, dirt, or rain)
 ScanPoint ()
void setBackground (bool isBackground=true)
 Labels the scan point as invalid because it is in the background area.
void setCartesian (double x, double y, double z)
void setDirt (bool isDirt=true)
 Labels the scan point as invalid because its an echo from dirt.
void setEchoNum (UINT8 sub)
void setEchoWidth (double echoWidth)
 Set the echo pulse width, typically in [m].
void setFlags (UINT16 flags)
 Sets the scan point flags directly.
void setGround (bool isGround=true)
 Labels the scan point as invalid because it is an echo from the ground.
void setLayer (UINT8 ch)
void setLeftCovered (bool isLeftCovered=true)
 Labels the scan point: Left neighbour point may be covered.
void setMarker (bool isMarked=true)
 Set or clear the "Marker" flag.
void setNotCovered ()
 Remove cover status.
void setPoint3D (const Point3D &pt)
void setPolar (double dist, double hAngle, double vAngle)
void setRain (bool isRain=true)
 Labels the scan point as invalid because its an echo from rain.
void setReflector (bool isReflector=true)
 Labels the scan point: EPW is high enough to be a reflector.
void setRightCovered (bool isRightCovered=true)
 Labels the scan point: Right neighbour point may be covered.
void setSourceId (UINT8 id)
void setValid ()
 Removes all scan status information.
Point2D toPoint2D () const
 Returns the x and y coordinates as a Point2D structure.
Point3D toPoint3D () const
 Returns the x,y,z coordinates as a Point3D structure.
std::string toString () const

Static Public Member Functions

static double getDistanceBetweenScanpoints (const ScanPoint &pt1, const ScanPoint &pt2)

Protected Attributes

UINT8 m_channel
double m_dist
double m_echoWidth
UINT16 m_flags
double m_hAngle
UINT8 m_sourceId
UINT8 m_subchannel
double m_vAngle
double m_x
double m_y
double m_z

Private Member Functions

void updateCartesian ()
 Compute Cartesian coordinates from the current polar coordinates.
void updatePolar ()
 Compute polar coordinates from the current Cartesian coordinates.

Friends

bool operator== (const ScanPoint &, const ScanPoint &)
 Equality predicate.

Detailed Description

Definition at line 36 of file ScanPoint.hpp.


Member Enumeration Documentation

Enumerator:
FlagGround 

Invalid scan point, echo from ground.

FlagDirt 

Invalid scan point, echo from dirt.

FlagRain 

Invalid scan point, echo from rain drop.

FlagThresholdSwitching 

Old: Scan point was measured in a shot with threshold switching (earlier FPGA versions)

Scan point was measured using the higher threshold (since FGPA version 8.0.08)

FlagReflector 

EPW of scan point is high enough to be a reflector.

FlagLeftCovered 

Left neighbour point may be covered.

FlagRightCovered 

Right neighbour point may be covered.

FlagBackground 

Point has been recognized as background and should not be used in the tracking anymore.

FlagMarker 

Point is "marked" (see above)

FlagTransparent 

There is at least one more echo behind this scan point (B or C echo)

MaskInvalid 

All flags of invalid scan points.

MaskCovered 

All coverage flags.

Definition at line 48 of file ScanPoint.hpp.


Constructor & Destructor Documentation

Definition at line 22 of file ScanPoint.cpp.


Member Function Documentation

void datatypes::ScanPoint::addCartesianOffset ( double  xOffset,
double  yOffset,
double  zOffset 
)

Definition at line 137 of file ScanPoint.cpp.

void datatypes::ScanPoint::addPolarOffset ( double  distOffset,
double  hAngleOffset,
double  vAngleOffset 
)

Useful e.g. to add the horizontal and vertical angle offsets of the mounting position of a laserscanner.

Parameters:
distOffsetRadial offset in meters
hAngleOffsetHorizontal (yaw) angle offset in radians. The resulting angle will be normalized into the interval [-pi,+pi).
vAngleOffsetVertical (pitch) angle offset in radians. The resulting angle will be normalized into the interval [-pi,+pi).

Definition at line 158 of file ScanPoint.cpp.

Definition at line 26 of file ScanPoint.cpp.

double datatypes::ScanPoint::getDist ( ) const [inline]

Definition at line 93 of file ScanPoint.hpp.

double datatypes::ScanPoint::getDist ( const ScanPoint other) const

Returns the distance between this and the given other scanpoint, in [m].

This method calculates the actual three-dimensional distance in x,y,z. dist2D() uses only x and y.

Definition at line 73 of file ScanPoint.cpp.

double datatypes::ScanPoint::getDist2D ( const ScanPoint other) const

Returns the two-dimensional distance between this and the given other scanpoint, in [m].

This method calculates the distance only in x and y coordinates; the z dimension is ignored. dist() uses all three dimensions.

Definition at line 83 of file ScanPoint.cpp.

double datatypes::ScanPoint::getDistanceBetweenScanpoints ( const ScanPoint pt1,
const ScanPoint pt2 
) [static]

Returns the distance, in [m], between the two 3d-scanpoint coordinates.

Definition at line 68 of file ScanPoint.cpp.

Definition at line 101 of file ScanPoint.hpp.

double datatypes::ScanPoint::getEchoWidth ( ) const [inline]

Definition at line 97 of file ScanPoint.hpp.

Definition at line 98 of file ScanPoint.hpp.

double datatypes::ScanPoint::getHAngle ( ) const [inline]

Definition at line 94 of file ScanPoint.hpp.

Definition at line 100 of file ScanPoint.hpp.

Definition at line 99 of file ScanPoint.hpp.

double datatypes::ScanPoint::getVAngle ( ) const [inline]

Definition at line 95 of file ScanPoint.hpp.

double datatypes::ScanPoint::getX ( ) const [inline]

Definition at line 89 of file ScanPoint.hpp.

double datatypes::ScanPoint::getY ( ) const [inline]

Definition at line 90 of file ScanPoint.hpp.

double datatypes::ScanPoint::getZ ( ) const [inline]

Definition at line 91 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isBackground ( ) const [inline]

Checks if the scan point is labeled as background.

Definition at line 110 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isDirt ( ) const [inline]

Checks if the scan point is labeled as dirt.

Definition at line 112 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isGround ( ) const [inline]

Checks if the scan point is labeled as ground.

Definition at line 108 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isLeftCovered ( ) const [inline]

Checks if the "left covered" flag is set.

Definition at line 116 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isMarked ( ) const [inline]

Checks if the marker is set.

Definition at line 106 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isRain ( ) const [inline]

Checks if the scan point is labeled as rain.

Definition at line 114 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isReflector ( ) const [inline]

Checks if the reflector flag is set.

Definition at line 120 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isRightCovered ( ) const [inline]

Checks if the "right covered" flag is set.

Definition at line 118 of file ScanPoint.hpp.

Checks if the threshold switching flag is set.

Definition at line 122 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isTransparent ( ) const [inline]

Checks if there is at least one more echo behind this scan point (B or C echo)

Definition at line 124 of file ScanPoint.hpp.

bool datatypes::ScanPoint::isValid ( ) const [inline]

Checks if the scan point is valid (no ground, dirt, or rain)

Definition at line 104 of file ScanPoint.hpp.

void datatypes::ScanPoint::setBackground ( bool  isBackground = true) [inline]

Labels the scan point as invalid because it is in the background area.

Definition at line 185 of file ScanPoint.hpp.

void datatypes::ScanPoint::setCartesian ( double  x,
double  y,
double  z 
)

Equivalent polar coordinates are computed on the fly.

Parameters:
xx-coordinate in meters
yy-coordinate in meters
zz-coordinate in meters

Definition at line 45 of file ScanPoint.cpp.

void datatypes::ScanPoint::setDirt ( bool  isDirt = true) [inline]

Labels the scan point as invalid because its an echo from dirt.

Definition at line 201 of file ScanPoint.hpp.

void datatypes::ScanPoint::setEchoNum ( UINT8  sub) [inline]

Definition at line 169 of file ScanPoint.hpp.

void datatypes::ScanPoint::setEchoWidth ( double  echoWidth)

Set the echo pulse width, typically in [m].

The resolution of the echo width is reduced in the same way as compressMeters() does. This is to ensure that compressed replay data is the same as uncompressed live data.

Definition at line 237 of file ScanPoint.cpp.

void datatypes::ScanPoint::setFlags ( UINT16  flags) [inline]

Sets the scan point flags directly.

Definition at line 172 of file ScanPoint.hpp.

void datatypes::ScanPoint::setGround ( bool  isGround = true) [inline]

Labels the scan point as invalid because it is an echo from the ground.

Definition at line 193 of file ScanPoint.hpp.

void datatypes::ScanPoint::setLayer ( UINT8  ch) [inline]

Definition at line 168 of file ScanPoint.hpp.

void datatypes::ScanPoint::setLeftCovered ( bool  isLeftCovered = true) [inline]

Labels the scan point: Left neighbour point may be covered.

Definition at line 217 of file ScanPoint.hpp.

void datatypes::ScanPoint::setMarker ( bool  isMarked = true) [inline]

Set or clear the "Marker" flag.

Definition at line 177 of file ScanPoint.hpp.

Remove cover status.

Definition at line 233 of file ScanPoint.hpp.

Equivalent polar coordinates are computed on the fly.

Parameters:
ptPoint coordinates in [m]

Definition at line 59 of file ScanPoint.cpp.

void datatypes::ScanPoint::setPolar ( double  dist,
double  hAngle,
double  vAngle 
)

Equivalent Cartesian coordinates are computed on the fly.

Parameters:
distRadial distance in meters
hAngleHorizontal/azimuth angle in radians. The angle will be normalized into the interval [-pi,+pi).
vAngleVertical/elevation angle in radians. The angle will be normalized into the interval [-pi,+pi).

Definition at line 106 of file ScanPoint.cpp.

void datatypes::ScanPoint::setRain ( bool  isRain = true) [inline]

Labels the scan point as invalid because its an echo from rain.

Definition at line 209 of file ScanPoint.hpp.

void datatypes::ScanPoint::setReflector ( bool  isReflector = true) [inline]

Labels the scan point: EPW is high enough to be a reflector.

Definition at line 236 of file ScanPoint.hpp.

void datatypes::ScanPoint::setRightCovered ( bool  isRightCovered = true) [inline]

Labels the scan point: Right neighbour point may be covered.

Definition at line 225 of file ScanPoint.hpp.

Definition at line 166 of file ScanPoint.hpp.

void datatypes::ScanPoint::setValid ( ) [inline]

Removes all scan status information.

Definition at line 245 of file ScanPoint.hpp.

Returns the x and y coordinates as a Point2D structure.

Definition at line 123 of file ScanPoint.cpp.

Returns the x,y,z coordinates as a Point3D structure.

Definition at line 116 of file ScanPoint.cpp.

std::string datatypes::ScanPoint::toString ( ) const

Definition at line 243 of file ScanPoint.cpp.

Compute Cartesian coordinates from the current polar coordinates.

This method is called when the polar coordinates have changed, to keep polar and Cartesian coordinates consistent.

Note:
Note that up to 6. June 2009, a negative vertical angle resulted in a neg. z component which was incorrect. Now, the resulting z component is positive to comply with DIN 70000.

Definition at line 217 of file ScanPoint.cpp.

Compute polar coordinates from the current Cartesian coordinates.

This method is called when the Cartesian coordinates have changed, to keep polar and Cartesian coordinates consistent.

Moreover, since polar coordinates are redundant information, they are not part of the external representation of a scan point. Upon input, the polar coordinates are reconstructed using this method.

Note:
Note that up to 6. June 2009, resulting vertical (pitch) angles from negative z components erroneously had a negative sign. Now, the resulting pitch angles are positive to comply with DIN 70000, i.e. positive pitch angles are pointing "downwards".

Definition at line 180 of file ScanPoint.cpp.


Friends And Related Function Documentation

bool operator== ( const ScanPoint ,
const ScanPoint  
) [friend]

Equality predicate.

Definition at line 262 of file ScanPoint.cpp.


Member Data Documentation

Definition at line 82 of file ScanPoint.hpp.

double datatypes::ScanPoint::m_dist [protected]

Definition at line 72 of file ScanPoint.hpp.

Definition at line 77 of file ScanPoint.hpp.

Definition at line 80 of file ScanPoint.hpp.

double datatypes::ScanPoint::m_hAngle [protected]

Definition at line 73 of file ScanPoint.hpp.

Definition at line 81 of file ScanPoint.hpp.

Definition at line 83 of file ScanPoint.hpp.

double datatypes::ScanPoint::m_vAngle [protected]

Definition at line 74 of file ScanPoint.hpp.

double datatypes::ScanPoint::m_x [protected]

Definition at line 67 of file ScanPoint.hpp.

double datatypes::ScanPoint::m_y [protected]

Definition at line 68 of file ScanPoint.hpp.

double datatypes::ScanPoint::m_z [protected]

Definition at line 69 of file ScanPoint.hpp.


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


libsick_ldmrs
Author(s): SICK AG , Martin G√ľnther , Jochen Sprickerhof
autogenerated on Wed Jun 14 2017 04:04:51