Namespaces | Enumerations | Functions
Eigen.hpp File Reference
#include <Eigen/Core>
#include <Eigen/Geometry>
#include <array>
#include "v_repLib.h"
+ Include dependency graph for Eigen.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 vrepquat
 

Enumerations

enum  vrepquat::vrep_quat { vrepquat::x, vrepquat::y, vrepquat::z, vrepquat::w }
 

Functions

template<typename Input >
Eigen::Vector3d eigenRotToEigenVector3dAngleAxis (Input eigenQuat)
 
template<typename P >
std::array< float, 3 > EigenToVrepPosition (const P &p)
 
template<typename Q >
std::array< float, 4 > EigenToVrepQuaternion (const Q &q)
 
std::pair< Eigen::Vector3d, Eigen::Vector3d > getAxisAngleAndTranslation (int ObjectHandle, int BaseFrameObjectHandle)
 
Eigen::Affine3d getJointTransform (int objectHandle)
 Eigen version of simGetJointMatrix. More...
 
Eigen::Affine3d getObjectTransform (int objectHandle, int relativeToObjectHandle=-1)
 
std::pair< Eigen::Quaterniond, Eigen::Vector3d > getObjectTransformQuaternionTranslationPair (int objectHandle, int relativeToObjectHandle=-1)
 
template<typename T >
void setObjectTransform (int objectHandle, int relativeToObjectHandle, T &transform)
 
template<typename Input >
Eigen::Vector3d vrepQuatToEigenVector3dAngleAxis (Input vrepQuat)
 
template<typename InputIterator >
Eigen::Quaterniond vrepToEigenQuaternion (InputIterator vrepQuat)
 
Eigen::Affine3d vrepToEigenTransform (const std::array< float, 12 > &vrepTransform)
 
template<typename InputIterator >
Eigen::Vector3d vrepToEigenVector3d (InputIterator vrepVec)
 

Detailed Description

Todo:
convert to use template metaprgramming to define simple functions that simplify and automate the necessary conversions

Definition in file Eigen.hpp.

Function Documentation

§ eigenRotToEigenVector3dAngleAxis()

template<typename Input >
Eigen::Vector3d eigenRotToEigenVector3dAngleAxis ( Input  eigenQuat)

Definition at line 63 of file Eigen.hpp.

§ EigenToVrepPosition()

template<typename P >
std::array<float,3> EigenToVrepPosition ( const P &  p)

Definition at line 47 of file Eigen.hpp.

§ EigenToVrepQuaternion()

template<typename Q >
std::array<float,4> EigenToVrepQuaternion ( const Q &  q)

Definition at line 32 of file Eigen.hpp.

§ getAxisAngleAndTranslation()

std::pair<Eigen::Vector3d,Eigen::Vector3d> getAxisAngleAndTranslation ( int  ObjectHandle,
int  BaseFrameObjectHandle 
)

Definition at line 96 of file Eigen.hpp.

§ getJointTransform()

Eigen::Affine3d getJointTransform ( int  objectHandle)

Eigen version of simGetJointMatrix.

Definition at line 176 of file Eigen.hpp.

§ getObjectTransform()

Eigen::Affine3d getObjectTransform ( int  objectHandle,
int  relativeToObjectHandle = -1 
)
Parameters
objectHandleThe V-Rep object handle for which the transform is needed
relativeToObjectHandleThe frame of reference in which to get the object handle, -1 (the default) gets the absolute position aka world frame
See also
http://www.coppeliarobotics.com/helpFiles/en/regularApi/simGetObjectPosition.htm
http://www.coppeliarobotics.com/helpFiles/en/regularApi/simGetObjectQuaternion.htm

Definition at line 135 of file Eigen.hpp.

§ getObjectTransformQuaternionTranslationPair()

std::pair<Eigen::Quaterniond,Eigen::Vector3d> getObjectTransformQuaternionTranslationPair ( int  objectHandle,
int  relativeToObjectHandle = -1 
)
Parameters
objectHandleThe V-Rep object handle for which the transform is needed
relativeToObjectHandleThe frame of reference in which to get the object handle, -1 (the default) gets the absolute position aka world frame
See also
http://www.coppeliarobotics.com/helpFiles/en/regularApi/simGetObjectPosition.htm
http://www.coppeliarobotics.com/helpFiles/en/regularApi/simGetObjectQuaternion.htm
Todo:
TODO(ahundt) handle errors/return codes from simGetObjectPosition

Definition at line 160 of file Eigen.hpp.

§ setObjectTransform()

template<typename T >
void setObjectTransform ( int  objectHandle,
int  relativeToObjectHandle,
T &  transform 
)

Definition at line 117 of file Eigen.hpp.

§ vrepQuatToEigenVector3dAngleAxis()

template<typename Input >
Eigen::Vector3d vrepQuatToEigenVector3dAngleAxis ( Input  vrepQuat)

Definition at line 57 of file Eigen.hpp.

§ vrepToEigenQuaternion()

template<typename InputIterator >
Eigen::Quaterniond vrepToEigenQuaternion ( InputIterator  vrepQuat)

Definition at line 21 of file Eigen.hpp.

§ vrepToEigenTransform()

Eigen::Affine3d vrepToEigenTransform ( const std::array< float, 12 > &  vrepTransform)

§ vrepToEigenVector3d()

template<typename InputIterator >
Eigen::Vector3d vrepToEigenVector3d ( InputIterator  vrepVec)

Definition at line 70 of file Eigen.hpp.