Skip to content

Commit 7fddcc9

Browse files
committed
apply #5232
Signed-off-by: Oguz Ozturk <oguzkaganozt@gmail.com>
1 parent 3d8ed94 commit 7fddcc9

File tree

1 file changed

+0
-49
lines changed

1 file changed

+0
-49
lines changed

common/autoware_auto_tf2/include/autoware_auto_tf2/tf2_autoware_auto_msgs.hpp

-49
Original file line numberDiff line numberDiff line change
@@ -46,55 +46,6 @@ using BoundingBox = autoware_auto_perception_msgs::msg::BoundingBox;
4646
namespace tf2
4747
{
4848

49-
/*************/
50-
/** Point32 **/
51-
/*************/
52-
53-
/** \brief Apply a geometry_msgs TransformStamped to a geometry_msgs Point32 type.
54-
* This function is a specialization of the doTransform template defined in tf2/convert.h.
55-
* \param t_in The point to transform, as a Point32 message.
56-
* \param t_out The transformed point, as a Point32 message.
57-
* \param transform The timestamped transform to apply, as a TransformStamped message.
58-
*/
59-
template <>
60-
inline void doTransform(
61-
const geometry_msgs::msg::Point32 & t_in, geometry_msgs::msg::Point32 & t_out,
62-
const geometry_msgs::msg::TransformStamped & transform)
63-
{
64-
const KDL::Vector v_out = gmTransformToKDL(transform) * KDL::Vector(t_in.x, t_in.y, t_in.z);
65-
t_out.x = static_cast<float>(v_out[0]);
66-
t_out.y = static_cast<float>(v_out[1]);
67-
t_out.z = static_cast<float>(v_out[2]);
68-
}
69-
70-
/*************/
71-
/** Polygon **/
72-
/*************/
73-
74-
/** \brief Apply a geometry_msgs TransformStamped to a geometry_msgs Polygon type.
75-
* This function is a specialization of the doTransform template defined in tf2/convert.h.
76-
* \param t_in The polygon to transform.
77-
* \param t_out The transformed polygon.
78-
* \param transform The timestamped transform to apply, as a TransformStamped message.
79-
*/
80-
template <>
81-
inline void doTransform(
82-
const geometry_msgs::msg::Polygon & t_in, geometry_msgs::msg::Polygon & t_out,
83-
const geometry_msgs::msg::TransformStamped & transform)
84-
{
85-
// Don't call the Point32 doTransform to avoid doing this conversion every time
86-
const auto kdl_frame = gmTransformToKDL(transform);
87-
// We don't use std::back_inserter to allow aliasing between t_in and t_out
88-
t_out.points.resize(t_in.points.size());
89-
for (size_t i = 0; i < t_in.points.size(); ++i) {
90-
const KDL::Vector v_out =
91-
kdl_frame * KDL::Vector(t_in.points[i].x, t_in.points[i].y, t_in.points[i].z);
92-
t_out.points[i].x = static_cast<float>(v_out[0]);
93-
t_out.points[i].y = static_cast<float>(v_out[1]);
94-
t_out.points[i].z = static_cast<float>(v_out[2]);
95-
}
96-
}
97-
9849
/******************/
9950
/** Quaternion32 **/
10051
/******************/

0 commit comments

Comments
 (0)