modern_robotics
|
Functions | |
const arma::mat33 | mr::RotInv (const arma::mat33 &R) |
Inverts a rotation matrix. More... | |
const arma::mat33 | mr::VecToso3 (const arma::vec3 &omg) |
Converts a 3-vector to an so(3) representation. More... | |
const arma::vec3 | mr::so3ToVec (const arma::mat33 &so3mat) |
Converts an so(3) representation to a 3-vector. More... | |
const std::tuple< const arma::vec3, double > | mr::AxisAng3 (const arma::vec3 &expc3) |
Converts a 3-vector of exponential coordinates for rotation into axis-angle form. More... | |
const arma::mat33 | mr::MatrixExp3 (const arma::mat33 &so3mat) |
Computes the matrix exponential of a matrix in so(3) More... | |
const arma::mat33 | mr::MatrixLog3 (const arma::mat33 &R) |
Computes the matrix logarithm of a rotation matrix. More... | |
const arma::mat44 | mr::RpToTrans (const arma::mat33 &R, const arma::vec3 &p) |
Converts a rotation matrix and a position vector into homogeneous transformation matrix. More... | |
const std::tuple< const arma::mat33, const arma::vec3 > | mr::TransToRp (const arma::mat44 &T) |
Converts a homogeneous transformation matrix into a rotation matrix and position vector. More... | |
const arma::mat44 | mr::TransInv (const arma::mat44 &T) |
Inverts a homogeneous transformation matrix. More... | |
const arma::mat44 | mr::VecTose3 (const arma::vec6 &V) |
Converts a spatial velocity vector into a 4x4 matrix in se3. More... | |
const arma::vec6 | mr::se3ToVec (const arma::mat44 &se3mat) |
Converts an se3 matrix into a spatial velocity vector. More... | |
const arma::mat66 | mr::Adjoint (const arma::mat44 &T) |
Computes the adjoint representation of a homogeneous transformation matrix. More... | |
const arma::vec6 | mr::ScrewToAxis (const arma::vec3 &q, const arma::vec3 &s, const double h) |
Takes a parametric description of a screw axis and converts it to a normalized screw axis. More... | |
const std::tuple< const arma::vec6, double > | mr::AxisAng6 (const arma::vec6 &expc6) |
Converts a 6-vector of exponential coordinates into screw axis-angle form. More... | |
const arma::mat44 | mr::MatrixExp6 (const arma::mat44 &se3mat) |
Computes the matrix exponential of an se3 representation of exponential coordinates. More... | |
const arma::mat44 | mr::MatrixLog6 (const arma::mat44 &T) |
Computes the matrix logarithm of a homogeneous transformation matrix. More... | |
const arma::mat33 | mr::ProjectToSO3 (const arma::mat33 &mat) |
Returns a projection of mat into SO(3) More... | |
const arma::mat44 | mr::ProjectToSE3 (const arma::mat44 &mat) |
Returns a projection of mat into SE(3) More... | |
double | mr::DistanceToSO3 (const arma::mat33 &mat) |
Returns the Frobenius norm to describe the distance of mat from the SO(3) manifold. More... | |
double | mr::DistanceToSE3 (const arma::mat44 &mat) |
Returns the Frobenius norm to describe the distance of mat from the SE(3) manifold. More... | |
bool | mr::TestIfSO3 (const arma::mat33 &mat) |
Returns true if mat is close to or on the manifold SO(3) More... | |
bool | mr::TestIfSE3 (const arma::mat44 &mat) |
Returns true if mat is close to or on the manifold SE(3) More... | |
const arma::mat66 mr::Adjoint | ( | const arma::mat44 & | T | ) |
Computes the adjoint representation of a homogeneous transformation matrix.
T | A homogeneous transformation matrix |
const std::tuple< const arma::vec3, double > mr::AxisAng3 | ( | const arma::vec3 & | expc3 | ) |
Converts a 3-vector of exponential coordinates for rotation into axis-angle form.
expc3 | A 3-vector of exponential coordinates for rotation |
const std::tuple< const arma::vec6, double > mr::AxisAng6 | ( | const arma::vec6 & | expc6 | ) |
Converts a 6-vector of exponential coordinates into screw axis-angle form.
expc6 | A 6-vector of exponential coordinates for rigid-body motion S*theta |
double mr::DistanceToSE3 | ( | const arma::mat44 & | mat | ) |
Returns the Frobenius norm to describe the distance of mat from the SE(3) manifold.
mat | A 4x4 matrix |
Computes the distance from mat to the SE(3) manifold using the following method: Compute the determinant of matR, the top 3x3 submatrix of mat. If det(matR) <= 0, return a large number. If det(matR) > 0, replace the top 3x3 submatrix of mat with matR^T.matR, and set the first three entries of the fourth column of mat to zero. Then return norm(mat - I).
double mr::DistanceToSO3 | ( | const arma::mat33 & | mat | ) |
Returns the Frobenius norm to describe the distance of mat from the SO(3) manifold.
mat | A 3x3 matrix |
Computes the distance from mat to the SO(3) manifold using the following method: If det(mat) <= 0, return a large number. If det(mat) > 0, return norm(mat^T.mat - I).
const arma::mat33 mr::MatrixExp3 | ( | const arma::mat33 & | so3mat | ) |
Computes the matrix exponential of a matrix in so(3)
so3mat | A 3x3 skew-symmetric matrix |
const arma::mat44 mr::MatrixExp6 | ( | const arma::mat44 & | se3mat | ) |
Computes the matrix exponential of an se3 representation of exponential coordinates.
se3mat | A matrix in se3 |
const arma::mat33 mr::MatrixLog3 | ( | const arma::mat33 & | R | ) |
Computes the matrix logarithm of a rotation matrix.
R | A 3x3 rotation matrix |
const arma::mat44 mr::MatrixLog6 | ( | const arma::mat44 & | T | ) |
Computes the matrix logarithm of a homogeneous transformation matrix.
T | A matrix in SE3 |
const arma::mat44 mr::ProjectToSE3 | ( | const arma::mat44 & | mat | ) |
Returns a projection of mat into SE(3)
mat | A 4x4 matrix to project to SE(3) |
Projects a matrix mat to the closest matrix in SE(3) using singular-value decomposition (see http://hades.mech.northwestern.edu/index.php/Modern_Robotics_Linear_Algebra_Review). This function is only appropriate for matrices close to SE(3).
const arma::mat33 mr::ProjectToSO3 | ( | const arma::mat33 & | mat | ) |
Returns a projection of mat into SO(3)
mat | A matrix near SO(3) to project to SO(3) |
Projects a matrix mat to the closest matrix in SO(3) using singular-value decomposition (see http://hades.mech.northwestern.edu/index.php/Modern_Robotics_Linear_Algebra_Review). This function is only appropriate for matrices close to SO(3).
const arma::mat33 mr::RotInv | ( | const arma::mat33 & | R | ) |
Inverts a rotation matrix.
R | rotation matrix |
const arma::mat44 mr::RpToTrans | ( | const arma::mat33 & | R, |
const arma::vec3 & | p | ||
) |
Converts a rotation matrix and a position vector into homogeneous transformation matrix.
R | A 3x3 rotation matrix |
p | A 3-vector |
const arma::vec6 mr::ScrewToAxis | ( | const arma::vec3 & | q, |
const arma::vec3 & | s, | ||
const double | h | ||
) |
Takes a parametric description of a screw axis and converts it to a normalized screw axis.
q | A point lying on the screw axis |
s | A unit vector in the direction of the screw axis |
h | The pitch of the screw axis |
const arma::vec6 mr::se3ToVec | ( | const arma::mat44 & | se3mat | ) |
Converts an se3 matrix into a spatial velocity vector.
se3mat | A 4x4 matrix in se3 |
const arma::vec3 mr::so3ToVec | ( | const arma::mat33 & | so3mat | ) |
Converts an so(3) representation to a 3-vector.
so3mat | A 3x3 skew-symmetric matrix |
|
inline |
Returns true if mat is close to or on the manifold SE(3)
mat | A 4x4 matrix |
Computes the distance d from mat to the SE(3) manifold using the following method: Compute the determinant of the top 3x3 submatrix of mat. If det(mat) <= 0, d = a large number. If det(mat) > 0, replace the top 3x3 submatrix of mat with mat^T.mat, and set the first three entries of the fourth column of mat to zero. Then d = norm(T - I). If d is close to zero, return true. Otherwise, return false.
|
inline |
Returns true if mat is close to or on the manifold SO(3)
mat | A 3x3 matrix |
Computes the distance d from mat to the SO(3) manifold using the following method: If det(mat) <= 0, d = a large number. If det(mat) > 0, d = norm(mat^T.mat - I). If d is close to zero, return true. Otherwise, return false.
const arma::mat44 mr::TransInv | ( | const arma::mat44 & | T | ) |
Inverts a homogeneous transformation matrix.
T | A homogeneous transformation matrix |
Uses the structure of transformation matrices to avoid taking a matrix inverse, for efficiency.
const std::tuple< const arma::mat33, const arma::vec3 > mr::TransToRp | ( | const arma::mat44 & | T | ) |
Converts a homogeneous transformation matrix into a rotation matrix and position vector.
T | A homogeneous transformation matrix |
const arma::mat44 mr::VecTose3 | ( | const arma::vec6 & | V | ) |
Converts a spatial velocity vector into a 4x4 matrix in se3.
V | A 6-vector representing a spatial velocity |
const arma::mat33 mr::VecToso3 | ( | const arma::vec3 & | omg | ) |
Converts a 3-vector to an so(3) representation.
omg | A 3-vector |