Skip to content

Commit 5af365b

Browse files
committed
[5/7] Complete rework: eigen_kdl
1 parent 242a00b commit 5af365b

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
@@ -42,7 +42,7 @@
4242

4343
#include <kdl/frames.hpp>
4444

45-
#include <tf2/impl/convert.h>
45+
#include <tf2/convert.h>
4646

4747
#include "tf2_eigen_kdl/visibility_control.h"
4848

@@ -97,94 +97,77 @@ void wrenchKDLToEigen(const KDL::Wrench & k, Eigen::Matrix<double, 6, 1> & e);
9797
TF2_EIGEN_KDL_PUBLIC
9898
void wrenchEigenToKDL(const Eigen::Matrix<double, 6, 1> & e, KDL::Wrench & k);
9999

100-
namespace impl
101-
{
102-
103100
template<>
104-
template<>
105-
inline void Converter<false, false>::convert(const KDL::Rotation & a, Eigen::Quaterniond & b)
101+
void convert(const KDL::Rotation & a, Eigen::Quaterniond & b)
106102
{
107103
quaternionKDLToEigen(a, b);
108104
}
109105

110106
template<>
111-
template<>
112-
inline void Converter<false, false>::convert(const Eigen::Quaterniond & a, KDL::Rotation & b)
107+
void convert(const Eigen::Quaterniond & a, KDL::Rotation & b)
113108
{
114109
quaternionEigenToKDL(a, b);
115110
}
116111

117112
template<>
118-
template<>
119-
inline void Converter<false, false>::convert(const KDL::Frame & a, Eigen::Affine3d & b)
113+
void convert(const KDL::Frame & a, Eigen::Affine3d & b)
120114
{
121115
transformKDLToEigen(a, b);
122116
}
123117

124118
template<>
125-
template<>
126-
inline void Converter<false, false>::convert(const KDL::Frame & a, Eigen::Isometry3d & b)
119+
void convert(const KDL::Frame & a, Eigen::Isometry3d & b)
127120
{
128121
transformKDLToEigen(a, b);
129122
}
130123

131124
template<>
132-
template<>
133-
inline void Converter<false, false>::convert(const Eigen::Affine3d & a, KDL::Frame & b)
125+
void convert(const Eigen::Affine3d & a, KDL::Frame & b)
134126
{
135127
transformEigenToKDL(a, b);
136128
}
137129

138130
template<>
139-
template<>
140-
inline void Converter<false, false>::convert(const Eigen::Isometry3d & a, KDL::Frame & b)
131+
void convert(const Eigen::Isometry3d & a, KDL::Frame & b)
141132
{
142133
transformEigenToKDL(a, b);
143134
}
144135

145136
template<>
146-
template<>
147-
inline void Converter<false, false>::convert(const KDL::Twist & a, Eigen::Matrix<double, 6, 1> & b)
137+
void convert(const KDL::Twist & a, Eigen::Matrix<double, 6, 1> & b)
148138
{
149139
twistKDLToEigen(a, b);
150140
}
151141

152142
template<>
153-
template<>
154-
inline void Converter<false, false>::convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Twist & b)
143+
void convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Twist & b)
155144
{
156145
twistEigenToKDL(a, b);
157146
}
158147

159148
template<>
160-
template<>
161-
inline void Converter<false, false>::convert(const KDL::Vector & a, Eigen::Matrix<double, 3, 1> & b)
149+
void convert(const KDL::Vector & a, Eigen::Matrix<double, 3, 1> & b)
162150
{
163151
vectorKDLToEigen(a, b);
164152
}
165153

166154
template<>
167-
template<>
168-
inline void Converter<false, false>::convert(const Eigen::Matrix<double, 3, 1> & a, KDL::Vector & b)
155+
void convert(const Eigen::Matrix<double, 3, 1> & a, KDL::Vector & b)
169156
{
170157
vectorEigenToKDL(a, b);
171158
}
172159

173160
template<>
174-
template<>
175-
inline void Converter<false, false>::convert(const KDL::Wrench & a, Eigen::Matrix<double, 6, 1> & b)
161+
void convert(const KDL::Wrench & a, Eigen::Matrix<double, 6, 1> & b)
176162
{
177163
wrenchKDLToEigen(a, b);
178164
}
179165

180166
template<>
181-
template<>
182-
inline void Converter<false, false>::convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Wrench & b)
167+
void convert(const Eigen::Matrix<double, 6, 1> & a, KDL::Wrench & b)
183168
{
184169
wrenchEigenToKDL(a, b);
185170
}
186-
} // namespace impl
187-
188171
} // namespace tf2
189172

190173
#endif // TF2_EIGEN_KDL__TF2_EIGEN_KDL_HPP_

0 commit comments

Comments
 (0)