首页 > 其他 > 详细

Mr_matcher的细节3

时间:2017-06-22 20:38:50      阅读:343      评论:0      收藏:0      [点我收藏+]

主要是订阅了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;
}

 

Mr_matcher的细节3

原文:http://www.cnblogs.com/gary-guo/p/7066991.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!