cartotgrapher错误终结者 lookupTransform argument source_frame in tf2 frame_ids cannot be empty

问题描述

小编在运行自己编写的odom跑cartographer时候出现下列错误:

$ roslaunch cartographer_ros xxx.launch bag_filename:=xxx.bag

[ WARN] [1623375390.352953001, 1623136574.864343084]: W0610 18:36:30.000000 63556 tf_bridge.cc:52] Invalid argument passed to lookupTransform argument source_frame in tf2 frame_ids cannot be empty Warning: Invalid argument passed to canTransform argument source_frame in tf2 frame_ids cannot be empty

原因分析

通过查看话题消息

$ rostopic echo /odom/data 

发现 frame_id: ''child_frame_id: ''均为空
于是设置如下的值

nav_msgs::Odometry odom_msg;
odom_msg.header.frame_id = "odom"; // 对应odom_frame 的值
odom_msg.child_frame_id="base_link";

与之对应的lua配置如下

  map_frame = "map",
  tracking_frame = "base_link",--base_footprint base_link
  published_frame = "base_link",
  odom_frame = "odom",--odom
  provide_odom_frame = true,--true
  publish_frame_projected_to_2d = false,
  use_pose_extrapolator = true,--true
  use_odometry = true,--false

重新发布odom话题后,顺利运行。

  • 6
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值