# realsense-ros设置QoS参数报not supported警告

> 原文链接：https://robotics.hellobike.com/pitfalls/2026-10-25-realsense-ros-3583
> 频道：pitfalls | 更新日期：2026-10-25 | 标签：auto, github-issue, realsense-ros
> 核心摘要：在rs_launch.py或yaml中配置depth_qos等参数触发白名单警告，需在launch文件param列表中显式声明该参数定义以消除告警。

# realsense-ros设置QoS参数报not supported警告

::: v-pre
> 本文由 AI 根据公开内容整理，可能有误，请以原文为准：[Unsupported *_qos parameters warnings](https://github.com/realsenseai/realsense-ros/issues/3583)（GitHub IntelRealSense/realsense-ros #3583）

**状态**：已解决

## 问题

使用realsense-ros的rs_launch.py启动时，通过配置文件或YAML设置depth_qos等QoS参数，终端报错Warning: Parameter 'depth_qos' in config file is not supported。尽管通过ros2 param get验证参数实际已生效，但因参数未包含在启动文件的白名单中导致持续警告，命令行传参方式同样触发该警告。

## 环境

ROS2, realsense-ros (ros2-master分支), rs_launch.py启动脚本, Intel RealSense相机

## 解决办法

1. 打开realsense2_camera/launch/rs_launch.py文件，定位到参数定义列表（约第23行）。
2. 在param list中添加缺失的QoS参数声明，格式为{'name': 'depth_qos', 'default': 'SENSOR_DATA', 'description': 'set depth qos profile'}。
3. 保存文件后重新启动节点，确保自定义QoS参数被纳入启动文件白名单，从而消除not supported警告。
4. 注意并非所有ROS2 wrapper支持的参数都默认定义在rs_launch.py中，需根据实际需求手动补充声明。

讨论原作者：@nxdefiant 等，版权归原作者所有。
:::

## 原始参考来源 (Sources)

- [GitHub IntelRealSense/realsense-ros #3583：Unsupported *_qos parameters warnings](https://github.com/realsenseai/realsense-ros/issues/3583)