BrettRD / ros-gst-bridge

a bidirectional ros to gstreamer bridge and utilities for dynamic pipelines
Other
128 stars 30 forks source link

Webcam to Topic and Topic to VideoSink not working #44

Closed gc-robotics closed 2 years ago

gc-robotics commented 2 years ago

I am having some issue in preserving video frames across rosimagesink and rosimagesrc. I am trying to acquire a stream from cam, publish it to a ros topic, read the message and sink it to xvimagesink or equivalent.

The first pipeline that I run is: GST_PLUGIN_PATH=./install/gst_bridge/lib/gst_bridge gst-launch-1.0 v4l2src device=/dev/video0 ! queue ! video/x-raw,framerate=10/1,width=400,height=280 ! rosimagesink ros-topic="/my_image"

This is the configuration in use: Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... [INFO] [1639743899.730116046] [gst_image_sink_node]: preparing video with caps 'video/x-raw, framerate=(fraction)10/1, width=(int)400, height=(int)280, format=(string)BGR, colorimetry=(string)1:1:7:4, interlace-mode=(string)progressive' Setting pipeline to PLAYING ...

The second pipeline looks something like: GST_PLUGIN_PATH=./install/gst_bridge/lib/gst_bridge gst-launch-1.0 rosimagesrc ros-topic="my_image" ! queue ! "video/x-raw, format=BGR, height=280, width=400, framerate=0/1" ! rawvideoparse use-sink-caps=true ! autovideosink.

I changed it few times looking for a way to resolve as on the output I get an interlaced almost-all-green image.

Some of the pipelines that I tried led to a Dropping message issue in the console, others to some a "taking too long" error.

Any idea?

Thanks in advance.

gc-robotics commented 2 years ago

Issue was caused by the pipelines. Resolved.