Function etsi_its_cpm_ts_msgs::access::setUTMPositionOfPerceivedObject

Function Documentation

inline void etsi_its_cpm_ts_msgs::access::setUTMPositionOfPerceivedObject(CollectivePerceptionMessage &cpm, PerceivedObject &object, const gm::PointStamped &utm_position, const double x_std = std::numeric_limits<double>::infinity(), const double y_std = std::numeric_limits<double>::infinity(), const double z_std = std::numeric_limits<double>::infinity())

Sets the position of a perceived object based on a UTM position.

This function sets the position of a perceived object using the provided UTM position and the CPM’s reference position. It also allows specifying confidence values for the x, y, and z coordinates.

Parameters:
  • cpm – The CPM to get the reference position from.

  • object – The PerceivedObject to set the position for.

  • utm_position – gm::PointStamped representing the UTM position of the object including the frame_id (utm_<zone><N/S>).

  • x_confidence – The standard deviation in meters for the x coordinate (default: CoordinateConfidence::UNAVAILABLE).

  • y_confidence – The standard deviation in meters for the y coordinate (default: CoordinateConfidence::UNAVAILABLE).

  • z_confidence – The standard deviation in meters for the z coordinate (default: CoordinateConfidence::UNAVAILABLE).

Throws:

std::invalid_argument – if the UTM-Position frame_id does not match the reference position frame_id.