Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 844

Cannot understand tf cpp code

$
0
0
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 ident; tf::Stamped 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 stamped_in and laser_pose should be stamped out. But I dont understand what is exactly doing. What is stamped in or out?

Viewing all articles
Browse latest Browse all 844

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>