Carma-platform v4.2.0
CARMA Platform is built on robot operating system (ROS) and utilizes open source software (OSS) that enables Cooperative Driving Automation (CDA) features to allow Automated Driving Systems to interact and cooperate with infrastructure and other vehicles through communication.
|
Functions | |
geometry_msgs::msg::PoseWithCovariance::_covariance_type | transformCovariance (const geometry_msgs::msg::PoseWithCovariance::_covariance_type &cov_in, const tf2::Transform &transform) |
Transform the covariance matrix of a PoseWithCovariance message to a new frame. More... | |
Modifications (c) Leidos 2021
|
inline |
Transform the covariance matrix of a PoseWithCovariance message to a new frame.
NOTE: The function is a direct copy from https://github.com/ros2/geometry2/blob/16562cee8694c11f1f82b2bdbde2814fca1c7954/tf2_geometry_msgs/include/tf2_geometry_msgs/tf2_geometry_msgs.hpp#L422
This bit of logic is normally included in the tf2_geometry_msgs packages, but it has not been backported to ROS2 Foxy This means the current doTransform operation for PoseWithCovarianceStamped does not result in the correct covariance values This function should be called after a call to doTransform to get the correct transformed covariance
cov_in | The covariance matrix to transform. |
transform | The transform to apply, as a tf2::Transform structure. |
To transform a covariance matrix:
[R 0] COVARIANCE [R' 0 ] [0 R] [0 R']
Where: R is the rotation matrix (3x3). R' is the transpose of the rotation matrix. COVARIANCE is the 6x6 covariance matrix to be transformed.
Reference: A. L. Garcia, “Linear Transformations of Random Vectors,” in Probability, Statistics, and Random Processes For Electrical Engineering, 3rd ed., Pearson Prentice Hall, 2008, pp. 320–322.
Definition at line 57 of file covariance_helper.h.
Referenced by object::ObjectDetectionTrackingWorker::detectedObjectCallback(), and motion_computation::conversion::impl::pose_from_gnss().