what does this function in hector mapping mean?

asked 2017-07-28 21:28:47 -0500

scopus gravatar image

updated 2017-07-29 00:25:14 -0500

Hi, all, I am learning the source code of hector mapping. I have a question about a function in ../hector_slam_lib/map/OccGridMapUtil.h

    Eigen::Affine2f getTransformForState(const Eigen::Vector3f& transVector) const
    return Eigen::Translation2f(transVector[0], transVector[1]) * Eigen::Rotation2Df(transVector[2]);

By studying the source code, I know that the input parameter 'transVector' is the last ScanMatchPose (also the robot's last pose?) in map frame (or map coordinate system, the last ScanMatchPose in world frame has been transformed into map frame by GridMapBase::getMapCoordsPose).

The return value is a transform with Eigen::Affine2f type, this value will be used in OccGridMapUtil::getCompleteHessianDerivs to transfrom a point (currPoint in code). The currPoint's value depends on the level of the map, it has been computed by DataPointContainer::setFrom from the original laser scan data.

Does anyone can tell me what is this function used for? What is the underlying mathematcial theory ? Thank you! @Stefan Kohlbrecher could you give me an answer? Thanks!


According the API document on Eigen, http://eigen.tuxfamily.org/dox/classEigen_1_1Translation.html#a14863add291014cebe115c5d66f64497

It is "Concatenates a translation and a rotation". Ok, but why the return variable type is a Affine2f. Is a Affine2f a 3X3 matrix? and is a Affine2f a isometric transformation type? Thanks!~

edit retag flag offensive close merge delete