Cannot understand tf cpp code
The following code:
SlamGMapping::initMapper(const sensor_msgs::LaserScan& scan)
{
laser_frame_ = scan.header.frame_id;
// Get the laser's pose, relative to base.
tf::Stamped<tf::Pose> ident;
tf::Stamped<tf::Transform> laser_pose;
ident.setIdentity(); // set transformation matrix to identity
ident.frame_id_ = laser_frame_;
ident.stamp_ = scan.header.stamp;
try
{
tf_.transformPose(base_frame_, ident, laser_pose);
}
This is part of gmapping source code. I have known what tf does is try to correlate "base_link" to "laser". But I have difficulty understanding the code in detail.
I checked tf header description, and according ot it, tf_.transformPose(base_frame_, ident, laser_pose)
in which ident should be stampedin and laserpose should be stamped out. But I dont understand what is exactly doing. What is stamped in or out?
Asked by Bill5785 on 2017-03-04 10:52:22 UTC
Comments