Skip to content

Commit 6b3759b

Browse files
committed
[5/7] Complete rework: eigen_kdl
1 parent 1fd60cc commit 6b3759b

File tree

1 file changed

+13
-30
lines changed

1 file changed

+13
-30
lines changed

tf2_eigen_kdl/include/tf2_eigen_kdl/tf2_eigen_kdl.hpp

Lines changed: 13 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
#include "kdl/frames.hpp"
5757

58-
#include "tf2/impl/convert.h"
58+
#include "tf2/convert.h"
5959

6060
#include "tf2_eigen_kdl/visibility_control.h"
6161

@@ -110,94 +110,77 @@ void wrenchKDLToEigen(const KDL::Wrench & k, Eigen::Matrix<double, 6, 1> & e);
110110
TF2_EIGEN_KDL_PUBLIC
111111
void wrenchEigenToKDL(const Eigen::Matrix<double, 6, 1> & e, KDL::Wrench & k);
112112

113-
namespace impl
114-
{
115-
116113
template<>
117-
template<>
118-
inline void Converter<false, false>::convert(const KDL::Rotation & a, Eigen::Quaterniond & b)
114+
void convert(const KDL::Rotation & a, Eigen::Quaterniond & b)
119115
{
120116
quaternionKDLToEigen(a, b);
121117
}
122118

123119
template<>
124-
template<>
125-
inline void Converter<false, false>::convert(const Eigen::Quaterniond & a, KDL::Rotation & b)
120+
void convert(const Eigen::Quaterniond & a, KDL::Rotation & b)
126121
{
127122
quaternionEigenToKDL(a, b);
128123
}
129124

130125
template<>
131-
template<>
132-
inline void Converter<false, false>::convert(const KDL::Frame & a, Eigen::Affine3d & b)
126+
void convert(const KDL::Frame & a, Eigen::Affine3d & b)
133127
{
134128
transformKDLToEigen(a, b);
135129
}
136130

137131
template<>
138-
template<>
139-
inline void Converter<false, false>::convert(const KDL::Frame & a, Eigen::Isometry3d & b)
132+
void convert(const KDL::Frame & a, Eigen::Isometry3d & b)
140133
{
141134
transformKDLToEigen(a, b);
142135
}
143136

144137
template<>
145-
template<>
146-
inline void Converter<false, false>::convert(const Eigen::Affine3d & a, KDL::Frame & b)
138+
void convert(const Eigen::Affine3d & a, KDL::Frame & b)
147139
{
148140
transformEigenToKDL(a, b);
149141
}
150142

151143
template<>
152-
template<>
153-
inline void Converter<false, false>::convert(const Eigen::Isometry3d & a, KDL::Frame & b)
144+
void convert(const Eigen::Isometry3d & a, KDL::Frame & b)
154145
{
155146
transformEigenToKDL(a, b);
156147
}
157148

158149
template<>
159-
template<>
160-
inline void Converter<false, false>::convert(const KDL::Twist & a, Eigen::Matrix<double, 6, 1> & b)
150+
void convert(const KDL::Twist & a, Eigen::Matrix<double, 6, 1> & b)
161151
{
162152
twistKDLToEigen(a, b);
163153
}
164154

165155
template<>
166-
template<>
167-
inline void Converter<false, false>::convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Twist & b)
156+
void convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Twist & b)
168157
{
169158
twistEigenToKDL(a, b);
170159
}
171160

172161
template<>
173-
template<>
174-
inline void Converter<false, false>::convert(const KDL::Vector & a, Eigen::Matrix<double, 3, 1> & b)
162+
void convert(const KDL::Vector & a, Eigen::Matrix<double, 3, 1> & b)
175163
{
176164
vectorKDLToEigen(a, b);
177165
}
178166

179167
template<>
180-
template<>
181-
inline void Converter<false, false>::convert(const Eigen::Matrix<double, 3, 1> & a, KDL::Vector & b)
168+
void convert(const Eigen::Matrix<double, 3, 1> & a, KDL::Vector & b)
182169
{
183170
vectorEigenToKDL(a, b);
184171
}
185172

186173
template<>
187-
template<>
188-
inline void Converter<false, false>::convert(const KDL::Wrench & a, Eigen::Matrix<double, 6, 1> & b)
174+
void convert(const KDL::Wrench & a, Eigen::Matrix<double, 6, 1> & b)
189175
{
190176
wrenchKDLToEigen(a, b);
191177
}
192178

193179
template<>
194-
template<>
195-
inline void Converter<false, false>::convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Wrench & b)
180+
void convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Wrench & b)
196181
{
197182
wrenchEigenToKDL(a, b);
198183
}
199-
} // namespace impl
200-
201184
} // namespace tf2
202185

203186
#endif // TF2_EIGEN_KDL__TF2_EIGEN_KDL_HPP_

0 commit comments

Comments
 (0)