# ROS 1 大型 tf 树更新影响 IK 延迟怎么办

> 原文链接：https://robotics.hellobike.com/pitfalls/2024-03-29-robotics-se-110257
> 频道：pitfalls | 更新日期：2024-03-29 | 标签：auto, stackexchange, ros2, ros-humble, tf-tree, tf
> 核心摘要：在 ROS 1 中可用 tf2_server 只发布所需子树，并将客户端 /tf 重映射到命名空间话题。

# ROS 1 大型 tf 树更新影响 IK 延迟怎么办

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Separate your tf tree to have crucial frames update at a high frequency](https://robotics.stackexchange.com/questions/110257/separate-your-tf-tree-to-have-crucial-frames-update-at-a-high-frequency)（Robotics Stack Exchange #110257）

**状态**：已解决

## 问题

低延迟系统计算逆运动学时，机器人 `tf` 树过大，更新整个 `tf` 树耗时显著影响计算时间；希望关键坐标系高频更新。

## 环境

ROS 2

## 解决办法

1. 使用 ROS 1 的 `tf2_server`。
2. 在其 `streams` 功能中配置感兴趣的 transforms 列表，或配置整个子树。
3. 让 `tf2_server` 只在带命名空间的 `tf` 话题上发布该子树。
4. 在客户端将 `/tf` 重映射到该命名空间话题即可。

原问题作者：Yato；采纳答案作者：Martin Pecka。原内容依 CC BY-SA 4.0 授权，本页摘要同样依 CC BY-SA 4.0 授权。
:::

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #110257：Separate your tf tree to have crucial frames update at a high frequency](https://robotics.stackexchange.com/questions/110257/separate-your-tf-tree-to-have-crucial-frames-update-at-a-high-frequency)