BrettRD / ros-gst-bridge

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

rosimagesink does not take parameters at runtime #51

Closed sandman closed 1 year ago

sandman commented 1 year ago

Hi @BrettRD

I am testng rosimagesink with a network streaming pipeline. I provided rosimagesink with parameters but it does not take them:

<my_gst_pipeline> ! rosimagesink ros-name="Test_node" ros-namespace=/niro_fn22lnt ros-topic=/img_front_center/hmi ros-encoding=RGB8

Here is the program output:

[INFO] [1669121984.705240412] [niro_fn22lnt.Test_node]: preparing video with caps 'video/x-raw, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, multiview-mode=(string)mono, multiview-flags=(GstVideoMultiviewFlagsSet)0:ffffffff:/right-view-first/left-flipped/left-flopped/right-flipped/right-flopped/half-aspect/mixed-mono, pixel-aspect-ratio=(fraction)1/1, framerate=(fraction)0/1, format=(string)BGR'
[INFO] [1669121984.705288472] [niro_fn22lnt.Test_node]: setcaps format string is BGR 
[INFO] [1669121984.705296407] [niro_fn22lnt.Test_node]: setcaps n_components is 3
[INFO] [1669121984.705301546] [niro_fn22lnt.Test_node]: setcaps bits is 8
[INFO] [1669121984.705306235] [niro_fn22lnt.Test_node]: setcaps pixel_stride is 3

I'll check the source shortly but it seems the element is not working as expected. What am I missing?

BrettRD commented 1 year ago

I need to write more docs

ros-encoding only overrides the string in the image message, used for extremely obscure types

try adding a caps filter instead: ... ! video/x-raw, format=RGB ! rosimagesink ...