cpm_ts_getters.h
Go to the documentation of this file.
1 /*
2 =============================================================================
3 MIT License
4 
5 Copyright (c) 2023-2025 Institute for Automotive Engineering (ika), RWTH Aachen University
6 
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
13 
14 The above copyright notice and this permission notice shall be included in all
15 copies or substantial portions of the Software.
16 
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
23 SOFTWARE.
24 =============================================================================
25 */
26 
32 #pragma once
33 
34 #include <tuple>
35 
37 
39 
48 inline uint32_t getStationID(const CollectivePerceptionMessage &cpm) { return getStationID(cpm.header); }
49 
56 inline TimestampIts getReferenceTime(const CollectivePerceptionMessage &cpm) {
57  return cpm.payload.management_container.reference_time;
58 }
59 
66 inline uint64_t getReferenceTimeValue(const CollectivePerceptionMessage &cpm) { return getReferenceTime(cpm).value; }
67 
74 inline double getLatitude(const CollectivePerceptionMessage &cpm) {
75  return getLatitude(cpm.payload.management_container.reference_position.latitude);
76 }
77 
84 inline double getLongitude(const CollectivePerceptionMessage &cpm) {
85  return getLongitude(cpm.payload.management_container.reference_position.longitude);
86 }
87 
94 inline double getAltitude(const CollectivePerceptionMessage &cpm) {
95  return getAltitude(cpm.payload.management_container.reference_position.altitude);
96 }
97 
109 inline gm::PointStamped getUTMPosition(const CollectivePerceptionMessage &cpm, int &zone, bool &northp) {
110  return getUTMPosition(cpm.payload.management_container.reference_position, zone, northp);
111 }
112 
122 inline gm::PointStamped getUTMPosition(const CollectivePerceptionMessage &cpm) {
123  int zone;
124  bool northp;
125  return getUTMPosition(cpm, zone, northp);
126 }
127 
137 inline std::vector<uint8_t> getCpmContainerIds(const CollectivePerceptionMessage &cpm) {
138  std::vector<uint8_t> container_ids;
139  for (int i = 0; i < cpm.payload.cpm_containers.value.array.size(); i++) {
140  container_ids.push_back(cpm.payload.cpm_containers.value.array[i].container_id.value);
141  }
142  return container_ids;
143 }
144 
153 inline WrappedCpmContainer getCpmContainer(const CollectivePerceptionMessage &cpm, const uint8_t container_id) {
154  for (int i = 0; i < cpm.payload.cpm_containers.value.array.size(); i++) {
155  if (cpm.payload.cpm_containers.value.array[i].container_id.value == container_id) {
156  return cpm.payload.cpm_containers.value.array[i];
157  }
158  }
159  throw std::invalid_argument("No Container with ID " + std::to_string(container_id) + " found in CPM");
160 }
161 
170 inline WrappedCpmContainer getPerceivedObjectContainer(const CollectivePerceptionMessage &cpm) {
171  return getCpmContainer(cpm, WrappedCpmContainer::CHOICE_CONTAINER_DATA_PERCEIVED_OBJECT_CONTAINER);
172 }
173 
181 inline uint8_t getNumberOfPerceivedObjects(const WrappedCpmContainer &container) {
182  if (container.container_id.value != WrappedCpmContainer::CHOICE_CONTAINER_DATA_PERCEIVED_OBJECT_CONTAINER) {
183  throw std::invalid_argument("Container is not a PerceivedObjectContainer");
184  }
185  uint8_t number = container.container_data_perceived_object_container.number_of_perceived_objects.value;
186  return number;
187 }
188 
195 inline uint8_t getNumberOfPerceivedObjects(const CollectivePerceptionMessage &cpm) {
197 }
198 
202 
211 inline PerceivedObject getPerceivedObject(const WrappedCpmContainer &container, const uint8_t i) {
212  if (i >= getNumberOfPerceivedObjects(container)) {
213  throw std::invalid_argument("Index out of range");
214  }
215  return container.container_data_perceived_object_container.perceived_objects.array[i];
216 }
217 
226 inline uint16_t getIdOfPerceivedObject(const PerceivedObject &object) { return object.object_id.value; }
227 
234 inline int32_t getCartesianCoordinate(const CartesianCoordinateWithConfidence &coordinate) {
235  return coordinate.value.value;
236 }
237 
244 inline uint16_t getCartesianCoordinateConfidence(const CartesianCoordinateWithConfidence &coordinate) {
245  return coordinate.confidence.value;
246 }
247 
254 inline gm::Point getPositionOfPerceivedObject(const PerceivedObject &object) {
255  gm::Point point;
256  point.x = double(getCartesianCoordinate(object.position.x_coordinate)) / 100.0;
257  point.y = double(getCartesianCoordinate(object.position.y_coordinate)) / 100.0;
258  if (object.position.z_coordinate_is_present) {
259  point.z = double(getCartesianCoordinate(object.position.z_coordinate)) / 100.0;
260  }
261  return point;
262 }
263 
271 inline std::tuple<double, double, double> getPositionConfidenceOfPerceivedObject(const PerceivedObject &object) {
272  double x_confidence = double(getCartesianCoordinateConfidence(object.position.x_coordinate)) / 100.0 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR;
273  double y_confidence = double(getCartesianCoordinateConfidence(object.position.y_coordinate)) / 100.0 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR;
274  double z_confidence = object.position.z_coordinate_is_present
275  ? double(getCartesianCoordinateConfidence(object.position.z_coordinate)) / 100.0 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR
276  : std::numeric_limits<double>::infinity();
277  return std::make_tuple(x_confidence, y_confidence, z_confidence);
278 }
279 
286 inline uint16_t getCartesianAngle(const CartesianAngle &angle) { return angle.value.value; }
287 
294 inline uint8_t getCartesianAngleConfidence(const CartesianAngle &angle) { return angle.confidence.value; }
295 
306 inline gm::Quaternion getOrientationOfPerceivedObject(const PerceivedObject &object) {
307  if (!object.angles_is_present) throw std::invalid_argument("No angles present in PerceivedObject");
308  tf2::Quaternion q;
309  double roll{0}, pitch{0}, yaw{0};
310 
311  if (object.angles.x_angle_is_present) {
312  roll = (((double(getCartesianAngle(object.angles.x_angle)) / 10.0) ) / 180.0) *
313  M_PI;
314  }
315  if (object.angles.y_angle_is_present) {
316  pitch = (((double(getCartesianAngle(object.angles.y_angle)) / 10.0) ) / 180.0) *
317  M_PI;
318  }
319  yaw = (((double(getCartesianAngle(object.angles.z_angle)) / 10.0)) / 180.0) *
320  M_PI;
321  // This wraps from -pi ti pi because setRPY only uses cos and sin of the angles
322  q.setRPY(roll, pitch, yaw);
323 
324  return tf2::toMsg(q);
325 }
326 
333 inline double getYawOfPerceivedObject(const PerceivedObject &object) {
334  gm::Quaternion orientation = getOrientationOfPerceivedObject(object);
335  tf2::Quaternion q(orientation.x, orientation.y, orientation.z, orientation.w);
336  double roll, pitch, yaw;
337  tf2::Matrix3x3(q).getRPY(roll, pitch, yaw);
338  return yaw;
339 }
340 
348 inline double getYawConfidenceOfPerceivedObject(const PerceivedObject &object) {
349  if(!object.angles_is_present) throw std::invalid_argument("No angles present in PerceivedObject");
350  double yaw_confidence = object.angles.z_angle.confidence.value / 10.0 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR;
351  yaw_confidence *= M_PI / 180.0; // convert to radians
352  return yaw_confidence;
353 }
354 
361 inline gm::Pose getPoseOfPerceivedObject(const PerceivedObject &object) {
362  gm::Pose pose;
363  pose.position = getPositionOfPerceivedObject(object);
364  pose.orientation = getOrientationOfPerceivedObject(object);
365  return pose;
366 }
367 
375 inline double getYawRateOfPerceivedObject(const PerceivedObject &object) {
376  if (!object.z_angular_velocity_is_present) throw std::invalid_argument("No yaw rate present in PerceivedObject");
377  return object.z_angular_velocity.value.value * M_PI / 180.0; // convert to rad/s
378 }
379 
389 inline double getYawRateConfidenceOfPerceivedObject(const PerceivedObject &object) {
390  if (!object.z_angular_velocity_is_present) throw std::invalid_argument("No yaw rate present in PerceivedObject");
391  auto val = object.z_angular_velocity.confidence.value;
392  static const std::map<uint8_t, double> confidence_map = {
393  {AngularSpeedConfidence::UNAVAILABLE, 0.0},
394  {AngularSpeedConfidence::DEG_SEC_01, 1.0},
395  {AngularSpeedConfidence::DEG_SEC_02, 2.0},
396  {AngularSpeedConfidence::DEG_SEC_05, 5.0},
397  {AngularSpeedConfidence::DEG_SEC_10, 10.0},
398  {AngularSpeedConfidence::DEG_SEC_20, 20.0},
399  {AngularSpeedConfidence::DEG_SEC_50, 50.0},
400  {AngularSpeedConfidence::OUT_OF_RANGE, std::numeric_limits<double>::infinity()},
401  };
402  return confidence_map.at(val) * M_PI / 180.0 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR; // convert to rad/s
403 }
404 
411 inline double getVelocityComponent(const VelocityComponent &velocity) { return double(velocity.value.value) / 100.0; }
412 
419 inline double getVelocityComponentConfidence(const VelocityComponent &velocity) {
420  return double(velocity.confidence.value) / 100.0 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR;
421 }
422 
430 inline gm::Vector3 getCartesianVelocityOfPerceivedObject(const PerceivedObject &object) {
431  if (!object.velocity_is_present) throw std::invalid_argument("No velocity present in PerceivedObject");
432  if (object.velocity.choice != Velocity3dWithConfidence::CHOICE_CARTESIAN_VELOCITY) {
433  throw std::invalid_argument("Velocity is not Cartesian");
434  }
435  gm::Vector3 velocity;
436  velocity.x = getVelocityComponent(object.velocity.cartesian_velocity.x_velocity);
437  velocity.y = getVelocityComponent(object.velocity.cartesian_velocity.y_velocity);
438  if (object.velocity.cartesian_velocity.z_velocity_is_present) {
439  velocity.z = getVelocityComponent(object.velocity.cartesian_velocity.z_velocity);
440  }
441  return velocity;
442 }
443 
452 inline std::tuple<double, double, double> getCartesianVelocityConfidenceOfPerceivedObject(const PerceivedObject &object) {
453  if (!object.velocity_is_present) throw std::invalid_argument("No velocity present in PerceivedObject");
454  if (object.velocity.choice != Velocity3dWithConfidence::CHOICE_CARTESIAN_VELOCITY) {
455  throw std::invalid_argument("Velocity is not Cartesian");
456  }
457  double x_confidence = getVelocityComponentConfidence(object.velocity.cartesian_velocity.x_velocity);
458  double y_confidence = getVelocityComponentConfidence(object.velocity.cartesian_velocity.y_velocity);
459  double z_confidence = object.velocity.cartesian_velocity.z_velocity_is_present
460  ? getVelocityComponentConfidence(object.velocity.cartesian_velocity.z_velocity)
461  : std::numeric_limits<double>::infinity();
462  return std::make_tuple(x_confidence, y_confidence, z_confidence);
463 }
464 
471 inline double getAccelerationComponent(const AccelerationComponent &acceleration) {
472  return double(acceleration.value.value) / 10.0;
473 }
474 
481 inline double getAccelerationComponentConfidence(const AccelerationComponent &acceleration) {
482  return double(acceleration.confidence.value) / 10.0 / etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR;
483 }
484 
492 inline gm::Vector3 getCartesianAccelerationOfPerceivedObject(const PerceivedObject &object) {
493  if (!object.acceleration_is_present) throw std::invalid_argument("No acceleration present in PerceivedObject");
494  if (object.acceleration.choice != Acceleration3dWithConfidence::CHOICE_CARTESIAN_ACCELERATION) {
495  throw std::invalid_argument("Acceleration is not Cartesian");
496  }
497  gm::Vector3 acceleration;
498  acceleration.x = getAccelerationComponent(object.acceleration.cartesian_acceleration.x_acceleration);
499  acceleration.y = getAccelerationComponent(object.acceleration.cartesian_acceleration.y_acceleration);
500  if (object.acceleration.cartesian_acceleration.z_acceleration_is_present) {
501  acceleration.z = getAccelerationComponent(object.acceleration.cartesian_acceleration.z_acceleration);
502  }
503  return acceleration;
504 }
505 
514 inline std::tuple<double, double, double> getCartesianAccelerationConfidenceOfPerceivedObject(const PerceivedObject &object) {
515  if (!object.acceleration_is_present) throw std::invalid_argument("No acceleration present in PerceivedObject");
516  if (object.acceleration.choice != Acceleration3dWithConfidence::CHOICE_CARTESIAN_ACCELERATION) {
517  throw std::invalid_argument("Acceleration is not Cartesian");
518  }
519  double x_confidence = getAccelerationComponentConfidence(object.acceleration.cartesian_acceleration.x_acceleration);
520  double y_confidence = getAccelerationComponentConfidence(object.acceleration.cartesian_acceleration.y_acceleration);
521  double z_confidence = object.acceleration.cartesian_acceleration.z_acceleration_is_present
522  ? getAccelerationComponentConfidence(object.acceleration.cartesian_acceleration.z_acceleration)
523  : std::numeric_limits<double>::infinity();
524  return std::make_tuple(x_confidence, y_confidence, z_confidence);
525 }
526 
538 inline uint16_t getXDimensionOfPerceivedObject(const PerceivedObject &object) {
539  if (!object.object_dimension_x_is_present) throw std::invalid_argument("No x-dimension present in PerceivedObject");
540  return object.object_dimension_x.value.value;
541 }
542 
550 inline uint8_t getXDimensionConfidenceOfPerceivedObject(const PerceivedObject &object) {
551  if (!object.object_dimension_x_is_present) throw std::invalid_argument("No x-dimension present in PerceivedObject");
552  return object.object_dimension_x.confidence.value;
553 }
554 
566 inline uint16_t getYDimensionOfPerceivedObject(const PerceivedObject &object) {
567  if (!object.object_dimension_y_is_present) throw std::invalid_argument("No y-dimension present in PerceivedObject");
568  return object.object_dimension_y.value.value;
569 }
570 
578 inline uint8_t getYDimensionConfidenceOfPerceivedObject(const PerceivedObject &object) {
579  if (!object.object_dimension_y_is_present) throw std::invalid_argument("No y-dimension present in PerceivedObject");
580  return object.object_dimension_y.confidence.value;
581 }
582 
594 inline uint16_t getZDimensionOfPerceivedObject(const PerceivedObject &object) {
595  if (!object.object_dimension_z_is_present) throw std::invalid_argument("No z-dimension present in PerceivedObject");
596  return object.object_dimension_z.value.value;
597 }
598 
606 inline uint8_t getZDimensionConfidenceOfPerceivedObject(const PerceivedObject &object) {
607  if (!object.object_dimension_z_is_present) throw std::invalid_argument("No z-dimension present in PerceivedObject");
608  return object.object_dimension_z.confidence.value;
609 }
610 
620 inline gm::Vector3 getDimensionsOfPerceivedObject(const PerceivedObject &object) {
621  gm::Vector3 dimensions;
622  dimensions.x = double(getXDimensionOfPerceivedObject(object)) / 10.0;
623  dimensions.y = double(getYDimensionOfPerceivedObject(object)) / 10.0;
624  dimensions.z = double(getZDimensionOfPerceivedObject(object)) / 10.0;
625  return dimensions;
626 }
627 
634 inline std::tuple<double, double, double> getDimensionsConfidenceOfPerceivedObject(const PerceivedObject &object) {
638  return {conf_x, conf_y, conf_z};
639 }
640 
651 inline gm::PointStamped getUTMPositionOfPerceivedObject(const CollectivePerceptionMessage &cpm,
652  const PerceivedObject &object) {
653  gm::PointStamped utm_position;
654  gm::PointStamped reference_position = getUTMPosition(cpm);
655  gm::Point relative_position = getPositionOfPerceivedObject(object);
656 
657  utm_position.header.frame_id = reference_position.header.frame_id;
658  utm_position.point.x = reference_position.point.x + relative_position.x;
659  utm_position.point.y = reference_position.point.y + relative_position.y;
660  utm_position.point.z = reference_position.point.z + relative_position.z;
661 
662  return utm_position;
663 }
664 
674 inline const std::array<double, 4> getWGSRefPosConfidence(const CollectivePerceptionMessage &cpm) {
675  return getWGSPosConfidenceEllipse(cpm.payload.management_container.reference_position.position_confidence_ellipse);
676 }
677 
684 inline uint8_t getSensorID(const SensorInformation &sensor_information) {
685  return sensor_information.sensor_id.value;
686 }
687 
694 inline uint8_t getSensorType(const SensorInformation &sensor_information) {
695  return sensor_information.sensor_type.value;
696 }
697 
698 } // namespace etsi_its_cpm_ts_msgs::access
etsi_its_cpm_ts_msgs::access::getDimensionsOfPerceivedObject
gm::Vector3 getDimensionsOfPerceivedObject(const PerceivedObject &object)
Retrieves the dimensions of a perceived object.
Definition: cpm_ts_getters.h:620
etsi_its_cpm_ts_msgs::access::getZDimensionOfPerceivedObject
uint16_t getZDimensionOfPerceivedObject(const PerceivedObject &object)
Retrieves the z-dimension of a perceived object.
Definition: cpm_ts_getters.h:594
etsi_its_cpm_ts_msgs::access::getSensorID
uint8_t getSensorID(const SensorInformation &sensor_information)
Get the sensorId of a SensorInformation object.
Definition: cpm_ts_getters.h:684
etsi_its_cpm_ts_msgs::access::getZDimensionConfidenceOfPerceivedObject
uint8_t getZDimensionConfidenceOfPerceivedObject(const PerceivedObject &object)
Gets the confidence of the z-dimension of a perceived object.
Definition: cpm_ts_getters.h:606
etsi_its_cpm_ts_msgs::access::getPoseOfPerceivedObject
gm::Pose getPoseOfPerceivedObject(const PerceivedObject &object)
Get the pose of the PerceivedObject.
Definition: cpm_ts_getters.h:361
etsi_its_cpm_ts_msgs::access::getCartesianVelocityOfPerceivedObject
gm::Vector3 getCartesianVelocityOfPerceivedObject(const PerceivedObject &object)
Get the Cartesian velocity of the PerceivedObject.
Definition: cpm_ts_getters.h:430
cdd_v2-1-1_getters.h
Getter functions for the ETSI ITS Common Data Dictionary (CDD) v2.1.1.
etsi_its_cpm_ts_msgs::access::getPerceivedObject
PerceivedObject getPerceivedObject(const WrappedCpmContainer &container, const uint8_t i)
Retrieves the PerceivedObject at the specified index from the given WrappedCpmContainer.
Definition: cpm_ts_getters.h:211
etsi_its_cpm_ts_msgs::access::getYawRateConfidenceOfPerceivedObject
double getYawRateConfidenceOfPerceivedObject(const PerceivedObject &object)
Get the Yaw Rate Confidence Of Perceived Object.
Definition: cpm_ts_getters.h:389
etsi_its_cpm_ts_msgs::access::getUTMPosition
gm::PointStamped getUTMPosition(const CollectivePerceptionMessage &cpm, int &zone, bool &northp)
Get the UTM Position defined within the ManagementContainer of the CPM.
Definition: cpm_ts_getters.h:109
etsi_its_cpm_ts_msgs::access::getPositionConfidenceOfPerceivedObject
std::tuple< double, double, double > getPositionConfidenceOfPerceivedObject(const PerceivedObject &object)
Get the Position Confidences Of Perceived Object.
Definition: cpm_ts_getters.h:271
tf2::Quaternion::setRPY
void setRPY(const tf2Scalar &roll, const tf2Scalar &pitch, const tf2Scalar &yaw)
etsi_its_cpm_ts_msgs::access::getNumberOfPerceivedObjects
uint8_t getNumberOfPerceivedObjects(const WrappedCpmContainer &container)
Definition: cpm_ts_getters.h:181
etsi_its_cpm_ts_msgs::access::getCpmContainerIds
std::vector< uint8_t > getCpmContainerIds(const CollectivePerceptionMessage &cpm)
Retrieves the container IDs from a CPM.
Definition: cpm_ts_getters.h:137
etsi_its_cpm_ts_msgs::access::getDimensionsConfidenceOfPerceivedObject
std::tuple< double, double, double > getDimensionsConfidenceOfPerceivedObject(const PerceivedObject &object)
Get the Dimensions Confidence Of Perceived Object.
Definition: cpm_ts_getters.h:634
etsi_its_cpm_ts_msgs::access::getLongitude
double getLongitude(const CollectivePerceptionMessage &cpm)
Get the Longitude value of CPM.
Definition: cpm_ts_getters.h:84
etsi_its_cpm_ts_msgs::access::getCpmContainer
WrappedCpmContainer getCpmContainer(const CollectivePerceptionMessage &cpm, const uint8_t container_id)
Definition: cpm_ts_getters.h:153
etsi_its_cpm_ts_msgs::access::getCartesianAngle
uint16_t getCartesianAngle(const CartesianAngle &angle)
Get the Cartesian angle of the PerceivedObject.
Definition: cpm_ts_getters.h:286
etsi_its_msgs::ONE_D_GAUSSIAN_FACTOR
constexpr const double ONE_D_GAUSSIAN_FACTOR
Definition: constants.h:71
etsi_its_cpm_ts_msgs::access::getCartesianCoordinateConfidence
uint16_t getCartesianCoordinateConfidence(const CartesianCoordinateWithConfidence &coordinate)
Retrieves the confidence value from a CartesianCoordinateWithConfidence object.
Definition: cpm_ts_getters.h:244
etsi_its_cpm_ts_msgs::access::getPositionOfPerceivedObject
gm::Point getPositionOfPerceivedObject(const PerceivedObject &object)
Definition: cpm_ts_getters.h:254
getWGSPosConfidenceEllipse
std::array< double, 4 > getWGSPosConfidenceEllipse(const PosConfidenceEllipse &position_confidence_ellipse)
Get the covariance matrix of the position confidence ellipse.
Definition: cdd_getters_common.h:236
etsi_its_cpm_ts_msgs::access::getYawOfPerceivedObject
double getYawOfPerceivedObject(const PerceivedObject &object)
Get the yaw of the PerceivedObject.
Definition: cpm_ts_getters.h:333
etsi_its_cpm_ts_msgs::access::getSensorType
uint8_t getSensorType(const SensorInformation &sensor_information)
Get the sensorType of a SensorInformation object.
Definition: cpm_ts_getters.h:694
etsi_its_cpm_ts_msgs::access::getYawRateOfPerceivedObject
double getYawRateOfPerceivedObject(const PerceivedObject &object)
Get the yaw rate of the PerceivedObject.
Definition: cpm_ts_getters.h:375
tf2::Matrix3x3::getRPY
void getRPY(tf2Scalar &roll, tf2Scalar &pitch, tf2Scalar &yaw, unsigned int solution_number=1) const
etsi_its_cpm_ts_msgs::access::getVelocityComponentConfidence
double getVelocityComponentConfidence(const VelocityComponent &velocity)
Get the confidence of the velocity component.
Definition: cpm_ts_getters.h:419
etsi_its_cpm_ts_msgs::access::getWGSRefPosConfidence
const std::array< double, 4 > getWGSRefPosConfidence(const CollectivePerceptionMessage &cpm)
Get the confidence ellipse of the reference position as Covariance matrix.
Definition: cpm_ts_getters.h:674
etsi_its_cpm_ts_msgs::access::getCartesianAngleConfidence
uint8_t getCartesianAngleConfidence(const CartesianAngle &angle)
Get the confidence of the Cartesian angle.
Definition: cpm_ts_getters.h:294
etsi_its_cpm_ts_msgs::access::getReferenceTimeValue
uint64_t getReferenceTimeValue(const CollectivePerceptionMessage &cpm)
Get the ReferenceTime-Value.
Definition: cpm_ts_getters.h:66
etsi_its_cpm_ts_msgs::access::getAccelerationComponentConfidence
double getAccelerationComponentConfidence(const AccelerationComponent &acceleration)
Get the confidence of the acceleration component.
Definition: cpm_ts_getters.h:481
etsi_its_cpm_ts_msgs::access::getStationID
uint32_t getStationID(const CollectivePerceptionMessage &cpm)
Retrieves the station ID from the given CPM.
Definition: cpm_ts_getters.h:48
etsi_its_cpm_ts_msgs::access::getCartesianCoordinate
int32_t getCartesianCoordinate(const CartesianCoordinateWithConfidence &coordinate)
Retrieves the Cartesian coordinate value from a CartesianCoordinateWithConfidence object.
Definition: cpm_ts_getters.h:234
etsi_its_cpm_ts_msgs::access::getYDimensionOfPerceivedObject
uint16_t getYDimensionOfPerceivedObject(const PerceivedObject &object)
Retrieves the y-dimension of a perceived object.
Definition: cpm_ts_getters.h:566
etsi_its_cpm_ts_msgs::access::getIdOfPerceivedObject
uint16_t getIdOfPerceivedObject(const PerceivedObject &object)
Retrieves the ID of a perceived object.
Definition: cpm_ts_getters.h:226
etsi_its_cpm_ts_msgs::access::getUTMPositionOfPerceivedObject
gm::PointStamped getUTMPositionOfPerceivedObject(const CollectivePerceptionMessage &cpm, const PerceivedObject &object)
Calculates the UTM position of a perceived object based on the CPMs referencep position.
Definition: cpm_ts_getters.h:651
etsi_its_cpm_ts_msgs::access::getYDimensionConfidenceOfPerceivedObject
uint8_t getYDimensionConfidenceOfPerceivedObject(const PerceivedObject &object)
Gets the confidence of the y-dimension of a perceived object.
Definition: cpm_ts_getters.h:578
etsi_its_cpm_ts_msgs::access::getCartesianAccelerationConfidenceOfPerceivedObject
std::tuple< double, double, double > getCartesianAccelerationConfidenceOfPerceivedObject(const PerceivedObject &object)
Get the Cartesian Acceleration Confidence Of Perceived Object.
Definition: cpm_ts_getters.h:514
etsi_its_cpm_ts_msgs::access::getXDimensionOfPerceivedObject
uint16_t getXDimensionOfPerceivedObject(const PerceivedObject &object)
Gets the x-dimension of a perceived object.
Definition: cpm_ts_getters.h:538
etsi_its_cpm_ts_msgs::access::getOrientationOfPerceivedObject
gm::Quaternion getOrientationOfPerceivedObject(const PerceivedObject &object)
Calculates the orientation of a perceived object.
Definition: cpm_ts_getters.h:306
etsi_its_cpm_ts_msgs::access::getVelocityComponent
double getVelocityComponent(const VelocityComponent &velocity)
Get the velocity component of the PerceivedObject.
Definition: cpm_ts_getters.h:411
etsi_its_cpm_ts_msgs::access::getAltitude
double getAltitude(const CollectivePerceptionMessage &cpm)
Get the Altitude value of CPM.
Definition: cpm_ts_getters.h:94
etsi_its_cpm_ts_msgs::access::getCartesianAccelerationOfPerceivedObject
gm::Vector3 getCartesianAccelerationOfPerceivedObject(const PerceivedObject &object)
Get the Cartesian acceleration of the PerceivedObject.
Definition: cpm_ts_getters.h:492
angle
TF2SIMD_FORCE_INLINE tf2Scalar angle(const Quaternion &q1, const Quaternion &q2)
tf2::Quaternion
tf2::toMsg
B toMsg(const A &a)
etsi_its_cpm_ts_msgs::access::getPerceivedObjectContainer
WrappedCpmContainer getPerceivedObjectContainer(const CollectivePerceptionMessage &cpm)
Retrieves the perceived object container from a CPM.
Definition: cpm_ts_getters.h:170
etsi_its_cpm_ts_msgs::access::getXDimensionConfidenceOfPerceivedObject
uint8_t getXDimensionConfidenceOfPerceivedObject(const PerceivedObject &object)
Gets the confidence of the x-dimension of a perceived object.
Definition: cpm_ts_getters.h:550
tf2::Matrix3x3
etsi_its_cpm_ts_msgs::access::getYawConfidenceOfPerceivedObject
double getYawConfidenceOfPerceivedObject(const PerceivedObject &object)
Get the Yaw Confidence Of Perceived Object object.
Definition: cpm_ts_getters.h:348
etsi_its_cpm_ts_msgs::access::getReferenceTime
TimestampIts getReferenceTime(const CollectivePerceptionMessage &cpm)
Get the Reference Time object.
Definition: cpm_ts_getters.h:56
etsi_its_cpm_ts_msgs::access
Definition: impl/cpm/cpm_ts_access.h:52
etsi_its_cpm_ts_msgs::access::getLatitude
double getLatitude(const CollectivePerceptionMessage &cpm)
Get the Latitude value of CPM.
Definition: cpm_ts_getters.h:74
etsi_its_cpm_ts_msgs::access::getAccelerationComponent
double getAccelerationComponent(const AccelerationComponent &acceleration)
Get the acceleration component of the PerceivedObject.
Definition: cpm_ts_getters.h:471
etsi_its_cpm_ts_msgs::access::getCartesianVelocityConfidenceOfPerceivedObject
std::tuple< double, double, double > getCartesianVelocityConfidenceOfPerceivedObject(const PerceivedObject &object)
Get the Cartesian Velocity Confidence Of Perceived Object object.
Definition: cpm_ts_getters.h:452


etsi_its_msgs_utils
Author(s): Jean-Pierre Busch , Guido Küppers , Lennart Reiher
autogenerated on Sun May 18 2025 02:32:12