@@ -381,19 +381,6 @@ geometry_msgs::QuaternionStamped toMsg(const tf2::Stamped<tf2::Quaternion>& in)
381381 return out;
382382}
383383
384- template <>
385- inline
386- ROS_DEPRECATED geometry_msgs::QuaternionStamped toMsg (const tf2::Stamped<tf2::Quaternion>& in);
387-
388-
389- // Backwards compatibility remove when forked for Lunar or newer
390- template <>
391- inline
392- geometry_msgs::QuaternionStamped toMsg (const tf2::Stamped<tf2::Quaternion>& in)
393- {
394- return toMsg (in);
395- }
396-
397384/* * \brief Convert a QuaternionStamped message to its equivalent tf2 representation.
398385 * This function is a specialization of the fromMsg template defined in tf2/convert.h.
399386 * \param in A QuaternionStamped message type.
@@ -409,18 +396,6 @@ void fromMsg(const geometry_msgs::QuaternionStamped& in, tf2::Stamped<tf2::Quate
409396 out.setData (tmp);
410397}
411398
412- template <>
413- inline
414- ROS_DEPRECATED void fromMsg (const geometry_msgs::QuaternionStamped& in, tf2::Stamped<tf2::Quaternion>& out);
415-
416- // Backwards compatibility remove when forked for Lunar or newer
417- template <>
418- inline
419- void fromMsg (const geometry_msgs::QuaternionStamped& in, tf2::Stamped<tf2::Quaternion>& out)
420- {
421- fromMsg (in, out);
422- }
423-
424399/* *********/
425400/* * Pose **/
426401/* *********/
@@ -529,6 +504,18 @@ void fromMsg(const geometry_msgs::PoseStamped& msg, tf2::Stamped<tf2::Transform>
529504/* * PoseWithCovarianceStamped **/
530505/* ******************************/
531506
507+ /* * \brief Convert a geometry_msgs PoseWithCovariance message to an equivalent tf2 Transform type.
508+ * \param in A PoseWithCovariance message.
509+ * \param out The PoseWithCovariance converted to a tf2 Transform type.
510+ */
511+ inline
512+ void fromMsg (const geometry_msgs::PoseWithCovariance& in, tf2::Transform& out)
513+ {
514+ out.setOrigin (tf2::Vector3 (in.pose .position .x , in.pose .position .y , in.pose .position .z ));
515+ // w at the end in the constructor
516+ out.setRotation (tf2::Quaternion (in.pose .orientation .x , in.pose .orientation .y , in.pose .orientation .z , in.pose .orientation .w ));
517+ }
518+
532519/* * \brief Extract a timestamp from the header of a PoseWithCovarianceStamped message.
533520 * This function is a specialization of the getTimestamp template defined in tf2/convert.h.
534521 * \param t PoseWithCovarianceStamped message to extract the timestamp from.
0 commit comments