42 #include <visp3/core/vpForceTwistMatrix.h>
43 #include <visp3/core/vpException.h>
44 #include <visp3/core/vpDebug.h>
64 for (
int i=0; i<6; i++) {
65 for (
int j=0; j<6; j++) {
80 for (
unsigned int i=0 ; i < 6 ; i++) {
81 for (
unsigned int j=0 ; j < 6; j++) {
186 const double tux,
const double tuy,
const double tuz)
228 for (
unsigned int i=0;i<6;i++) {
229 for (
unsigned int j=0;j<6;j++) {
231 for (
unsigned int k=0;k<6;k++)
251 "Cannot multiply (6x6) force/torque twist matrix by a (%dx%d) matrix",
257 for (
unsigned int i=0;i<6;i++) {
258 for (
unsigned int j=0;j<M.
getCols();j++) {
260 for (
unsigned int k=0;k<6;k++)
324 "Cannot multiply a (6x6) force/torque twist matrix by a %d dimension column vector",
330 for (
unsigned int i=0;i<6;i++) {
331 for (
unsigned int j=0;j<6;j++) {
357 for (i=0 ; i < 3 ; i++) {
358 for (j=0 ; j < 3 ; j++) {
359 (*this)[i][j] = R[i][j] ;
360 (*this)[i+3][j+3] = R[i][j] ;
361 (*this)[i+3][j] = skewaR[i][j] ;
432 typedef std::string::size_type size_type;
437 std::vector<std::string> values(m*n);
438 std::ostringstream oss;
439 std::ostringstream ossFixed;
440 std::ios_base::fmtflags original_flags = oss.flags();
443 ossFixed.setf ( std::ios::fixed, std::ios::floatfield );
445 size_type maxBefore=0;
446 size_type maxAfter=0;
448 for (
unsigned int i=0;i<m;++i) {
449 for (
unsigned int j=0;j<n;++j){
451 oss << (*this)[i][j];
452 if (oss.str().find(
"e")!=std::string::npos){
454 ossFixed << (*this)[i][j];
455 oss.str(ossFixed.str());
458 values[i*n+j]=oss.str();
459 size_type thislen=values[i*n+j].size();
460 size_type p=values[i*n+j].find(
'.');
462 if (p==std::string::npos){
472 size_type totalLength=length;
476 maxAfter=std::min(maxAfter, totalLength-maxBefore);
477 if (maxAfter==1) maxAfter=0;
482 if (intro) s <<intro;
483 s <<
"["<<m<<
","<<n<<
"]=\n";
485 for (
unsigned int i=0;i<m;i++) {
487 for (
unsigned int j=0;j<n;j++){
488 size_type p=values[i*n+j].find(
'.');
489 s.setf(std::ios::right, std::ios::adjustfield);
490 s.width((std::streamsize)maxBefore);
491 s <<values[i*n+j].substr(0,p).c_str();
494 s.setf(std::ios::left, std::ios::adjustfield);
495 if (p!=std::string::npos){
496 s.width((std::streamsize)maxAfter);
497 s <<values[i*n+j].substr(p,maxAfter).c_str();
500 s.width((std::streamsize)maxAfter);
510 s.flags(original_flags);
512 return (
int)(maxBefore+maxAfter);
vpForceTwistMatrix buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
Implementation of a matrix and operations on matrices.
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpForceTwistMatrix & operator=(const vpForceTwistMatrix &H)
error that can be emited by ViSP classes.
Implementation of a generic 2D array used as vase class of matrices and vectors.
unsigned int getCols() const
Return the number of columns of the 2D array.
vp_deprecated void setIdentity()
static Type maximum(const Type &a, const Type &b)
Implementation of a rotation matrix and operations on such kind of matrices.
vpRotationMatrix buildFrom(const vpHomogeneousMatrix &M)
vpForceTwistMatrix operator*(const vpForceTwistMatrix &F) const
void extract(vpRotationMatrix &R) const
unsigned int getRows() const
Return the number of rows of the 2D array.
Implementation of a force/torque twist matrix and operations on such kind of matrices.
Implementation of column vector and the associated operations.
int print(std::ostream &s, unsigned int length, char const *intro=0) const
Class that consider the case of a translation vector.
Implementation of a rotation vector as axis-angle minimal representation.
double ** rowPtrs
Address of the first element of each rows.