Skip to content

Commit e8ef831

Browse files
authored
Merge pull request #21 from jcarpent/devel
Clean code + fix bugs relative to alignment issues
2 parents 1af50aa + 715c8d5 commit e8ef831

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

src/angle-axis.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
* with eigenpy. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17+
#include "eigenpy/memory.hpp"
1718
#include "eigenpy/geometry.hpp"
1819
#include "eigenpy/angle-axis.hpp"
1920

21+
EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(Eigen::AngleAxisd)
22+
2023
namespace eigenpy
2124
{
2225
void exposeAngleAxis()

src/quaternion.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@
1414
* with eigenpy. If not, see <http://www.gnu.org/licenses/>.
1515
*/
1616

17+
#include "eigenpy/memory.hpp"
1718
#include "eigenpy/geometry.hpp"
1819
#include "eigenpy/quaternion.hpp"
1920

21+
EIGENPY_DEFINE_STRUCT_ALLOCATOR_SPECIALIZATION(Eigen::Quaterniond)
22+
2023
namespace eigenpy
2124
{
2225
void exposeQuaternion()

src/quaternion.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ namespace eigenpy
112112
.def("_transformVector",&Quaternion::_transformVector,bp::arg("vector"),"Rotation of a vector by a quaternion.")
113113
.def("vec",&vec,"Returns a vector expression of the imaginary part (x,y,z).")
114114
.def("angularDistance",&Quaternion::template angularDistance<Quaternion>,"Returns the angle (in radian) between two rotations.")
115-
.def("slerp",&Quaternion::template slerp<Quaternion>,bp::args("t","other"),
115+
.def("slerp",&slerp,bp::args("t","other"),
116116
"Returns the spherical linear interpolation between the two quaternions *this and other at the parameter t in [0;1].")
117117

118118
/* --- Operators --- */
@@ -205,6 +205,9 @@ namespace eigenpy
205205

206206
return ss.str();
207207
}
208+
209+
static Quaternion slerp(const Quaternion & self, const Scalar t, const Quaternion & other)
210+
{ return self.slerp(t,other); }
208211

209212
public:
210213

0 commit comments

Comments
 (0)