# Slam_Toolbox运行时报错消息时间戳早于变换缓存中所有数据

> 原文链接：https://robotics.hellobike.com/pitfalls/2025-06-26-robotics-se-116919
> 频道：pitfalls | 更新日期：2025-06-26 | 标签：auto, stackexchange, nav2
> 核心摘要：Nav2搭配Slam_Toolbox建图时出现时间戳相关报错，修改激光雷达时间戳模式可解决。

# Slam_Toolbox运行时报错消息时间戳早于变换缓存中所有数据

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Slam_Toolbox Error: Timestamp on the message is earlier than all the data in the transform cache](https://robotics.stackexchange.com/questions/116919/slam-toolbox-error-timestamp-on-the-message-is-earlier-than-all-the-data-in-the)（Robotics Stack Exchange #116919）

**状态**：有绕过办法

## 问题

运行Slam_Toolbox的online_async_launch.py时，持续出现报错：Message Filter dropping message，原因是消息时间戳早于变换缓存中所有数据，导致无法正常建图。

## 环境

硬件为Jetson Orin AGX、Ouster OS1-32激光雷达；软件为ROS2 Humble、Nav2、Slam_Toolbox。

## 解决办法

1. 将Ouster雷达启动参数中`timestamp_mode`的默认值改为`TIME_FROM_ROS_TIME`，验证是否解决问题。
2. 若上述方法无效，尝试将`timestamp_mode`设为`TIME_FROM_PTP_1588`，配置PTP相关环境：执行`sudo ptpd -i enp3s0 -M`启动PTP守护进程，执行`sudo ethtool -T enp89s0`确认以太网支持SOF_TIMESTAMPING。

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

## 原始参考来源 (Sources)

- [Robotics Stack Exchange #116919：Slam_Toolbox Error: Timestamp on the message is earlier than all the data in the transform cache](https://robotics.stackexchange.com/questions/116919/slam-toolbox-error-timestamp-on-the-message-is-earlier-than-all-the-data-in-the)