错误 :Could not find a connection between ‘/base_footprint’ and’/base_link’ because they are not part of the same tree.Tf has two or more unconnected trees.
lua配置:

  map_frame = "map",
  tracking_frame = "imu_link",
  published_frame = "base_link",
  odom_frame = "odom",
  provide_odom_frame = false,
  publish_frame_projected_to_2d = false,
  use_odometry = true,

tf指令

查看’/base_footprint’ and’/base_link’两坐标系之间的转换关系

rosrun tf tf_echo [reference_frame] [target_frame]  # 两坐标系之间的转换关系

carto文档中的参数说明

map_frame:The ROS frame ID to use for publishing submaps, the parent frame of poses, usually “map”

published_frame:The ROS frame ID to use as the child frame for publishing poses. For example “odom” if an “odom” frame is supplied by a different part of the system. In this case the pose of “odom” in the map_frame will be published. Otherwise, setting it to “base_link” is likely appropriate

坐标系变换通常可以为:
map_frame → \to odom → \to published_frame
或者
map_frame → \to published_frame

故设置时注意Tf树的连通性
lua改为:

  map_frame = "map",
  tracking_frame = "imu_link",
  published_frame = "odom",
  odom_frame = "odom",
  provide_odom_frame = false,
  publish_frame_projected_to_2d = false,
  use_odometry = true,

参考
cartographer官方文档
ROS中TF(坐标系转换)原理与使用

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐