Skip to content

Commit 5f7a53f

Browse files
committed
Re-enable unstamped eigen tests
they were disabled because of MSVC and ADL (MSVC couldn't choose between tf2::toMsg and Eigen::toMsg)
1 parent 28344e0 commit 5f7a53f

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

tf2_eigen/test/tf2_eigen-test.cpp

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,17 @@ TEST(TfEigen, ConvertVector3dStamped)
6464
EXPECT_EQ(v, v1);
6565
}
6666

67-
// TODO(clalancette) Re-enable these tests once we have tf2/convert.h:convert(A, B) implemented
68-
// TEST(TfEigen, ConvertVector3d)
69-
// {
70-
// const Eigen::Vector3d v(1,2,3);
67+
TEST(TfEigen, ConvertVector3d)
68+
{
69+
const Eigen::Vector3d v(1, 2, 3);
7170

72-
// Eigen::Vector3d v1;
73-
// geometry_msgs::msg::Point p1;
74-
// tf2::convert(v, p1);
75-
// tf2::convert(p1, v1);
71+
Eigen::Vector3d v1;
72+
geometry_msgs::msg::Point p1;
73+
tf2::convert(v, p1);
74+
tf2::convert(p1, v1);
7675

77-
// EXPECT_EQ(v, v1);
78-
// }
76+
EXPECT_EQ(v, v1);
77+
}
7978

8079
TEST(TfEigen, ConvertAffine3dStamped)
8180
{
@@ -95,20 +94,20 @@ TEST(TfEigen, ConvertAffine3dStamped)
9594
EXPECT_EQ(v.stamp_, v1.stamp_);
9695
}
9796

98-
// TODO(clalancette) Re-enable these tests once we have tf2/convert.h:convert(A, B) implemented
99-
// TEST(TfEigen, ConvertAffine3d)
100-
// {
101-
// const Eigen::Affine3d v(
102-
// Eigen::Translation3d(1,2,3) * Eigen::AngleAxis<double>(1, Eigen::Vector3d::UnitX()));
97+
TEST(TfEigen, ConvertAffine3d)
98+
{
99+
const Eigen::Affine3d v(Eigen::Translation3d(1, 2, 3) * Eigen::AngleAxis<double>(
100+
1,
101+
Eigen::Vector3d::UnitX()));
103102

104-
// Eigen::Affine3d v1;
105-
// geometry_msgs::msg::Pose p1;
106-
// tf2::convert(v, p1);
107-
// tf2::convert(p1, v1);
103+
Eigen::Affine3d v1;
104+
geometry_msgs::msg::Pose p1;
105+
tf2::convert(v, p1);
106+
tf2::convert(p1, v1);
108107

109-
// EXPECT_EQ(v.translation(), v1.translation());
110-
// EXPECT_EQ(v.rotation(), v1.rotation());
111-
// }
108+
EXPECT_EQ(v.translation(), v1.translation());
109+
EXPECT_EQ(v.rotation(), v1.rotation());
110+
}
112111

113112
TEST(TfEigen, ConvertTransform)
114113
{

0 commit comments

Comments
 (0)