Skip to content

Convert a SE3 matrix to Eigen::Matrixf matrix? #440

Answered by NikolausDemmel
Mechazo11 asked this question in Q&A
Discussion options

You must be logged in to vote

Sophus stores an SE3 element as quaternion and translation vector, but you can get the corresponding 4x4 transformation matrix with the .matrix() member function:

Sophus/sophus/se3.hpp

Lines 263 to 279 in caf27cf

/// Returns 4x4 matrix representation of the instance.
///
/// It has the following form:
///
/// | R t |
/// | o 1 |
///
/// where ``R`` is a 3x3 rotation matrix, ``t`` a translation 3-vector and
/// ``o`` a 3-column vector of zeros.
///
SOPHUS_FUNC Transformation matrix() const {
Transformation homogenious_matrix;
homogenious_matrix.template topLeftCorner<3, 4>() = matrix3x4();
homogenious_matrix.row(3)…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@Mechazo11
Comment options

@NikolausDemmel
Comment options

@Mechazo11
Comment options

Answer selected by Mechazo11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants