File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ namespace eigenpy
2222 struct call < Eigen::AngleAxis<Scalar> >
2323 {
2424 typedef Eigen::AngleAxis<Scalar> AngleAxis;
25+
2526 static inline void expose ()
2627 {
2728 AngleAxisVisitor<AngleAxis>::expose ();
@@ -46,6 +47,7 @@ namespace eigenpy
4647 typedef typename AngleAxis::Matrix3 Matrix3;
4748
4849 typedef typename Eigen::Quaternion<Scalar,0 > Quaternion;
50+ typedef Eigen::RotationBase<AngleAxis,3 > RotationBase;
4951
5052 public:
5153
@@ -136,6 +138,9 @@ namespace eigenpy
136138 " AngleAxis representation of a rotation.\n\n " ,
137139 bp::no_init)
138140 .def (AngleAxisVisitor<AngleAxis>());
141+
142+ // Cast to Eigen::RotationBase and vice-versa
143+ bp::implicitly_convertible<AngleAxis,RotationBase>();
139144 }
140145
141146 };
Original file line number Diff line number Diff line change @@ -263,9 +263,11 @@ namespace eigenpy
263263 " 'q*v' (rotating 'v' by 'q'), "
264264 " 'q==q', 'q!=q', 'q[0..3]'." ,
265265 bp::no_init)
266- .def (QuaternionVisitor<Quaternion>())
267- ;
268-
266+ .def (QuaternionVisitor<Quaternion>());
267+
268+ // Cast to Eigen::QuaternionBase and vice-versa
269+ bp::implicitly_convertible<Quaternion,QuaternionBase >();
270+ bp::implicitly_convertible<QuaternionBase,Quaternion >();
269271 }
270272
271273 };
You can’t perform that action at this time.
0 commit comments