Skip to content

ROS图像RTSP协议推流到地面站

Ren Jin edited this page Jun 26, 2021 · 3 revisions

ROS图像RTSP协议推流到地面站

仅可以用于Nvidia TX2与NX平台,通过Nvidia Gstreamer进行编码,延时非常低。

NX低延时推流测试视频-bilibili

1 安装依赖

sudo apt-get update
sudo apt-get install libgstrtspserver-1.0-0 gstreamer1.0-rtsp
sudo apt-get install libgirepository1.0-dev
sudo apt-get install gobject-introspection gir1.2-gst-rtsp-server-1.0

2 修改推流参数

修改<path-to-prometheus>/Modules/object_detection/py_nodes/rtsp_stream/encode_config.yaml,其内容如下,可根据自己想推流图像话题的分辨率对应修改:

image_width: 640
image_height: 480
rtsp_port: 8554
factory_name: "/demo"

rtsp_port为推流端口号,factory_name为推流地址的后缀

3 运行推流

以网络摄像头读取的图像话题为例:

roslaunch prometheus_detection web_cam0.launch  # 打开一个usb摄像头0
roslaunch prometheus_detection rtsp_steam.launch  # 开始推流
Clone this wiki locally