RobotArmLib 0.0.6
Robot Arm Library [WIP]
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
rb::math Namespace Reference

math module namespace More...

Classes

class  Polynomial
 A class for constructing polynomial function. More...
 

Typedefs

typedef Eigen::MatrixXd MatrixX
 make MatrixX as alias of Eigen::MatrixXd
 
typedef Eigen::Matrix3d Matrix3
 make Matrix3 as alias of Eigen::Matrix3d
 
typedef Eigen::Matrix4d Matrix4
 make Matrix4 as alias of Eigen::Matrix4d
 
typedef Eigen::VectorXd VectorX
 make VectorX as alias of Eigen::VectorXd
 
typedef Eigen::Vector3d Vector3
 make Vector3 as alias of Eigen::Vector3d
 
typedef Eigen::Vector4d Vector4
 make Vector4 as alias of Eigen::Vector4d
 
typedef Eigen::AngleAxisd AngleAxis
 make AngleAxis as alias of Eigen::AngleAxisd
 
template<typename T , size_t R, size_t C>
using Array = Eigen::Array< T, R, C >
 make Array as alias of Eigen::Array (class template)
 
typedef Eigen::Array< double, 6, 1 > Array6
 make Array6 as alias of Eigen::Array<double, 6, 1>
 

Functions

Matrix4 homoTrans (const double &A, const double &alpha, const double &D, const double theta)
 Compute homogeneous transformation matrix for given link properties, and return the matrix.
 
Matrix4 rotateX (const double &rad)
 Compute rotation matrix about X axis for given angle in radians.
 
Matrix4 rotateY (const double &rad)
 Compute rotation matrix about Y axis for given angle in radians.
 
Matrix4 rotateZ (const double &rad)
 Compute rotation matrix about Z axis for given angle in radians.
 
void tr2rpy (const Matrix4 &m, double &roll_z, double &pitch_y, double &yaw_x)
 Extract Roll-Pitch-Yaw (Z-Y-X Euler) angles in radians from a homogeneous transformation matrix.
 
void rpy2tr (const double &roll_z, const double &pitch_y, const double &yaw_x, Matrix4 &out)
 Build a homogeneous transformation matrix from Roll-Pitch-Yaw angles (Z-Y-X Euler) given in radians.
 

Variables

static const double PI = 3.1415926535897932384626433832795
 Constant to present value of pi (more precise).
 
static const double RAD2DEG = 57.295779513082320876798154814105
 Constant to present converting from radian to degree.
 
static const double DEG2RAD = 0.01745329251994329576923690768489
 Constant to present converting from degree to radian.
 
static const double EPSILON = std::numeric_limits<float>::epsilon()
 Constant as critera if some variable close enough to zero.
 
static const double GRAVITY = 0.980665
 Constant to present value of gravity.
 

Detailed Description

math module namespace

Math module namespace.

Function Documentation

◆ homoTrans()

Matrix4 rb::math::homoTrans ( const double A,
const double alpha,
const double D,
const double  theta 
)
inline

Compute homogeneous transformation matrix for given link properties, and return the matrix.

Parameters
AGiven link length.
alphaGiven link twist.
DGiven link offset.
thetaGiven joint angle.
Returns
Homogeneous transformation matrix of given link properties.
Here is the caller graph for this function:

◆ rpy2tr()

void rb::math::rpy2tr ( const double roll_z,
const double pitch_y,
const double yaw_x,
Matrix4 out 
)
inline

Build a homogeneous transformation matrix from Roll-Pitch-Yaw angles (Z-Y-X Euler) given in radians.

Parameters
roll_zRoll (rotation about Z) in radians.
pitch_yPitch (rotation about Y) in radians.
yaw_xYaw (rotation about X) in radians.
outOutput 4x4 HT matrix (rotation part only; translation unchanged).
Here is the call graph for this function:
Here is the caller graph for this function:

◆ tr2rpy()

void rb::math::tr2rpy ( const Matrix4 m,
double roll_z,
double pitch_y,
double yaw_x 
)
inline

Extract Roll-Pitch-Yaw (Z-Y-X Euler) angles in radians from a homogeneous transformation matrix.

Parameters
mInput 4x4 HT matrix.
roll_zOutput roll (rotation about Z) in radians.
pitch_yOutput pitch (rotation about Y) in radians.
yaw_xOutput yaw (rotation about X) in radians.
Here is the caller graph for this function: