#include <Object.hpp>
Public Types | |
enum | ObjectClassification { Unclassified = 0, UnknownSmall = 1, UnknownBig = 2, Pedestrian = 3, Bike = 4, Car = 5, Truck = 6, Structure_Pylon = 7, Structure_Beacon = 8, Structure_GuardRail = 9, Structure_ConcreteBarrier = 10, NumClasses, Unknown = 15 } |
Static Public Member Functions | |
static const char * | objectClassificationToShortString (ObjectClassification v) |
Returns the given classification value as a short string. More... | |
static const char * | objectClassificationToString (ObjectClassification v) |
Returns the given classification value as a string. More... | |
static std::string | objectClassificationToStringWithNum (ObjectClassification v) |
Returns the given classification value as a string with the integer number included. More... | |
static Object::ObjectClassification | stringToObjectClassification (const std::string &s) |
Private Attributes | |
Point2D | m_absoluteVelocity |
Velocity of this object [meter/seconds] as absolute velocity; the orientation is relative to the vehicle coordinate system. More... | |
Point2D | m_absoluteVelocitySigma |
Point2D | m_boundingBox |
A rectangle in parallel to the vehicle coordinate system (a paraxial rectangle) that contains (bounds) all of this object's points. More... | |
Point2D | m_boundingBoxCenter |
Center of the bounding box. More... | |
Point2D | m_centerPoint |
Center point of object rectangle, given in Vehicle coordinate system. More... | |
Point2D | m_centerPointSigma |
ObjectClassification | m_classification |
The object class that is most likely for this object. More... | |
UINT32 | m_classificationAge |
Counts how long the object has been classified in the current classification. More... | |
double | m_classificationQuality |
The quality of the current classification. More... | |
Point2D | m_closestPoint |
The point of this object that is closest to the origin of the vehicle coordinate system. More... | |
Polygon2D | m_contourPoints |
A poly-line that describes the outline of the current object measurement. More... | |
double | m_courseAngle |
named by ISO 8855; also called Orientation or Heading [rad] More... | |
double | m_courseAngleSigma |
UINT16 | m_flags |
reserved More... | |
UINT16 | m_hiddenStatusAge |
Counts how long the object has not been observed but only predicted. More... | |
bool | m_isValid |
double | m_maxAbsoluteVelocity |
Classification feature: The maximum observed absolute velocity [m/s]. More... | |
double | m_normalizedMeanPointDist |
UINT32 | m_objectAge |
number of scans in which this object has been tracked, or instead time? More... | |
Point2D | m_objectBox |
The object's length and width as a rectangle, relative to the object's coordinate system. More... | |
Point2D | m_objectBoxSigma |
double | m_objectHeight |
The height of this object in [m] (most probably received through WLAN data). More... | |
double | m_objectHeightSigma |
The standard deviation of the height of this object in [m] (most probably received through WLAN data). More... | |
UINT16 | m_objectId |
double | m_objectMass |
The mass of this object in kilogram More... | |
Point2D | m_relativeVelocity |
Velocity of this object [meter/seconds], relative to the vehicle coordinate system. More... | |
Point2D | m_relativeVelocitySigma |
Time | m_timestamp |
Time of when the center point of this object was observed. More... | |
double | m_totalTrackedPathLength |
double | m_totalTrackingDuration |
UINT64 | m_vehicleWLANid |
An identifier to be used by WLAN fusion algorithms. More... | |
This class contains all that is known about objects in the environmental model: Object position, velocity, course angle, and classification.
The available information about each object is shown in the figure above. The host vehicle's axis system is X, Y with the origin at H. The center point A of the object is given in the host vehicle's axis system X, Y by getCenterPoint(). (In exact ISO 8855 terminology, the used axis system X,Y is the host vehicle's "intermediate axis system")
The orientation of the object is given by the course angle Psi ( ) by getCourseAngle(), which is the angle from the host vehicle's X axis to the object's Xo axis. Other names for this angle are the "object's yaw angle" or heading or orientation. This defines the object's axis system Xo, Yo.
The velocity of the object is given by the velocity vector vh ( ) by getAbsoluteVelocity(), which gives the object's velocity specified in the host vehicle's axis system. (In exact ISO 8855 terminology, the vector vh is the object's "horizontal velocity".)
The size of the object is given by the side lengths sx, sy of the rectangle in the object's axis system by getObjectBox(). Position, orientation, and size are given altogether by getBox().
(Note: In exact ISO 8855 terminology, the object's axis system Xo,Yo might point into a slightly different direction than the velocity vector, in which case is rotated from X_o by the sideslip angle . The rotation of the velocity vector compared to the host vehicle's axis system, the course angle , is then given by . However, depending on the used tracking algorithms the sideslip angle is neglected and , so there should be no difference between the course angle and the yaw angle.)
Note: The current Laserscanner tracking algorithms can fill in only a subset of the data fields that exist in this class. But those additional data fields are needed as soon as we deal with data fusion from WLAN data sources. Since those fusion algorithms are of importance to our algorithms as well, we already have reserved the member variables for those fields.
Internal note to self: For the next revision one might consider adding the following data fields:
Definition at line 78 of file Object.hpp.
Enumerator | |
---|---|
Unclassified | |
UnknownSmall | |
UnknownBig | |
Pedestrian | |
Bike | |
Car | |
Truck | |
Structure_Pylon | |
Structure_Beacon | |
Structure_GuardRail | |
Structure_ConcreteBarrier | |
NumClasses | |
Unknown |
Definition at line 81 of file Object.hpp.
datatypes::Object::Object | ( | ) |
Definition at line 13 of file Object.cpp.
datatypes::Object::~Object | ( | ) |
Definition at line 48 of file Object.cpp.
void datatypes::Object::addContourPoint | ( | const Point2D | cp | ) |
Definition at line 194 of file Object.cpp.
|
inline |
Returns the velocity vector ("Geschwindigkeitsvektor") of this object in [meter/seconds] as absolute value. The orientation is relative to our vehicle's coordinate system.
Definition at line 247 of file Object.hpp.
|
inline |
Returns the velocity vector standard deviation (i.e. the uncertainty) of this object in [meter/seconds], absolute.
Definition at line 253 of file Object.hpp.
|
inline |
Returns the size of a rectangle around the object's/bounding box center point that contains (bounds) all of this object's scanpoints, in parallel to our vehicle's coordinate system axis (also called a paraxial rectangle).
Definition at line 314 of file Object.hpp.
|
inline |
Returns the center of the bounding box.
Definition at line 320 of file Object.hpp.
Box2D datatypes::Object::getBox | ( | ) | const |
Returns a rectangular box around the object's center point in [meter]. This method is just shorthand for obtaining the center point by getCenterPoint(), the course angle (orientation) by getCourseAngle(), and the size of the object by getObjectBox(). Box2D::getSize()::getX() returns the size of this object in x-direction of the object's coordinate system (i.e. the object length), Box2D::getSize()::getY() the size of this object in y-direction (i.e. the object width).
Definition at line 85 of file Object.cpp.
|
inline |
Returns the tracked center point of geometry ("Mittelpunkt") of this object in [meter], relative to our vehicle's coordinate system.
This estimated center point is as close to the actual center point as possible with the respective tracking algorithm. To be more precise, if the tracking algorithm tracks the center of gravity (COG) point, the COG point will be given here instead of the actual center of geometry. In those cases the actual center of geometry is unknown, unfortunately.
More information about the position of the object might be obtained from the getContourPoints() pointlist or through accessing the SegmentList by getSegment(), but those will always give unfiltered (non-tracked) results.
Definition at line 187 of file Object.hpp.
|
inline |
Returns the standard deviation (i.e. the uncertainty, "Mittelpunkt-Standardabweichung") of the center point of geometry estimation of this object, given in Vehicle coordinates in [meter].
Definition at line 194 of file Object.hpp.
|
inline |
Returns the object class that is most likely for this object.
Definition at line 156 of file Object.hpp.
|
inline |
Returns the number of scans in which the object has has been classified in the current classification.
Definition at line 161 of file Object.hpp.
|
inline |
Returns the quality measure ("Guete") of the current classification in [0 .. 1].
Definition at line 166 of file Object.hpp.
|
inline |
Returns the point of this object that is closest to the origin of our vehicle's coordinate system.
If this is not set, returns a zero-valued point.
Definition at line 328 of file Object.hpp.
|
inline |
Returns a vector of points that describes a polygon outline of the current object's measurement points.
Definition at line 333 of file Object.hpp.
|
inline |
Returns the course angle ("Kurswinkel") of this object's movement in [radian], in the interval [-pi, pi). This is named conforming to ISO 8855; elsewhere this value is also called the Orientation or the Heading.
This angle is the angle from the host vehicle's x-coordinate axis to the object's x-coordinate axis (which in most cases is identical to the object's velocity vector). It is also the sum of yaw angle ("Gierwinkel") and sideslip angle ("Schwimmwinkel") of this object.
Definition at line 207 of file Object.hpp.
|
inline |
Returns the course angle standard deviation (i.e. the uncertainty, "Kurswinkel-Standardabweichung") in [radian]. This is named conforming to ISO 8855; elsewhere this value is also called the Orientation or the Heading.
Definition at line 224 of file Object.hpp.
|
inline |
Returns the flags that have been set in this object. Currently used bits are as follows: bit#0 = basic information is available; bit#1 = contour information has been set, bit#2 = boundingBox has been set; bit#3 = object contains fused data from other sources (WLAN etc.); bit#4 = relative velocity has been set; bit#5 = CAN Object Data only (protocol version: 1; either bounding box or object box is available (see bit#2); analog see bit#4 if relative or absolute velocity has been set); bit#6...15 = reserved
Definition at line 131 of file Object.hpp.
|
inline |
Returns the number of scans in which the object has not been observed by measurement (i.e. it was hidden) but instead it has only been predicted.
Definition at line 142 of file Object.hpp.
|
inline |
Returns the maximum observed absolute velocity [m/s] (Classification feature). The value is NaN if it hasn't been set so far. The value is always non-negative, or NaN.
Definition at line 385 of file Object.hpp.
double datatypes::Object::getMeanAbsoluteVelocity | ( | ) | const |
Returns the mean velocity during the whole time over which the object has been tracked [m/s], which is basically just getTotalTrackedPathLength() divided by getTotalTrackingDuration(). Always non-negative.
Definition at line 437 of file Object.cpp.
|
inline |
Returns the normalized mean distance [m] between scanpoints in the segment, or zero if the object is currently hidden. (Classification feature) Always non-negative.
Definition at line 391 of file Object.hpp.
|
inline |
Returns the number of scans in which this object has been tracked.
Definition at line 136 of file Object.hpp.
|
inline |
Returns the estimated size of the object in [meter].
The returned size estimation models a rotated rectangular box around the object's center point (hence the name "object box"). Point2D::getX() returns the size of this object in x-direction of the object's coordinate system (i.e. the object length), Point2D::getY() the size in the y-direction (i.e. the object width). This value is the filtered size estimation of this object.
This box contains (bounds) all of this object's scanpoints and is in parallel to the object's coordinate system, i.e. it is using the getCourseAngle() orientation. [meter]
Definition at line 273 of file Object.hpp.
|
inline |
Returns the object size estimation's standard deviation [meter].
This is given in the object's coordinate system! Watch out for necessary coordinate transformations (rotations) if you want to use this value in the host vehicle's coordinate system.
Definition at line 297 of file Object.hpp.
void datatypes::Object::getObjectBoxVarCovar | ( | double & | var_x, |
double & | var_y, | ||
double & | covar_xy | ||
) | const |
Writes the object box x and y variance (squared standard deviation) and their covariance into the given variables in the host vehicle's coordinate system [meter^2].
In contrast to getObjectBoxSigma(), here the x and y variance is rotated from the object coordinate system into the host system. Hence, if there was a zero covariance beforehand, a non-zero covariance will result after the rotation.
Definition at line 353 of file Object.cpp.
|
inline |
The height of this object in [m] (most probably received through WLAN data)
Definition at line 343 of file Object.hpp.
|
inline |
The standard deviation of the height of this object in [m] (most probably received through WLAN data)
Definition at line 348 of file Object.hpp.
|
inline |
Returns the index number of this object.
Watch out: In some algorithms, the object id 0 (Null) is used as the special value of a non-valid object, but in other algorithms the id 0 is regarded as just a normal value as any other. However, invalid objects should be marked with setValid() instead of a Null-Value here.
Definition at line 113 of file Object.hpp.
|
inline |
The mass of this object in kilogram
Definition at line 353 of file Object.hpp.
|
inline |
(Usually Unused.) Returns the velocity vector ("Geschwindigkeitsvektor") of this object in [meter/seconds], relative to our vehicle's coordinate system. Note: The currently implemented tracking will always track only the absolute velocity; hence, this field relativeVelocity will be unset and simply be zero (or some other irrelevant values).
Definition at line 232 of file Object.hpp.
|
inline |
(Usually Unused.) Returns the velocity vector standard deviation (i.e. the uncertainty) of this object in [meter/seconds], relative to our vehicle's coordinate system. Note: The currently implemented tracking will always track only the absolute velocity; hence, this field relativeVelocity will be unset and simply be zero (or some other irrelevant values).
Definition at line 241 of file Object.hpp.
std::streamsize datatypes::Object::getSerializedSize | ( | UINT32 | version | ) | const |
Size of the serialized representation of this object.
version | 1,2 == compressed meter values; 3,4 == double values |
|
inline |
Returns the time of when the center point of this object was observed.
Definition at line 151 of file Object.hpp.
|
inline |
Returns the total path length of object movement that has been tracked [m]. (Classification feature) Always non-negative.
Definition at line 402 of file Object.hpp.
|
inline |
Returns the total duration for which this object has been tracked in [seconds]. (Classification feature, needed for mean velocity) Always non-negative.
Definition at line 397 of file Object.hpp.
|
inline |
Definition at line 413 of file Object.hpp.
|
inline |
An identifier to be used by WLAN fusion algorithms
Definition at line 338 of file Object.hpp.
void datatypes::Object::incrementObjectAge | ( | ) |
Just increment objectAge by one.
Definition at line 407 of file Object.cpp.
|
inline |
Returns true if the object is not being observed in the very last measurement (i.e. it was hidden) but instead it has only been predicted.
Definition at line 146 of file Object.hpp.
|
inline |
True, if this object is valid.
This flag will only be used to decide whether this Object is included in the serialization, i.e. if an Object has "false" here, it will not be serialized and will not be received by a receiver. Hence, this flag by itself is not included in the serialization.
Again: Invalid objects (those which return false here) will not be included in the serialization!
Definition at line 367 of file Object.hpp.
|
static |
Returns the given classification value as a short string.
Definition at line 315 of file Object.cpp.
|
static |
Returns the given classification value as a string.
Definition at line 251 of file Object.cpp.
|
static |
Returns the given classification value as a string with the integer number included.
Definition at line 309 of file Object.cpp.
bool datatypes::Object::operator== | ( | const Object & | other | ) | const |
Equality predicate.
Definition at line 52 of file Object.cpp.
void datatypes::Object::setAbsoluteVelocity | ( | const Point2D & | v | ) |
Sets the velocity vector as absolute value. Note: This also updates setMaxAbsoluteVelocity() accordingly.
Definition at line 132 of file Object.cpp.
void datatypes::Object::setAbsoluteVelocitySigma | ( | const Point2D & | v | ) |
Definition at line 143 of file Object.cpp.
void datatypes::Object::setBoundingBox | ( | const Point2D & | v | ) |
Definition at line 164 of file Object.cpp.
void datatypes::Object::setBoundingBoxCenter | ( | const Point2D & | v | ) |
Definition at line 171 of file Object.cpp.
|
inline |
Definition at line 188 of file Object.hpp.
void datatypes::Object::setCenterPointSigma | ( | const Point2D & | v | ) |
Definition at line 98 of file Object.cpp.
|
inline |
Definition at line 157 of file Object.hpp.
|
inline |
Definition at line 162 of file Object.hpp.
void datatypes::Object::setClassificationQuality | ( | double | v | ) |
Definition at line 91 of file Object.cpp.
|
inline |
Definition at line 329 of file Object.hpp.
void datatypes::Object::setContourPoints | ( | const Polygon2D & | v | ) |
Definition at line 188 of file Object.cpp.
void datatypes::Object::setCourseAngle | ( | double | newCourseAngle | ) |
Sets the course angle ("Kurswinkel") of this object's movement in [radian], in the interval [-pi, pi). This is named conforming to ISO 8855; elsewhere this value is also called the Orientation or the Heading.
If the new course angle is outside of the defined interval [-pi, pi), a warning message will be printed and the value will be normalized into that interval by normalizeRadians().
Definition at line 105 of file Object.cpp.
void datatypes::Object::setCourseAngleSigma | ( | double | v | ) |
Definition at line 126 of file Object.cpp.
|
inline |
Definition at line 132 of file Object.hpp.
|
inline |
Definition at line 147 of file Object.hpp.
void datatypes::Object::setMaxAbsoluteVelocity | ( | double | v | ) |
Definition at line 412 of file Object.cpp.
void datatypes::Object::setNormalizedMeanPointDist | ( | double | v | ) |
Definition at line 418 of file Object.cpp.
|
inline |
Definition at line 137 of file Object.hpp.
void datatypes::Object::setObjectBox | ( | const Point2D & | v | ) |
Set the size of the rectangular box of this object.
Definition at line 150 of file Object.cpp.
void datatypes::Object::setObjectBoxSigma | ( | const Point2D & | v | ) |
Definition at line 157 of file Object.cpp.
|
inline |
Definition at line 344 of file Object.hpp.
void datatypes::Object::setObjectHeightSigma | ( | double | v | ) |
Definition at line 176 of file Object.cpp.
|
inline |
Sets the index number of this object.
For setting an object to invalid, use setValid().
Definition at line 119 of file Object.hpp.
void datatypes::Object::setObjectMass | ( | double | v | ) |
Definition at line 182 of file Object.cpp.
|
inline |
Definition at line 233 of file Object.hpp.
|
inline |
Definition at line 242 of file Object.hpp.
|
inline |
Definition at line 152 of file Object.hpp.
void datatypes::Object::setTotalTrackedPathLength | ( | double | v | ) |
Definition at line 430 of file Object.cpp.
void datatypes::Object::setTotalTrackingDuration | ( | double | v | ) |
Definition at line 424 of file Object.cpp.
|
inline |
Set whether this object is valid.
This flag will only be used to decide whether this Object is included in the serialization, i.e. if an Object has "false" here, it will not be serialized and will not be received by a receiver. Hence, this flag by itself is not included in the serialization.
Again: Invalid objects (those which have false here) will not be included in the serialization!
Definition at line 380 of file Object.hpp.
|
inline |
Definition at line 339 of file Object.hpp.
|
static |
Returns the classification value as converted from the given string. This accepts the output of both objectClassificationToString() and objectClassificationToShortString().
Definition at line 274 of file Object.cpp.
std::string datatypes::Object::toString | ( | ) | const |
Returns a human-readable form of the content of this object (for debugging output) The actual output is merely a conversion to string of the return value of toConfigValues().
Definition at line 201 of file Object.cpp.
|
private |
Velocity of this object [meter/seconds] as absolute velocity; the orientation is relative to the vehicle coordinate system.
Definition at line 464 of file Object.hpp.
|
private |
Definition at line 465 of file Object.hpp.
|
private |
A rectangle in parallel to the vehicle coordinate system (a paraxial rectangle) that contains (bounds) all of this object's points.
Definition at line 470 of file Object.hpp.
|
private |
Center of the bounding box.
Definition at line 469 of file Object.hpp.
|
private |
Center point of object rectangle, given in Vehicle coordinate system.
Definition at line 458 of file Object.hpp.
|
private |
Definition at line 459 of file Object.hpp.
|
private |
The object class that is most likely for this object.
Definition at line 454 of file Object.hpp.
|
private |
Counts how long the object has been classified in the current classification.
Definition at line 455 of file Object.hpp.
|
private |
The quality of the current classification.
Definition at line 456 of file Object.hpp.
|
private |
The point of this object that is closest to the origin of the vehicle coordinate system.
Definition at line 473 of file Object.hpp.
|
private |
A poly-line that describes the outline of the current object measurement.
Definition at line 476 of file Object.hpp.
|
private |
named by ISO 8855; also called Orientation or Heading [rad]
Definition at line 460 of file Object.hpp.
|
private |
Definition at line 461 of file Object.hpp.
|
private |
reserved
Definition at line 448 of file Object.hpp.
|
private |
Counts how long the object has not been observed but only predicted.
Definition at line 451 of file Object.hpp.
|
private |
Pointer to the Segment that belongs to this object. (Note: This assumes that each object was associated to only one segment. If more than one segment is associated to this object, we're out of luck and need a new data structure.)
Definition at line 508 of file Object.hpp.
|
private |
Classification feature: The maximum observed absolute velocity [m/s].
Definition at line 486 of file Object.hpp.
|
private |
Classification feature: Normalized mean distance [m] between scanpoints in the segment, or zero if the object is currently hidden.
Definition at line 491 of file Object.hpp.
|
private |
number of scans in which this object has been tracked, or instead time?
Definition at line 450 of file Object.hpp.
|
private |
The object's length and width as a rectangle, relative to the object's coordinate system.
Definition at line 467 of file Object.hpp.
|
private |
Definition at line 468 of file Object.hpp.
|
private |
The height of this object in [m] (most probably received through WLAN data).
Definition at line 479 of file Object.hpp.
|
private |
The standard deviation of the height of this object in [m] (most probably received through WLAN data).
Definition at line 480 of file Object.hpp.
|
private |
Definition at line 447 of file Object.hpp.
|
private |
The mass of this object in kilogram
Definition at line 482 of file Object.hpp.
|
private |
Velocity of this object [meter/seconds], relative to the vehicle coordinate system.
Definition at line 462 of file Object.hpp.
|
private |
Definition at line 463 of file Object.hpp.
|
private |
Time of when the center point of this object was observed.
Definition at line 452 of file Object.hpp.
|
private |
Classification feature: Total accumulated path length over which this object has moved during being tracked. [m]
Definition at line 499 of file Object.hpp.
|
private |
Classification feature (needed for mean velocity): Duration of object being tracked in [s]
Definition at line 495 of file Object.hpp.
|
private |
An identifier to be used by WLAN fusion algorithms.
Definition at line 478 of file Object.hpp.