主要是订阅了playbag发布的scan话题和odom话题
其类型分别为


//cache the static tf from base to laser
getBaseToLaserTf(scan_msg->header.frame_id);
bool LaserScanMatcher::getBaseToLaserTf (const std::string& frame_id)
{
ros::Time t = ros::Time::now();
tf::StampedTransform base_to_laser_tf;
try
{
tf_listener_.waitForTransform(
base_frame_, frame_id, t, ros::Duration(1.0));
tf_listener_.lookupTransform (
base_frame_, frame_id, t, base_to_laser_tf);
}
catch (tf::TransformException ex)
{
ROS_WARN("Could not get initial transform from base to laser frame, %s", ex.what());
return false;
}
base_to_laser_ = base_to_laser_tf;
laser_to_base_ = base_to_laser_.inverse();
return true;
}
原文:http://www.cnblogs.com/gary-guo/p/7066991.html