Penta Axis (PAX) support

I'm currently coding for Penta Axis (PAX) 5axis FDM option https://xyzdims.com/2021/02/08/3dprintingpentaaxispax5axisprintingoption/ on
Movement/Kinematics/PAXKinematics.{cpp,h}
akaM669 K14
@dc42 and I need some guidance to implement some inverse kinematics needed forMotorStepsToCartesian()
&CartesianToMotorSteps()
, something like:matrix4x4 m2 = mtranslate([xoff,yoff,zoff]); matrix4x4 m1 = mrotate([xrot,0,0]); matrix4x4 m0 = mrotate([0,0,zrot]); matrix4x4 m = minvert(m2*m1*m0); x = m.elem[0][3], y = m.elem[1][3], z = m.elem[2][3]; // extracting translation part again
It's a bit more complex, but in a nutshell I need a sequence of rotate/translate in different orders, and inverse at the end, and then translation vector extraction and thought doing this more high level with 4x4 matrices.
I'm not versed in C++ and Eclipse but I know C sufficiently, but it's 20+ years gone by since (Perl/Python these days).
It's not clear to me whether basic matrix ops are available in RRF, and which library is available and/or used, it seams
Math/Matrix.h
provides mainly structural functionality (create & set), and inversion of matrices (GaussJordan reduction), but not multiplication of matrices, correct?What's the best way to implement
mtranslate()
,mrotate()
andminvert()
in RRF?Cc: @JoergS5 (author of
FiveAxisRobotKinematics.cpp
) 
@xyzdims that's an interesting project!
To my knowledge there is no support of those functions in RRF yet. I'll implement 6 axis robot with jordan transformations also and need the functions as well. This will be in 23 months from now.
Maybe someone can recommend a library to be added to the RRF library. [I found e.g. https://github.com/bedapisl/matrix_library => this seems to be not the best one]

@xyzdims matrix multiplication could certainly be added to the maths library. However, if the matrices are sparse then it would be more efficient to do the calculations manually, to save a lot of multiplying by 0 or 1 and adding zero terms.

@joergs5 I just tried the library you mentioned, but I get many errors when including it, it struggles with
ios
dependency (within matrix_library/matrix.h byinclude
of<iterator>
and<complex>
(I didn't find an easy way to resolve it).@dc42 @JoergS5 I gonna code some matrix helpers for my use case, once things run well and reliable I get back to you and you can look at my code and consider to include something in
RRFLibrary/Math
.PS: I spent hours chasing errors reported under Eclipse (Linux), but console reported 0 errors  once I ran Index > Rebuild, the errors under "Problems" disappeared

@xyzdims said in Penta Axis (PAX) support:
I just tried the library you mentioned, but I get many errors
Maybe you were missing using namespace std; in the cpp code, because there are std::ios, std::iterator and std::complex standard classes then. But anyway, good luck implementing the matrix methods.

@joergs5 I've got my kinematics numerically working with the few helpers based on
FixedMatrix<floatc_t,4,4>
I mentioned (not yet optimized or so).Still some stuff to sort out regarding
LimitSpeedAndAcceleration()
to coordinate different speeds of my axes (they differ quite a lot in speed). 
This post is deleted!